Re: Avoiding Updates After Displaying Menus
In addition to Toms reply.
I am assuming that you are drawing your graphics a piece at a time, a line
here, a fill there..... If so
When I have things like this done is I draw to a Memory Bitmap when things
need to be redrawn due to a change in the content of the drawing, then
simply paint the bitmap on the screen dc whenever system asks me to paint
(WM_PAINT messages). This helps alot since drawing lines and rects takes
alot longer than simply bitblting a bitmap on the screen.
Otherwise bitblting a bitmap on the screen shouldn't really take that long,
unless like Tom suggested, you might be drawing outside the visible area
(which is not needed).
AliR.
"nomad" <nomad@discussions.microsoft.com> wrote in message
news:6B782820-E1CA-4E71-B6F3-19AC0A4AB8B0@microsoft.com...
I have an MDI app whose MDI child windows are graphics windows that display
images. These images can be fairly complex, and redrawing them may take
time.
More to the point, there are occasionally ephemeral message 'boxes' that I
display within these images that aren't drawn as part of the main imaging
code, and go away when the image is next refreshed.
Okay, so, I click on a menu item in the menu bar and the menu comes down
and
I select something. I now get a WM_PAINT event in my window, causing a
redraw. This has two unfortunate effects: one is to slow things down while
I
wait for an update, and the other is to erase my little message boxes.
I know in Mac OS (even back in the Bad Old Days of OS 9) there is a way to
tell the menu to make a copy of the bitmap behind the menu window, and to
restore it when the menu goes away. In this way, the underlying window
does
not require an update; the bits are simply restored automatically.
Is there a similar feature in MFC or Win32? If so, I haven't been able to
find it so far. Thanks.