2008-06-06 23:30 UTC+0800 Pritpal Bedi (pritpal@vouchcac.com

* harbour/source/rtl/gtwvt/gtwvt.c   
     ! hb_gt_wvt_Info() 
       + GTI_SCREENSIZE
         Hb_GtInfo( GTI_SCREENSIZE, { nPxlWidth, nPxlHeight } )
         Try to adjust the mode to rows and columns best fitting nPxlWidth, nPxlHeight.
       + GTI_SETTIMER
         Hb_GtInfo( GTI_SETTIMER, { nTimerId, nMiliSeconds } ) 
       + GTI_KILLTIMER 
         Hb_GtInfo( GTI_KILLTIMER, nTimerId )
This commit is contained in:
Pritpal Bedi
2008-06-07 06:36:28 +00:00
parent 540c753635
commit 0f7aa38d7d
2 changed files with 46 additions and 0 deletions

View File

@@ -8,6 +8,17 @@
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2008-06-06 23:30 UTC+0800 Pritpal Bedi (pritpal@vouchcac.com
* harbour/source/rtl/gtwvt/gtwvt.c
! hb_gt_wvt_Info()
+ GTI_SCREENSIZE
Hb_GtInfo( GTI_SCREENSIZE, { nPxlWidth, nPxlHeight } )
Try to adjust the mode to rows and columns best fitting nPxlWidth, nPxlHeight.
+ GTI_SETTIMER
Hb_GtInfo( GTI_SETTIMER, { nTimerId, nMiliSeconds } )
+ GTI_KILLTIMER
Hb_GtInfo( GTI_KILLTIMER, nTimerId )
2008-06-06 20:45 UTC+0800 Pritpal Bedi (pritpal@vouchcac.com)
* harbour/source/rtl/hbgtcore.c
* harbour/include/hbgtcore.h

View File

@@ -2088,6 +2088,41 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
SetCaretBlinkTime( hb_itemGetNI( pInfo->pNewVal ) );
break;
case GTI_SCREENSIZE:
{
int iX, iY;
RECT rc = {0,0,0,0};
RECT rc1 = {0,0,0,0};
GetWindowRect( pWVT->hWnd, &rc );
if( !pInfo->pResult )
{
pInfo->pResult = hb_itemNew( NULL );
}
hb_arrayNew( pInfo->pResult, 2 );
hb_itemPutNI( hb_arrayGetItemPtr( pInfo->pResult,2 ), pWVT->PTEXTSIZE.y * pWVT->ROWS );
hb_itemPutNI( hb_arrayGetItemPtr( pInfo->pResult,1 ), pWVT->PTEXTSIZE.x * pWVT->COLS );
iY = hb_itemGetNI( hb_arrayGetItemPtr( pInfo->pNewVal,2 ) );
iX = hb_itemGetNI( hb_arrayGetItemPtr( pInfo->pNewVal,1 ) );
if ( iY > 0 )
{
BOOL bOldCentre = pWVT->CentreWindow;
pWVT->CentreWindow = pWVT->bMaximized ? TRUE : FALSE;
HB_GTSELF_SETMODE( pGT, (USHORT) ( iY / pWVT->PTEXTSIZE.y ), (USHORT) ( iX / pWVT->PTEXTSIZE.x ) );
pWVT->CentreWindow = bOldCentre;
}
break;
}
case GTI_SETTIMER:
SetTimer( pWVT->hWnd, hb_arrayGetNI( pInfo->pNewVal,1 ), hb_arrayGetNI( pInfo->pNewVal,2 ), NULL );
break;
case GTI_KILLTIMER:
KillTimer( pWVT->hWnd, hb_itemGetNI( pInfo->pNewVal ) );
break;
default:
return HB_GTSUPER_INFO( pGT, iType, pInfo );
}