I have made a demo program I am going to post the source for as an example for others, and it compress's many files into one ZIP file, it does real well the one problem is you can't move the window while it is working on the adding files and zipping them. does anyone know what would couse this? it seems to ignore all WM_ message's maybe I need to make a thread? The windows does not repaint itself and seems to just be locked there untill it is done. I does update the progress of what it is doing but thats it. This message was edited by Zcoder, on 3/6/2001 6:12:04 PM
You've just hit on why some apps NEED multiple threads. Somehow you hit a button, menu, whatever, and some window message gets sent, and inside your Winproc you set off your zip files method. Zipping thats conciderable time. Meanwhile, your whole app is sitting there doing the zip method. No CPU cycles are left over to process any more messages (like DRAG THE WINDOW or such). So, what you need do is spawn a new worker thread to do the zipping. This leaves your user interface thread (IE, the message loop) free to process more messages. And your interface remains responsive. See Iczelion's Tutorial #15 about how to accomplish this.
Hey that did the trick. To tell you the truth, I tried making a thread but it did not work right, but after looking over a small example I see what I did wrong, this Zip demo I am making now works great, I will be posting it as soon as I make the unzip part. what good if a zip program if you can unzip it? I know you can use any zip program but not on this zip archive, I really don't have INFO on the standard ZIP's so I know it would not work with other zip program. I made my own archive structure, and it seems to work ok. I could make them Zip compadible if I knew the structure of a zip file. the commpression method I am using is the Zip type but the Zip library or archive what ever you want to cal it is not the same. anyone know where this info is? it would help to make this demo in asm alot better.. Thanks again.....
You'd probably like to have a look at the infozip project. 100% pkzip compatible, freeware, with C sources. Can't remember URL, but should easy to find on a websearch.
try taking a look at: www.wotsit.org in the "Archive Files" section.... it's near the end of the second page :> (you can also download directly from www.wotsit.org/download.asp?f=zip_form but there's lots of other useful infos on the too :> )