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

C / C++ / MFC

 
GeneralRe: Overlapping windows Pin
Mark Salsbery25-Oct-06 6:41
Mark Salsbery25-Oct-06 6:41 
GeneralRe: Overlapping windows Pin
Mark Salsbery25-Oct-06 6:46
Mark Salsbery25-Oct-06 6:46 
GeneralRe: Overlapping windows Pin
Waldermort25-Oct-06 7:01
Waldermort25-Oct-06 7:01 
GeneralRe: Overlapping windows Pin
Mark Salsbery25-Oct-06 7:02
Mark Salsbery25-Oct-06 7:02 
GeneralRe: Overlapping windows Pin
Waldermort25-Oct-06 7:12
Waldermort25-Oct-06 7:12 
GeneralRe: Overlapping windows Pin
Mark Salsbery25-Oct-06 7:14
Mark Salsbery25-Oct-06 7:14 
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 
OK...

Since the whole notion of a "client area" in a window is based on WM_NCCALCSIZE notifications,
therefore completely hardwired to RECTS (dammit Smile | :) ) how about this...

Use a frame window/ client window method.

Frame window class is the border - it has a transparent client area by just returning TRUE from
WM_ERASEBKGND (to prevent flicker). Its shape is set with SetWindowRgn().

Client window class is borderless, its shape is set with SetWindowRgn() as well, but using the
client region you already have, which I presume is slightly smaller than the window region.
It has the WS_CHILD style and is a child of the frame window.

All child windows will be children of the client window so they won't draw outside its region.
The frame window just needs to position the client window in its client area in response to
WM_SIZE.

Would that work?

Mark

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 
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 

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.