Click here to Skip to main content
15,899,313 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Overlapping windows Pin
Waldermort25-Oct-06 7:23
Waldermort25-Oct-06 7:23 
GeneralRe: Overlapping windows Pin
Mark Salsbery25-Oct-06 8:44
Mark Salsbery25-Oct-06 8:44 
GeneralRe: Overlapping windows Pin
Waldermort25-Oct-06 15:00
Waldermort25-Oct-06 15:00 
GeneralRe: Overlapping windows Pin
Mark Salsbery25-Oct-06 8:55
Mark Salsbery25-Oct-06 8:55 
GeneralRe: Overlapping windows Pin
Waldermort27-Oct-06 1:44
Waldermort27-Oct-06 1:44 
GeneralRe: Overlapping windows Pin
Waldermort27-Oct-06 4:04
Waldermort27-Oct-06 4:04 
GeneralRe: Overlapping windows Pin
Mark Salsbery27-Oct-06 5:45
Mark Salsbery27-Oct-06 5:45 
GeneralRe: Overlapping windows Pin
Waldermort27-Oct-06 7:31
Waldermort27-Oct-06 7:31 
The hurdle was getting ahold of the correct DC to draw to. As you know each window comes with it's own regions, client area DC etc... The DefWindowProc for some controls will check the wParam for a HDC within it's WM_PAINT, but most don't. Besides that, MSDN states that users should not send this message directly but rather send it through an api such as InvalidateRect(). Other than Owner drawn and subclassing, there is no method for us to control how a child window draws.

In answer to your first response, how can you select a region into the DC before DefWindowProc starts it's WM_PAINT or WM_ERASEBKGND. Even after subclassing, I have had to redirect all the drawing to the main windows DC, which basically means, for each control I add, I have to subclass it.

But the end result is well worth the effort. I am now half way to completeing a resizable skinned window library in non MFC.
GeneralRe: Overlapping windows Pin
Mark Salsbery27-Oct-06 7:44
Mark Salsbery27-Oct-06 7:44 
Questioncalculate sum of variables of parent window Pin
prithaa25-Oct-06 4:08
prithaa25-Oct-06 4:08 
AnswerRe: calculate sum of variables of parent window Pin
Programm3r25-Oct-06 4:14
Programm3r25-Oct-06 4:14 
GeneralRe: calculate sum of variables of parent window Pin
Mark Salsbery25-Oct-06 4:48
Mark Salsbery25-Oct-06 4:48 
AnswerRe: calculate sum of variables of parent window Pin
David Crow25-Oct-06 5:50
David Crow25-Oct-06 5:50 
GeneralRe: calculate sum of variables of parent window Pin
prithaa25-Oct-06 6:07
prithaa25-Oct-06 6:07 
GeneralRe: calculate sum of variables of parent window Pin
David Crow25-Oct-06 6:17
David Crow25-Oct-06 6:17 
GeneralRe: calculate sum of variables of parent window Pin
prithaa25-Oct-06 9:17
prithaa25-Oct-06 9:17 
GeneralRe: calculate sum of variables of parent window Pin
David Crow25-Oct-06 10:10
David Crow25-Oct-06 10:10 
GeneralRe: calculate sum of variables of parent window Pin
prithaa25-Oct-06 19:02
prithaa25-Oct-06 19:02 
GeneralRe: calculate sum of variables of parent window Pin
David Crow26-Oct-06 2:49
David Crow26-Oct-06 2:49 
AnswerRe: calculate sum of variables of parent window Pin
led mike25-Oct-06 8:36
led mike25-Oct-06 8:36 
GeneralRe: calculate sum of variables of parent window Pin
prithaa25-Oct-06 9:21
prithaa25-Oct-06 9:21 
GeneralRe: calculate sum of variables of parent window Pin
led mike25-Oct-06 9:24
led mike25-Oct-06 9:24 
QuestionEdit control Pin
Jarley D.G.25-Oct-06 3:59
Jarley D.G.25-Oct-06 3:59 
AnswerRe: Edit control Pin
Programm3r25-Oct-06 4:19
Programm3r25-Oct-06 4:19 
AnswerRe: Edit control Pin
Mark Salsbery25-Oct-06 4:46
Mark Salsbery25-Oct-06 4:46 

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.