Re: Win32Lib: Window Icon
- Posted by Brian Broker <bkb at CNW.COM> Feb 25, 2000
- 488 views
On Fri, 25 Feb 2000 19:41:36 -0300, Caballero Rojo wrote: >Hello Brian, > Just use the .ico file when you not compile your program. > And when you're going to do it, change the ico file to the > executable file =) Thanks, I realize that. The point I was trying to make was that when you bind a program with an icon, and you want that icon to show up in your application's window, you need a way of saying "use the icon that is contained in this executable, regardless of what is called". When I first starting adding icons to bound programs, I was doing something like: setIcon( MyWindow, "MyProgram.exe" ) Well, this works fine until you rename "MyProgram.exe" to "MyOldProgram.exe". (Now your program won't find "MyProgram.exe" and won't show it's icon in the window.) By using 'command_line' to get the name of your program, you can be assured that the icon will always show up in your bound app's window. Unless somebody knew of a better way to do this, I was merely pointing out a not-so-obvious idea for other users of Win32Lib who want to bind their programs with custom icons... (at least it wasn't initially obvious to me and I just thought that it might be a nice example for the Win32Lib documentation). -- Brian