Exemplo n.º 1
0
void TellWinHandle( void )
{
    if( !ToldWinHandle ) {
        TellHandles( GUIGetHAB(), GUIGetSysHandle( WndGui( WndMain ) ) );
        ToldWinHandle = TRUE;
    }
}
Exemplo n.º 2
0
void TellWinHandle( void )
{
    if( !ToldWinHandle ) {
        TrapTellHWND( GUIGetSysHandle( WndGui( WndMain ) ) );
        ToldWinHandle = TRUE;
    }
}
Exemplo n.º 3
0
bool DebugScreen( void )
{
    if( ScreenState == DEBUG_SCREEN ) return( FALSE );
    if( WndMain ) {
        ScreenState = DEBUG_SCREEN;
        GUISetModalDlgs( ForceHardMode || HardModeRequired );
        SetFocus( GUIGetSysHandle( WndGui( WndMain ) ) );
    }
    return( FALSE );
}
Exemplo n.º 4
0
unsigned OnAnotherThreadSimpAccess( unsigned in_len, in_data_p in_data, unsigned out_len, out_data_p out_data )
{
    unsigned    result;

    if( !ToldWinHandle || IsTrapFilePumpingMessageQueue() ) {
        return( TrapSimpAccess( in_len, in_data, out_len, out_data ) );
    } else {
        DosSemClear( &PumpMessageSem );
        result = TrapSimpAccess( in_len, in_data, out_len, out_data );
        WinPostMsg( GUIGetSysHandle( WndGui( WndMain ) ), WM_QUIT, 0, 0 );
        DosSemWait( &PumpMessageDoneSem, SEM_INDEFINITE_WAIT );
        DosSemSet( &PumpMessageDoneSem );
        return( result );
    }
}
Exemplo n.º 5
0
unsigned OnAnotherThreadAccess( trap_elen in_num, in_mx_entry_p in_mx, trap_elen out_num, mx_entry_p out_mx )
{
    unsigned    result;

    if( !ToldWinHandle || IsTrapFilePumpingMessageQueue() ) {
        return( TrapAccess( in_num, in_mx, out_num, out_mx ) );
    } else {
        DosSemClear( &PumpMessageSem );
        result = TrapAccess( in_num, in_mx, out_num, out_mx );
        WinPostMsg( GUIGetSysHandle( WndGui( WndMain ) ), WM_QUIT, 0, 0 );
        DosSemWait( &PumpMessageDoneSem, SEM_INDEFINITE_WAIT );
        DosSemSet( &PumpMessageDoneSem );
        return( result );
    }
}
Exemplo n.º 6
0
unsigned OnAnotherThread( unsigned(*rtn)(unsigned,void *,unsigned,void *), unsigned in_len, void *in, unsigned out_len, void *out )
{
    unsigned    result;

    if( !ToldWinHandle || IsTrapFilePumpingMessageQueue() ) {
        return( rtn( in_len, in, out_len, out ) );
    } else {
        DosSemClear( &PumpMessageSem );
        result = rtn( in_len, in, out_len, out );
        WinPostMsg( GUIGetSysHandle( WndGui( WndMain ) ), WM_QUIT, 0, 0 );
        DosSemWait( &PumpMessageDoneSem, SEM_INDEFINITE_WAIT );
        DosSemSet( &PumpMessageDoneSem );
        return( result );
    }
}
Exemplo n.º 7
0
unsigned OnAnotherThread( unsigned(*rtn)(unsigned,void *,unsigned,void *), unsigned in_len, void *in, unsigned out_len, void *out )
{
    unsigned    result;
    ULONG       ulCount;

    if( !ToldWinHandle || IsTrapFilePumpingMessageQueue() ) {
        return rtn( in_len, in, out_len, out );
    } else {
        DosPostEventSem( PumpMessageSem );
        result = rtn( in_len, in, out_len, out );
        WinPostMsg( GUIGetSysHandle( WndGui( WndMain ) ), WM_QUIT, 0, 0 );
        DosWaitEventSem( PumpMessageDoneSem, SEM_INDEFINITE_WAIT );
        DosResetEventSem( PumpMessageDoneSem, &ulCount );
        return result;
    }
}
Exemplo n.º 8
0
unsigned OnAnotherThreadSimpAccess( unsigned in_len, in_data_p in_data, unsigned out_len, out_data_p out_data )
{
    unsigned    result;
    ULONG       ulCount;

    if( !ToldWinHandle || IsTrapFilePumpingMessageQueue() ) {
        return( TrapSimpAccess( in_len, in_data, out_len, out_data ) );
    } else {
        DosPostEventSem( PumpMessageSem );
        result = TrapSimpAccess( in_len, in_data, out_len, out_data );
        WinPostMsg( GUIGetSysHandle( WndGui( WndMain ) ), WM_QUIT, 0, 0 );
        DosWaitEventSem( PumpMessageDoneSem, SEM_INDEFINITE_WAIT );
        DosResetEventSem( PumpMessageDoneSem, &ulCount );
        return result;
    }
}
Exemplo n.º 9
0
bool DebugScreen( void )
{
    HWND        hwnd;
    HWND        fore;

    if( ScreenState == DEBUG_SCREEN ) return( FALSE );
    if( _IsOn( SW_POWERBUILDER ) ) return( FALSE );
    if( WndMain ) {
        ScreenState = DEBUG_SCREEN;
        hwnd = GUIGetSysHandle( WndGui( WndMain ) );
        fore = GetForegroundWindow();
        if( fore != hwnd ) {
            HwndFore = fore;
        }
        if( GUIIsMinimized( WndGui( WndMain ) ) ) GUIRestoreWindow( WndGui( WndMain ) );
        if( IsWindow( hwnd ) ) SetForegroundWindow( hwnd );
        if( _IsOn( SW_POWERBUILDER ) ) {
            WndRestoreWindow( WndMain );
        }
    }
    return( FALSE );
}
Exemplo n.º 10
0
void TellWinHandle()
{
    if( _IsOn( SW_POWERBUILDER ) ) return;
    TellHWND( GUIGetSysHandle( WndGui( WndMain ) ) );
}
Exemplo n.º 11
0
void TellWinHandle( void )
{
    if( !ToldWinHandle && TrapTellHandles( GUIGetHAB(), GUIGetSysHandle( WndGui( WndMain ) ) ) ) {
        ToldWinHandle = true;
    }
}