I have a serious problem with MDI windows. I have found where is yhe problem, but I don’t Know how solve it...
Description:
- 2 MDI child actived
- Window Rect of child "2" inside Window Rect of child "1" ( width 2 < width 1 and height 2 < height 1 )
- Focus on Win 2
- Click on maximize button in the caption of Win 1
- Win 1 restore
- Move of Win 1 to see win 2
- WIN 2 WITHOUT CAPTION !!!
The program works fine if I insert a Message Box, like in code below :
void FAmsg_pump()
{
MSG toPeek;
while ( ::PeekMessage( &toPeek, NULL, 0, 0, PM_NOREMOVE ) ){
if ( !AfxGetApp()->PumpMessage( ) ){
break;
}
}
}
void CChildFrame::OnSysCommand(UINT nID, LPARAM lParam)
{
CMainFrame* tMf=(CMainFrame*)AfxGetMainWnd();
if(nID==SC_MAXIMIZE)
{
if(tMf->MDIGetActive(NULL)!=this){
AfxMessageBox("Here something happens..");
CExtNCW < CMDIChildWnd>::MDIActivate();
FAmsg_pump();
}
}
CExtNCW < CMDIChildWnd>::OnSysCommand(nID, lParam);
}
Can you help me, please!!!
Thanks a lot...