After going over winprefs.c with one eye on the Platform SDK I found several minor things that I corrected and committed to CVS:
What's fixed: . We can't use LoadIcon() to get g_hiconX since it is DestroyIcon()ed. Use LoadImage() instead, like every other icon we use. . The name of the windows class ended up with a random character in it due to an incorrect strncpy(). . Added more input error checking to the winprefs() functions, gets rid of the "pWin was null" error that happened when you reloaded the .XWinrc.
What's left: . There's a small GDI leak, either when a window is created or destroyed that has a X supplied icon (xload for example). I traced things as well as I could but came up empty tracking this down. I know it is either in the creation or deletion because there is NO leak if you repeatedly do .XWinrc reloads. When you start xload you go up by 8 GDI objects (don't know what kind, only have task manager to help), but when you quit xload you only go down by 4.
I don't think any of these would cause Rodrigo's problem, but they're fixed nonetheless...
-Earle F. Philhower, III [EMAIL PROTECTED] cdrlabel - ZipLabel - FlpLabel http://www.cdrlabel.com