Re: Icons
- Posted by Brent Hugh <bhugh at CCTR.UMKC.EDU> Aug 11, 1999
- 523 views
At 03:51 PM 8/9/99 -0700, you wrote: >Brent Hugh wondered: > >> Is there some (relatively easy) way to set or change >> the icon of a bound Euphoria file? > >In the latest version of Win32Lib, you can write: > > setIcon( myWindow, "iconfile.ico" ) > >to associate an icon with a window. Unfortunately, this can only be done at >runtime, and I don't know how to change the built-in icon. I checked this out and it seems to work . . . I got poking around in the win32.hlp file (look in the index under STM_SETICON and WM_SETICON) and found out that the wparam sent with this function determines whether the icon is set as the "large" or "small" icon for that window. I'm not sure exactly what this is supposed to mean, but from a practical point of view, I discovered that if I set it to be the small icon, it became the small icon in the upper left of the window, and next to the program in the title bar--but the (larger) icon used during task-switching (alt-tab) was unchanged. if I set it to be the large icon, then it set that icon to be the icon in the upper left of the window, the taskbar, AND the larger icon seen during alt-tab. Upshot? It might be nice to at least have the option to select "large" or "small" icon. (On the other hand, the other half of the setIcon procedure which uses STM_SETICON doesn't have this option--or, apparently, need it . . . . which makes some difficulties.) --Brent PS--thanks for the quick update of win32lib on that nasty menu bug--it seems to work fine now! --quoting------------------------------ [New - Windows 95] WM_SETICON wParam = (WPARAM) (BOOL) fType; // icon size (large or small) lParam = (LPARAM) (HICON) hicon; // handle of icon An application sends the WM_SETICON message to associate a new big or small icon with a window. Windows draws the big icon when the window is minimized, and the small icon in the window's title bar. Parameters fType Value of wParam. Specifies the icon being set. If TRUE, the message sets the big icon. If FALSE, the message sets the small icon. hicon Value of lParam. Identifies the new big or small icon. If this parameter is NULL, the icon indicated by fType is removed. --quoting------------------------------ ++++++++++++++++++++ Brent Hugh / bhugh at cstp.umkc.edu ++++++++++++++++++++ ++++++++ University of Missouri-Kansas City, Conservatory of Music +++++++ ++ Sheet Music/Recordings: http://www.sunflower.org/~bhugh/pathetic.spm ++ + Internet Piano Concert: http://cctr.umkc.edu/userx/bhugh/recital.html + ++++++++++ Classical Piano MP3s http://www.mp3.com/brent_d_hugh ++++++++++