I just did some runs with the commercial apps I use at work, and can see that many do 
*not* create custom classes or window_roles for each type of window.  I think the best 
thing to do for the class naming is to just use an incrementing number and make each 
window its own class.  Then when the window is deleted we will just 
UnregisterClass(GetClassName(hwnd)) and NOT have any GDI leaks.  We have a GDI leak 
now because of this, so it will kill two birds with one stone.  Under NT or later this 
leak shouldn't be a problem, but 95 based OSes share a common 16-bit pool amongst all 
apps, and may run out causing really bad things to happen if the server is running for 
a long time.

We also have a GDI leak on the HICONs which need to be properly disposed of before 
they're lost completely.  With a separate class per window this will be easier, since 
no window will share a HICON with another.

The class, name, and role can still be used for the 2nd chance iconification of 
windows (the LoadImage() call referencing xwin.ini).

I'll throw a patch together tonight for this unless someone beats me to it.
-- 
-Earle F. Philhower, III
 [EMAIL PROTECTED]
 http://www.ziplabel.com

Reply via email to