void TellWinHandle( void ) { if( !ToldWinHandle ) { TellHandles( GUIGetHAB(), GUIGetSysHandle( WndGui( WndMain ) ) ); ToldWinHandle = TRUE; } }
void TellWinHandle( void ) { if( !ToldWinHandle ) { TrapTellHWND( GUIGetSysHandle( WndGui( WndMain ) ) ); ToldWinHandle = TRUE; } }
bool DebugScreen( void ) { if( ScreenState == DEBUG_SCREEN ) return( FALSE ); if( WndMain ) { ScreenState = DEBUG_SCREEN; GUISetModalDlgs( ForceHardMode || HardModeRequired ); SetFocus( GUIGetSysHandle( WndGui( WndMain ) ) ); } return( FALSE ); }
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 ); } }
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 ); } }
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 ); } }
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; } }
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; } }
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 ); }
void TellWinHandle() { if( _IsOn( SW_POWERBUILDER ) ) return; TellHWND( GUIGetSysHandle( WndGui( WndMain ) ) ); }
void TellWinHandle( void ) { if( !ToldWinHandle && TrapTellHandles( GUIGetHAB(), GUIGetSysHandle( WndGui( WndMain ) ) ) ) { ToldWinHandle = true; } }