MDIchild created when the MDI client has the MDIS_ALLCHILDSTYLES
style, should not be shown at creation nor activated unless the WS_VISIBLE flag is set.
This commit is contained in:
parent
48325f1f18
commit
4f7abc05c2
|
@ -356,6 +356,17 @@ static HWND32 MDICreateChild( WND *w, MDICLIENTINFO *ci, HWND32 parent,
|
|||
ShowWindow32( hwnd, SW_SHOWMINNOACTIVE );
|
||||
else
|
||||
{
|
||||
/* WS_VISIBLE is clear if a) the MDI client has
|
||||
* MDIS_ALLCHILDSTYLES style and 2) the flag is cleared in the
|
||||
* MDICreateStruct. If so the created window is not shown nor
|
||||
* activated.
|
||||
*/
|
||||
int showflag=wnd->dwStyle & WS_VISIBLE;
|
||||
/* clear visible flag, otherwise SetWindoPos32 ignores
|
||||
* the SWP_SHOWWINDOW command.
|
||||
*/
|
||||
wnd->dwStyle &= ~WS_VISIBLE;
|
||||
if(showflag){
|
||||
SetWindowPos32( hwnd, 0, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE );
|
||||
|
||||
/* Set maximized state here in case hwnd didn't receive WM_SIZE
|
||||
|
@ -368,6 +379,10 @@ static HWND32 MDICreateChild( WND *w, MDICLIENTINFO *ci, HWND32 parent,
|
|||
MDI_AugmentFrameMenu( ci, w->parent, hwnd );
|
||||
MDI_UpdateFrameText( w->parent, ci->self, MDI_REPAINTFRAME, NULL );
|
||||
}
|
||||
}else
|
||||
/* needed, harmless ? */
|
||||
SetWindowPos32( hwnd, 0, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE );
|
||||
|
||||
}
|
||||
TRACE(mdi, "created child - %04x\n",hwnd);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue