2009-01-13 07:17 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)

* harbour/contrib/gtwvg/gtwvg.c
    ! Synchronized with GTWVT as per change below ( Przemek ):
    + Added 'layered' window support. It's enabled on W2K
      and above (and only when not in Terminal Services
      environment, because it makes it perform worse). This
      way the screen is also properly displayed regardless
      of what the Harbour application does. It also fixes
      numerous paint artifacts, when GTWVT window was in
      the background and another window is moved in front
      of it.
This commit is contained in:
Pritpal Bedi
2009-01-13 15:22:27 +00:00
parent 3b6d1242e5
commit f25fe9222d
2 changed files with 41 additions and 0 deletions

View File

@@ -8,6 +8,18 @@
2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2009-01-13 07:17 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* harbour/contrib/gtwvg/gtwvg.c
! Synchronized with GTWVT as per change below ( Przemek ):
+ Added 'layered' window support. It's enabled on W2K
and above (and only when not in Terminal Services
environment, because it makes it perform worse). This
way the screen is also properly displayed regardless
of what the Harbour application does. It also fixes
numerous paint artifacts, when GTWVT window was in
the background and another window is moved in front
of it.
2009-01-13 14:07 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/common.mak
* harbour/source/rtl/Makefile

View File

@@ -2168,6 +2168,35 @@ static BOOL hb_gt_wvt_CreateConsoleWindow( PHB_GTWVT pWVT )
if( !pWVT->hWnd )
hb_errInternal( 10001, "Failed to create WVT window", NULL, NULL );
if( ! GetSystemMetrics( SM_REMOTESESSION ) )
{
typedef BOOL ( WINAPI * P_SLWA )( HWND, COLORREF, BYTE, DWORD );
#if defined(HB_WINCE)
P_SLWA pSetLayeredWindowAttributes = ( P_SLWA )
GetProcAddress( GetModuleHandle( TEXT( "user32.dll" ) ),
TEXT( "SetLayeredWindowAttributes" ) );
#else
P_SLWA pSetLayeredWindowAttributes = ( P_SLWA )
GetProcAddress( GetModuleHandle( TEXT( "user32.dll" ) ),
"SetLayeredWindowAttributes" );
#endif
if( pSetLayeredWindowAttributes )
{
#if (defined(_MSC_VER) && (_MSC_VER <= 1200 || defined(HB_WINCE)) || defined(__DMC__)) && !defined(HB_ARCH_64BIT)
SetWindowLong( pWVT->hWnd, GWL_EXSTYLE, GetWindowLong( pWVT->hWnd, GWL_EXSTYLE ) | WS_EX_LAYERED );
#else
SetWindowLongPtr( pWVT->hWnd, GWL_EXSTYLE, GetWindowLongPtr( pWVT->hWnd, GWL_EXSTYLE ) | WS_EX_LAYERED );
#endif
pSetLayeredWindowAttributes( pWVT->hWnd,
( COLORREF ) 0 /* COLORREF crKey */,
255 /* BYTE bAlpha */,
LWA_ALPHA /* DWORD dwFlags */ );
}
}
hb_gt_wvt_InitWindow( pWVT, pWVT->ROWS, pWVT->COLS );
/* Set icon */
if( pWVT->hIcon )