HWND WRECreateMDIClientWindow( HWND win, HINSTANCE app_inst ) { CLIENTCREATESTRUCT ccs; RECT rect; HWND client; int ribbon_depth; int stat_depth; ribbon_depth = WREGetRibbonHeight(); stat_depth = WREGetStatusDepth(); GetClientRect( win, &rect ); ccs.hWindowMenu = GetSubMenu( GetMenu( win ), 3 ); ccs.idFirstChild = WRE_MDI_FIRST; /* attempt to create the main application edit window */ client = CreateWindow( "MDIClient", "", WS_CLIPCHILDREN | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL, 0, ribbon_depth, rect.right - rect.left, rect.bottom - (rect.top + stat_depth + ribbon_depth), win, (HMENU)NULL, app_inst, &ccs ); /* if the window could not be created return FALSE */ if( client == NULL ) { WREDisplayErrorMsg( WRE_MOCREATEMDICLIENT ); return( FALSE ); } return( client ); }
void WREResizeStatusWindows( RECT *rect ) { int y; if( WREStatusWindow != NULL ) { y = WREGetRibbonHeight(); if( y < ( rect->bottom - rect->top ) - WREStatusDepth ) y = ( rect->bottom - rect->top ) - WREStatusDepth; MoveWindow( WREStatusWindow, 0, y, rect->right - rect->left, WREStatusDepth, TRUE ); } }
void WREResizeWindows( void ) { RECT rect; int ribbon_depth; int stat_depth; if( !WRECleanupStarted ) { ribbon_depth = WREGetRibbonHeight(); stat_depth = WREGetStatusDepth(); GetClientRect( WREMainWin, &rect ); WREResizeStatusWindows( &rect ); WREResizeRibbon( &rect ); MoveWindow( WREMDIWin, 0, ribbon_depth, rect.right - rect.left, rect.bottom - (rect.top + stat_depth + ribbon_depth), TRUE ); } }