Esempio n. 1
0
void GUIError( const char *str )
{
    HWND focus;

    focus = _wpi_getfocus();
    if( focus != NULLHANDLE ) {
        _wpi_messagebox( focus, str, NULL, ERROR_STYLE );
    }
}
Esempio n. 2
0
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 );
}