Hi,
I made a window, in the window I created 4 child windows:
HWND Create_Window_Child1(HWND hParent, char *Classname, int win_width, int win_height)
{
return CreateWindowEx(
WS_EX_CLIENTEDGE, // give it a standard border
Classname,
NULL,
WS_VISIBLE | WS_CHILD,
1, 28, (((win_width-10)/2)-2), (((win_height-100)/2)-1),
hParent,
NULL, GetModuleHandle(0), NULL
);
}
HWND Create_Window_Child2(HWND hParent, char *Classname, int win_width, int win_height)
{
return CreateWindowEx(
WS_EX_CLIENTEDGE, // give it a standard border
Classname,
NULL,
WS_VISIBLE | WS_CHILD,
1, 28+(((win_height-100)/2)-1)+4, (((win_width-10)/2)-2), (((win_height-100)/2)-2),
hParent,
NULL, GetModuleHandle(0), NULL
);
}
HWND Create_Window_Child3(HWND hParent, char *Classname, int win_width, int win_height)
{
return CreateWindowEx(
WS_EX_CLIENTEDGE, // give it a standard border
Classname,
NULL,
WS_VISIBLE | WS_CHILD,
1+(((win_width-10)/2)-2)+4, 28, (((win_width-10)/2)-2), (((win_height-100)/2)-2),
hParent,
NULL, GetModuleHandle(0), NULL
);
}
HWND Create_Window_Child4(HWND hParent, char *Classname, int win_width, int win_height)
{
return CreateWindowEx(
WS_EX_CLIENTEDGE, // give it a standard border
Classname,
NULL,
WS_VISIBLE | WS_CHILD,
1+(((win_width-10)/2)-2)+4, 28+(((win_height-100)/2)-1)+4, (((win_width-10)/2)-2), (((win_height-100)/2)-2),
hParent,
NULL, GetModuleHandle(0), NULL
);
}
win_width and win_height are the sizes of the window (512x512).
When I resize the window, I want that the 4 child windows will resize too, and not stay the same, but contract or expand.
So I need to do something with the
case WM_SIZE:
{
return 0;
}
function.
Should I use SendMessage( or MoveWindow( ? And how to use them, noone of them worked yet. I tried them all...
Any suggestion is very appreciated :)
Decrius