kearxxx
July 18th, 2006, 01:11 PM
Hi,
I'm creating sample project with MDI child windows.
I have:
1) PARENT WINDOW
2) MDI CHILD WINDOW
3) OTHER MDI CHILD WINDOWS (LINKED TO 2), wich other controls like RichEdit etc. etc.
PARENT WINDOW is a parent window for the Statusbar and Toolbar, they are created by calling CreateWindowsEx.
My problem is that, MDI child window can be moved or resized, that it overlaps my statusbar or toolbar. This is how i'm creating the windows:
g_hMDIClient = CreateWindowEx(0, "mdiclient", NULL,
WS_CHILD | WS_CLIPCHILDREN | WS_VSCROLL | WS_HSCROLL,
0, 0, 0, 0,hWnd, (HMENU)zz, hInst, (LPVOID)&ccs);
ShowWindow(g_hMDIClient, SW_SHOW);
hToolbar = CreateMainWindowToolbar(hWnd);
hStatusbar = CreateMainWindowStatusbar(hWnd);
hMdiChild = CreateMdiChildWindow(g_hMDIClient);
When i tried to create Toolbar and Statusbar before the hMdiClient, they were not visible.
I'm attaching two images, which should show you the situation.
I tried to google but i didnt find anything useful, so how to prevent for overlaps??? The best would be to keep this MDI child window inside the space between the toolbar (up) and statusbar(down)?? Is it possible? How to do it?
status_ok.jpg - before the MDIchild was moved on the statusbar
status_bad.jpg - after the move
Thanks for help!!
I'm creating sample project with MDI child windows.
I have:
1) PARENT WINDOW
2) MDI CHILD WINDOW
3) OTHER MDI CHILD WINDOWS (LINKED TO 2), wich other controls like RichEdit etc. etc.
PARENT WINDOW is a parent window for the Statusbar and Toolbar, they are created by calling CreateWindowsEx.
My problem is that, MDI child window can be moved or resized, that it overlaps my statusbar or toolbar. This is how i'm creating the windows:
g_hMDIClient = CreateWindowEx(0, "mdiclient", NULL,
WS_CHILD | WS_CLIPCHILDREN | WS_VSCROLL | WS_HSCROLL,
0, 0, 0, 0,hWnd, (HMENU)zz, hInst, (LPVOID)&ccs);
ShowWindow(g_hMDIClient, SW_SHOW);
hToolbar = CreateMainWindowToolbar(hWnd);
hStatusbar = CreateMainWindowStatusbar(hWnd);
hMdiChild = CreateMdiChildWindow(g_hMDIClient);
When i tried to create Toolbar and Statusbar before the hMdiClient, they were not visible.
I'm attaching two images, which should show you the situation.
I tried to google but i didnt find anything useful, so how to prevent for overlaps??? The best would be to keep this MDI child window inside the space between the toolbar (up) and statusbar(down)?? Is it possible? How to do it?
status_ok.jpg - before the MDIchild was moved on the statusbar
status_bad.jpg - after the move
Thanks for help!!