I've discovered a
weird problem: if I minimize all open windows by clicking the "Show Desktop"
button (from the Windows Quick Launch area) right before I run my Win32::GUI
program, my program window opens and paints itself properly, but then
immediately "hiccups" and loses all its images. If I minimize and
restore my window, or drag it off the screen and back on again, it then
repaints itself correctly and everything is fine (I'm drawing the images to the
window's DC and using Window_Paint to keep it painted).
In an effort to deal
with this weirdness, I've tried calling InvalidateRect(), Redraw(), and
Update() right after calling Show() without success (but I'm not
exactly sure I'm using InvalidateRect() or Redraw() correctly anyway). I even
thought maybe I could get the handle of the desktop and refresh the desktop
first, but I don't think I knew what I was doing there either (and I have no
idea if that would work anyway).
explain in a simple and forthright manner exactly how to use
InvalidateRect() and/or Redraw() to deal with this problem? Or does anyone have
any better suggestions? Again, it only happens if I run my program right after
clicking the "Show Desktop" button.
P.S. - I'd be happy
to provide sample code off-list (my app is already past 7000 lines of code with
all the inline bitmaps).