Is there any way for me to set the region in which client controls can appear in my control?
Is there any way for me to set the region in which client controls can appear in my control?
Don't you control where all the controls are placed anyways?
Or is this actually a rebar question?
gg
This is regarding my custom controls. I just wanted to be lazy and set a minimum offset for my controls and a clipping area and such which would clip all the controls say in the 'body' of the control leaving the caption and frame visible.
You might be able to use SelectClipRgn() to do something like that.
There's an example there you can click on.
gg
I had forgotten I had asked this question before, best just to revive the thread again I guess..
Anyways, I'm even further into making custom controls now ... and I'm getting quite good at it (pure API) ... Now you can get the client rect of your window by using GetClientRect ... My question is: How can I set a rect like that for my own controls? I have found no function for this. ... It's not really something I need terribly but I would just like to know that I can do it if I need to.
Probably should let DefWindowProc handle this message when wParam is TRUE.The WM_NCCALCSIZE message is sent when the size and position of a window's client area must be calculated. By processing this message, an application can control the content of the window's client area when the size or position of the window changes.
...
If wParam is FALSE, lParam points to a RECT structure. On entry, the structure contains the proposed window rectangle for the window. On exit, the structure should contain the screen coordinates of the corresponding window client area.
Found by entering NC(for non-client) into help index which brought up NCCALCSIZE_PARAMS which links to WM_NCCALCSIZE.