RE: window icons

[email protected] Thu, 13 Feb 2003 21:18:12 -0000
Newsgroups gmane.comp.video.gimp.windows.devel
Message-ID <B1F38D7B53615140BCEA6677DF9F2F8C012ADC67@i2km11-ukbr.domain1.systemhost.net>
> [email protected] writes:
>  > Would it not be possible to use GetClassInfoEx() which would return the
>  > structure for the given window's class, and then change the HICON from
>  > there?
> 
> I guess so, but the same window class is used for all GDK windows of
> the same type, so you would then change the icon for all top-level
> windows of the application.
> 
> As this is a common request, maybe it would be a good idea not to
> share window classes, at least not for top-level windows? On NT class
> systems it probably doesn't matter, but on the 16-bit GDI in 9x class
> systems it might cause more resource drain.

I did think that would be the case (that each window would need its own
class) but after reading the documentation it looks as if the the class is
unique to each window (even if the same one is used for all new windows) -
see the part in quotes on RegisterClassEx() for the return value:

"If the function succeeds, the return value is a class atom that uniquely
identifies the class being registered.".  

This sounds to me as if getting the class for a window would be unique even
if the same class was used for all windows in the application.  It would be
interesting to write a small test application to find out if this would work
or not, and if not, perhaps as you say Tor - register a different class for
each window in the application.  

At end of the day, there are only so many windows an application will have -
and in most cases it shouldnt be more than 20.

If I get time tomorrow, I will knock up a test application to see if the
changing the details of a class for 2 or more windows, changes all the
windows.

Regards,
Martyn

> 
> --tml




To Post a message, send it to: [email protected]
To Unsubscribe, send a blank message to:
[email protected] 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/