If you ever try to paint on the surface of a window created with CreateDialog or CreateDialogIndirect, you'll notice that it's not what you expect. Need an explanation (or link to one) of the internal details of the dialog painting mechanism as opposed to that of other windows. Preferential credit to an explanation of how to circumvent any limitations.
2006-08-03
10:33:09
·
4 answers
·
asked by
jacinablackbox
4
in
Computers & Internet
➔ Programming & Design
The IDE and code I use are not really relevant. One thing though: I create my dialog boxes wrapped in the MFC CDialog class. What I need is a thorough definition of the differences among DoModal, CreateDialog, and generic windows with respect to painting.
For example I noticed the InvalidateRect API does not work predictably on dialogs, and artifacts are left behind.
2006-08-03
16:34:42 ·
update #1
> the InvalidateRect command doesn't get processed until a WM_PAINT message is sent
I'm afraid that isn't accurate. Firstly, WM_PAINT messages are never "sent." Secondly, the InvalidateRect function generates a WM_PAINT message immediately (the window needn't be obscured).
At least it should. But it doesn't seem to work consistently for dialogs, as if they're filtering the messages. I need a pointer as to exactly how they do that.
2006-08-04
13:52:35 ·
update #2