Question:
Internal differences between dialog boxes and other windows?
jacinablackbox
2006-08-03 14:33:09 UTC
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.
Four answers:
realius
2006-08-03 14:39:05 UTC
Okay, I think I understand the question better now.

You probably already have this, but here is a link to the msdn help for InvalidateRect. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/pantdraw_7ano.asp

One thing that I noticed in the msdn help file is that the InvalidateRect command doesn't get processed until a WM_PAINT message is sent. A way to test this to see if it is your issue is to drag your dialog off the screen and then back on. This causes a repaint. Or you could just send a WM_PAINT message.



I haven't seen any difference between modal/modeless dialogs as far as painting. For modeless, just make sure you have your PostNCDestroy defined with 'delete this;' inside.



Hope this helps. I use C++/MFC on a daily basis, but do not consider myself an expert since I've not had classes on it. I've just learned from doing.
Special Ed
2006-08-03 21:37:58 UTC
Look into the Windows API. Thats about all I got time for.
cookedermott
2006-08-03 21:36:09 UTC
www.gadgetdetective.com
2006-08-03 21:37:47 UTC
***** **** ***** ** * **** * ** * * *********** * ****** * **** ********!


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...