Click here to Skip to main content
15,898,599 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCWnd getting erased by other windows. Pin
whatever174-Mar-09 19:47
whatever174-Mar-09 19:47 
AnswerRe: CWnd getting erased by other windows. Pin
Cedric Moonen4-Mar-09 20:14
Cedric Moonen4-Mar-09 20:14 
QuestionRe: CWnd getting erased by other windows. Pin
Eytukan4-Mar-09 20:16
Eytukan4-Mar-09 20:16 
AnswerRe: CWnd getting erased by other windows. Pin
Cedric Moonen4-Mar-09 20:20
Cedric Moonen4-Mar-09 20:20 
GeneralRe: CWnd getting erased by other windows. Pin
whatever174-Mar-09 21:44
whatever174-Mar-09 21:44 
GeneralRe: CWnd getting erased by other windows. Pin
Iain Clarke, Warrior Programmer4-Mar-09 22:21
Iain Clarke, Warrior Programmer4-Mar-09 22:21 
GeneralRe: CWnd getting erased by other windows. Pin
whatever174-Mar-09 22:58
whatever174-Mar-09 22:58 
GeneralRe: CWnd getting erased by other windows. Pin
Iain Clarke, Warrior Programmer4-Mar-09 23:20
Iain Clarke, Warrior Programmer4-Mar-09 23:20 
OK, I'm a little confused now.

If the code is not yours, it sounds like you have two choices.

1/ If you have the code, fix the bugs. Then the answers become the same as though the code was by you.
2/ If you don't / can't have the code, demand your money back, or that the supplier fixes their bugs.


I'm also not understanding when you say the CWnds are represents by bitmaps. Isn't the point of child windows that they draw themselves? If the dialog contains many things that are not yours, should they not be responsible for their own WM_PAINT handlers?

---

In answer to your WM_ERASEBKGND question... All windows DO receive that message. Most will ignore it, and let the default behaviour happen in DefWndProc. This will either fill the whole rectangle using the brush defined in the window class (not C++ class, the WNDCLASS), or if that is NULL, set a flag in the PAINTSTRUCT used in WM_PAINT to say that the paint handler needs to erase the window manually.

Good ol' fashioned Win32. There are many times I'm glad I started this game before using MFC. It's great, but it can hide a bit too much at times.

Iain.

Codeproject MVP for C++, I can't believe it's for my lounge posts...

GeneralRe: CWnd getting erased by other windows. Pin
whatever174-Mar-09 23:45
whatever174-Mar-09 23:45 
GeneralRe: CWnd getting erased by other windows. Pin
SandipG 5-Mar-09 0:33
SandipG 5-Mar-09 0:33 
GeneralRe: CWnd getting erased by other windows. Pin
whatever175-Mar-09 1:15
whatever175-Mar-09 1:15 
GeneralRe: CWnd getting erased by other windows. Pin
SandipG 5-Mar-09 1:24
SandipG 5-Mar-09 1:24 
AnswerRe: CWnd getting erased by other windows. Pin
whatever176-Mar-09 2:49
whatever176-Mar-09 2:49 
QuestionExit an Application Pin
punav4-Mar-09 19:34
punav4-Mar-09 19:34 
QuestionRe: Exit an Application Pin
Eytukan4-Mar-09 20:36
Eytukan4-Mar-09 20:36 
AnswerRe: Exit an Application Pin
Hamid_RT4-Mar-09 20:46
Hamid_RT4-Mar-09 20:46 
GeneralRe: Exit an Application Pin
punav4-Mar-09 21:11
punav4-Mar-09 21:11 
GeneralRe: Exit an Application Pin
Akt_4_U4-Mar-09 22:46
Akt_4_U4-Mar-09 22:46 
GeneralRe: Exit an Application Pin
punav4-Mar-09 23:55
punav4-Mar-09 23:55 
QuestionDeprecation Error Pin
Varun Bhatt4-Mar-09 19:00
Varun Bhatt4-Mar-09 19:00 
AnswerRe: Deprecation Error Pin
Cedric Moonen4-Mar-09 20:28
Cedric Moonen4-Mar-09 20:28 
AnswerRe: Deprecation Error Pin
Eytukan4-Mar-09 20:40
Eytukan4-Mar-09 20:40 
GeneralRe: Deprecation Error Pin
CPallini4-Mar-09 22:15
mveCPallini4-Mar-09 22:15 
GeneralRe: Deprecation Error Pin
Eytukan5-Mar-09 0:11
Eytukan5-Mar-09 0:11 
QuestionHow to get system and then convert the result into char*, Thank You Pin
kingmanwahaha4-Mar-09 18:52
kingmanwahaha4-Mar-09 18:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.