2010-10-22 11:24 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/src/rtl/gtwvt/gtwvt.c
    ! use ERROR_CLASS_ALREADY_EXISTS instead of hardcoded 1410 value
    * allow to use GTWVT in programs linked as non GUI ones
      (console programs)
This commit is contained in:
Przemyslaw Czerpak
2010-10-22 09:24:34 +00:00
parent d40c77876e
commit ef2d74889f
2 changed files with 11 additions and 2 deletions

View File

@@ -16,6 +16,12 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-10-22 11:24 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/gtwvt/gtwvt.c
! use ERROR_CLASS_ALREADY_EXISTS instead of hardcoded 1410 value
* allow to use GTWVT in programs linked as non GUI ones
(console programs)
2010-10-22 01:39 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtcore/g/HBQString.cpp
* contrib/hbqt/qtcore/g/QAbstractItemModel.cpp

View File

@@ -148,7 +148,7 @@ static void hb_gt_wvt_RegisterClass( HINSTANCE hInstance )
if( ! RegisterClass( &wndclass ) )
{
if( GetLastError() != 1410 )
if( GetLastError() != ERROR_CLASS_ALREADY_EXISTS )
hb_errInternal( 10001, "Failed to register WVT window class", NULL, NULL );
}
}
@@ -1882,7 +1882,10 @@ static void hb_gt_wvt_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_wvt_Init(%p,%p,%p,%p)", pGT, ( void * ) ( HB_PTRDIFF ) hFilenoStdin, ( void * ) ( HB_PTRDIFF ) hFilenoStdout, ( void * ) ( HB_PTRDIFF ) hFilenoStderr ) );
if( ! hb_winmainArgGet( &hInstance, NULL, &iCmdShow ) )
hb_errInternal( 10001, "It's not a GUI program", NULL, NULL );
{
hInstance = GetModuleHandle( NULL );
iCmdShow = 1;
}
pWVT = hb_gt_wvt_New( pGT, ( HINSTANCE ) hInstance, iCmdShow );
if( !pWVT )