Re: Setting Icon....
- Posted by Daniel Berstein <daber at PAIR.COM> Mar 01, 1999
- 492 views
--=====================_920325209==_ At 09:26 AM 01-03-1999 , you wrote: >>The code I sent earlier can handle any window. It just need a handle to >the >>window. >> >>Tell me if it works on 95/98 (it should). >> > >It doesn't work at all. >At first I got errormessages that every >"constant" thing already exist, except GCL_HICONSM = -34. >When you remove it, it returns no error messages, but >it doesn't work. I just tried it on 95... it works! Did you specified a valid icon to load? I didn't get any constant errors, maybe you are using win32lib or other library that already defines as global all those constant. Anyways I removed the "global" to the constants used by CICON.EW and appended an underscore to their name, now there should be no conflicts with win32lib (Rob: hurry the namespace fix!). The only global identifier on the library is the ChangeWindowIcon. At the begining of the file is a brief description and usage manual. I'm attaching you a ZIP file (icontest.zip) with: a) CICON.EW, the include file I posted earlier. b) WINDOW.EXW, modified version (just 2 lines!) of Euphoria demo. c) ICON1.ICO, sample icon to use. Unzip all files to any directory and do 'exw.exe window.exw'. Did it worked now? Ask David if you still have problems with win32lib (ie. How to get the windows handle). It's very easy to add this function (with better error handling and some other cuties like choosing small/big icons, etc.) to win32lib distribution. The modified lines in window.exw are line 154 and 161 in case you want to take a look at them and see how you can use it on your own code. --=====================_920325209==_ x-mac-type="705A4950"; x-mac-creator="705A4950"