Exemple #1
0
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 );
}
Exemple #2
0
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 );
    }
}
Exemple #3
0
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 );
    }
}