From 9525224f03faf2983cc28b46c9c043f91dbade03 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Thu, 18 Sep 2014 00:27:42 -0700 Subject: [PATCH] 2014-09-18 00:23 UTC-0800 Pritpal Bedi (bedipritpal/at/hotmail.com) * contrib/gtwvg/gtwgud.c + Added: hb_gtInfo( HB_GTI_SETPOS_XY, { nRow|nX, nCol|nY } ) in addition to previous implementation. --- ChangeLog.txt | 5 +++++ contrib/gtwvg/gtwgud.c | 20 ++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 53096ed185..b05fb11212 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,11 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2014-09-18 00:23 UTC-0800 Pritpal Bedi (bedipritpal/at/hotmail.com) + * contrib/gtwvg/gtwgud.c + + Added: hb_gtInfo( HB_GTI_SETPOS_XY, { nRow|nX, nCol|nY } ) + in addition to previous implementation. + 2014-09-17 14:50 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/gtwvg/wvtwin.ch + Added: more WAPI constants. diff --git a/contrib/gtwvg/gtwgud.c b/contrib/gtwvg/gtwgud.c index fd11742d43..4ea819d913 100644 --- a/contrib/gtwvg/gtwgud.c +++ b/contrib/gtwvg/gtwgud.c @@ -1650,6 +1650,8 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) case HB_GTI_SETPOS_ROWCOL: if( pWVT->hWnd ) { + int i1 = -1; + int i2 = -1; RECT rect = { 0, 0, 0, 0 }; GetWindowRect( pWVT->hWnd, &rect ); @@ -1669,18 +1671,28 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) if( ( hb_itemType( pInfo->pNewVal ) & HB_IT_NUMERIC ) && ( hb_itemType( pInfo->pNewVal2 ) & HB_IT_NUMERIC ) ) + { + i1 = hb_itemGetNI( pInfo->pNewVal ); + i2 = hb_itemGetNI( pInfo->pNewVal2 ); + } + else if( hb_itemType( pInfo->pNewVal ) & HB_IT_ARRAY ) + { + i1 = hb_arrayGetNI( pInfo->pNewVal, 1 ); + i2 = hb_arrayGetNI( pInfo->pNewVal, 2 ); + } + if( i1 >= -1 && i2 >= -1 ) { int x, y; if( iType == HB_GTI_SETPOS_ROWCOL ) { - y = hb_itemGetNI( pInfo->pNewVal ) * pWVT->fontHeight; - x = hb_itemGetNI( pInfo->pNewVal2 ) * pWVT->fontWidth; + y = i1 * pWVT->fontHeight; + x = i2 * pWVT->fontWidth; } else { - x = hb_itemGetNI( pInfo->pNewVal ); - y = hb_itemGetNI( pInfo->pNewVal2 ); + x = i1; + y = i2; } hb_retl( SetWindowPos( pWVT->hWnd, NULL, x,