From ec338e6fc0bd08df46dc15a2972715dfba5e72e7 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Tue, 17 Jan 2012 00:52:44 +0000 Subject: [PATCH] 2012-01-16 16:50 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/gtwvg/gtwvg.c + Extended: hb_gtInfo( HB_GTI_SPEC, HB_GTS_SETPOSITION, [{x,y}] ) to return the previous window position as {x,y} array. --- harbour/ChangeLog | 5 +++++ harbour/contrib/gtwvg/gtwvg.c | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index de22091122..c09ce75f8a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2012-01-16 16:50 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/gtwvg/gtwvg.c + + Extended: hb_gtInfo( HB_GTI_SPEC, HB_GTS_SETPOSITION, [{x,y}] ) + to return the previous window position as {x,y} array. + 2012-01-16 16:30 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/gtwvg/wvgdatar.prg ! Synchronized: WvgListBox():getData() method. diff --git a/harbour/contrib/gtwvg/gtwvg.c b/harbour/contrib/gtwvg/gtwvg.c index dfcab0eb97..d3dd25fe30 100644 --- a/harbour/contrib/gtwvg/gtwvg.c +++ b/harbour/contrib/gtwvg/gtwvg.c @@ -3660,10 +3660,16 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) case HB_GTS_SETPOSITION: { + RECT rect = { 0,0,0,0 }; + GetWindowRect( pWVT->hWnd, &rect ); + + pInfo->pResult = hb_itemNew( NULL ); + hb_arrayNew( pInfo->pResult, 2 ); + hb_arraySetNI( pInfo->pResult, 1, rect.left ); + hb_arraySetNI( pInfo->pResult, 2, rect.top ); + if( pWVT->hWnd && ( hb_itemType( pInfo->pNewVal2 ) & HB_IT_ARRAY ) ) { - RECT rect = { 0,0,0,0 }; - GetWindowRect( pWVT->hWnd, &rect ); hb_retl( SetWindowPos( pWVT->hWnd, NULL, hb_arrayGetNI( pInfo->pNewVal2, 1 ), hb_arrayGetNI( pInfo->pNewVal2, 2 ),