I'm not that great a window or asm programmer so you might find this question stupid. I have a window that displays some bitmaps. When i minimize the window and then maximize it again my bitmaps disappear. Is there a method other than to BitBlt them again to the client area to keep them in the client area. Like i said i don't have a lot of windows asm experience. Maybe someone could just point to the relevent APIs or whatever.

thanx in advance

Posted on 2001-10-28 21:22:00 by titan
All GDI stuff should be handled by the PaintProc.

So when your maximizing your program, windows will realize it need to be 'redrawn' to show it, and (i would expect) send the WM_PAINT message. So if you do all your window 'touch-ups' like bitblitting etc thru the paint proc, you shouldnt have this problem.

I could be overlooking something here (didnt test my 'theory'), but pretty sure this is it.

And to specifically answer your question, i dont know of any alternate other than bitblt'n to the main dc. You can store the pic on another dc, but eventually it will have to be bitblt'd onto the main dc to be seen.

Hope this is some help to you..

Posted on 2001-10-28 21:50:43 by NaN
thanx Nan

i guess i'm going to have to research the paint proc thorougly.

right now my board style game sets itself up in response to a menu command "new game"

Back to the "drawing" board

Posted on 2001-10-28 22:46:05 by titan
Well, you *could* use a static/image control for your bitmap. This
is a bit messy and has some setup overhead and isn't exactly
mindbogglingly fast, but this IS GDI after all ;). I posted some code
either on the old board or this one, doing a little search for it...


if the direct link doesn't work, go to win32asmboard-archive.cjb.net,
and search for "drawbuf" in the "general" forum.
Posted on 2001-10-28 23:55:43 by f0dder