bool GUIIsGUIChild( HWND hwnd ) { gui_window *root; root = GUIGetRootWindow(); if( root ) { hwnd = GUIGetTopParentHWND( hwnd ); if( root->root_frame == hwnd ) { return( true ); } } return( false ); }
bool SetFocusToParent( void ) { HWND curr_hwnd; // for a reason I do not yet comprehend, the MDI stuff should no longer // be a deterent to setting the focus to the top parent if( ( GUICurrWnd != NULL ) && !EditControlHasFocus /* && !GUIMDI */ && !( GUICurrWnd->style & GUI_POPUP ) ) { curr_hwnd = GUIGetTopParentHWND( GUICurrWnd->hwnd ); if( GUIGetCtrlWnd( curr_hwnd ) == NULL ) { if( _wpi_iswindow( GUIMainHInst, curr_hwnd ) ) { if( _wpi_getfocus() != curr_hwnd ) { _wpi_setfocus( curr_hwnd ); _wpi_setactivewindow( curr_hwnd ); return( TRUE ); } } } } return( FALSE ); }
HWND GUIGetSysHandle( gui_window *wnd ) { return( GUIGetTopParentHWND( wnd->hwnd ) ); }