Beispiel #1
0
void GUISetRestoredSize( gui_window *wnd, gui_rect *rect )
{
    gui_coord           pos;
    gui_coord           size;
    gui_window          *parent;
    HWND                frame;
    HWND                phwnd;
    WPI_RECT            new_rect;

    if( GUIIsMaximized( wnd ) || GUIIsMinimized( wnd ) ) {
        if( wnd->hwnd != NULLHANDLE ) {
            frame = GUIGetParentFrameHWND( wnd );
            parent = wnd->parent;
            phwnd = HWND_DESKTOP;
            if( parent ) {
                phwnd = parent->hwnd;
            }
            GUICalcLocation( rect, &pos, &size, phwnd );
            _wpi_setrectvalues( &new_rect, pos.x, pos.y, pos.x + size.x,
                                pos.y + size.y );
            if( GUIMDIMaximized( wnd ) ) {
                GUISetMDIRestoredSize( frame, &new_rect );
            } else {
                _wpi_setrestoredrect( frame, &new_rect );
            }
        }
    } else {
        GUIResizeWindow( wnd, rect );
    }
}
Beispiel #2
0
bool WndIsMaximized( a_window wnd )
{
    return( GUIIsMaximized( wnd->gui ) );
}