Hi Friends
I have created a MDI form in that i have 2 forms (treeview form and information form)
in 2nd (information form)
i have added 2 buttons next and previous
minimize, maximize works on all of client form correctly(before any click on 2nd form)
Problem:
when i click button on the info form or click the info form and maximize my application
my client window do not change its size
in client form 2 wndproc (also i have changed form 2 size in mainwindow wndproc)
case WM_CREATE:
{
InitCommonControls();
CREATESTRUCT *cs=reinterpret_cast<createstruct*>(lParam);
int desktopwidth=GetSystemMetrics(SM_CXSCREEN);
hp_L = CreateWindowEx(WS_EX_CLIENTEDGE,_T("button"),_T("<"),WS_CHILD|WS_CLIPCHILDREN|WS_VISIBLE,0,0,30,PICBOX,hwnd,(HMENU)ID_CHLDWND_PREV,cs->hInstance,0);
hp_R = CreateWindowEx(WS_EX_CLIENTEDGE,_T("button"),_T(">"),WS_CHILD|WS_CLIPCHILDREN|WS_VISIBLE,desktopwidth-30,0,30,PICBOX,hwnd,(HMENU)ID_CHLDWND_NEXT,cs->hInstance,0);
hpbox = CreateWindowEx(WS_EX_CLIENTEDGE,_T("static"),_T(""),WS_CHILD|WS_CLIPCHILDREN|WS_VISIBLE,0,0,0,0,hwnd,(HMENU)ID_CHLDWND_DASH,cs->hInstance,0);
return 0;
}
case WM_SIZE:
if (wParam==SIZE_MAXIMIZED)
{
SetWindowLongPtr(hpbox,GWL_EXSTYLE,0);
SetWindowLongPtr(hp_L,GWL_EXSTYLE,0);
SetWindowLongPtr(hp_R,GWL_EXSTYLE,0);
}
else
{
SetWindowLongPtr(hpbox,GWL_EXSTYLE,WS_EX_CLIENTEDGE);
SetWindowLongPtr(hp_L,GWL_EXSTYLE,WS_EX_WINDOWEDGE);
SetWindowLongPtr(hp_R,GWL_EXSTYLE,WS_EX_CLIENTEDGE);
}
MoveWindow(hpox,0,0,LOWORD(lParam),HIWORD(lParam),true);
MoveWindow(hp_L,0,0,30,PICBOX,true);
MoveWindow(hp_R,0,0,LOWORD(lParam),HIWORD(lParam),true);
Thanks;