From abce362c05f586ebcc6c8a8a8a9aa12b80a5948d Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Mon, 16 Mar 2009 16:41:05 +0000 Subject: [PATCH] 2009-03-16 09:39 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * harbour/contrib/gtwvg/gtwvg.c * harbour/contrib/gtwvg/wincallb.c * harbour/contrib/gtwvg/wvgwin.c ! Fixed MSVC warnings. --- harbour/ChangeLog | 6 ++++++ harbour/contrib/gtwvg/gtwvg.c | 14 +++++++------- harbour/contrib/gtwvg/wincallb.c | 14 +++++++------- harbour/contrib/gtwvg/wvgwin.c | 11 ++++++----- 4 files changed, 26 insertions(+), 19 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f372e6870d..4584168203 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,12 @@ 2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-03-16 09:39 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * harbour/contrib/gtwvg/gtwvg.c + * harbour/contrib/gtwvg/wincallb.c + * harbour/contrib/gtwvg/wvgwin.c + ! Fixed MSVC warnings. + 2009-03-16 09:07 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * harbour/contrib/gtwvg/wvgcuig.c * harbour/contrib/gtwvg/wvgsink.c diff --git a/harbour/contrib/gtwvg/gtwvg.c b/harbour/contrib/gtwvg/gtwvg.c index 05043ccbd7..27424d4fe8 100644 --- a/harbour/contrib/gtwvg/gtwvg.c +++ b/harbour/contrib/gtwvg/gtwvg.c @@ -2346,8 +2346,8 @@ static HWND hb_gt_wvt_CreateWindow( PHB_GTWVT pWVT, BOOL bResizable ) GetClientRect( hWndParent, &rc ); if( pWVT->pPP->bRowCols ) { - pWVT->ROWS = pWVT->pPP->width; - pWVT->COLS = pWVT->pPP->height; + pWVT->ROWS = ( USHORT ) pWVT->pPP->width; + pWVT->COLS = ( USHORT ) pWVT->pPP->height; pt.x = ( rc.right-rc.left + 1 - ( pWVTp->PTEXTSIZE.x * pWVT->COLS ) ) / 2; pt.y = ( rc.bottom-rc.top + 1 - ( pWVTp->PTEXTSIZE.y * pWVT->ROWS ) ) / 2; @@ -2362,8 +2362,8 @@ static HWND hb_gt_wvt_CreateWindow( PHB_GTWVT pWVT, BOOL bResizable ) { if( pWVT->pPP->bRowCols ) { - pWVT->ROWS = pWVT->pPP->width; - pWVT->COLS = pWVT->pPP->height; + pWVT->ROWS = ( USHORT ) pWVT->pPP->width; + pWVT->COLS = ( USHORT ) pWVT->pPP->height; pt.x = ( pWVTp->PTEXTSIZE.x * pWVT->pPP->y ); pt.y = ( pWVTp->PTEXTSIZE.y * pWVT->pPP->x ); @@ -2397,8 +2397,8 @@ static HWND hb_gt_wvt_CreateWindow( PHB_GTWVT pWVT, BOOL bResizable ) pt.x = ( pWVT->PTEXTSIZE.x * pWVT->pPP->y ); pt.y = ( pWVT->PTEXTSIZE.y * pWVT->pPP->x ); - pWVT->ROWS = pWVT->pPP->width; - pWVT->COLS = pWVT->pPP->height; + pWVT->ROWS = ( USHORT ) pWVT->pPP->width; + pWVT->COLS = ( USHORT ) pWVT->pPP->height; } else { @@ -3558,7 +3558,7 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) s_guiData->pfnLayered( pWVT->hWnd, RGB( 255,255,255 ), - hb_itemGetNI( pInfo->pNewVal2 ), + ( BYTE ) hb_itemGetNI( pInfo->pNewVal2 ), /*LWA_COLORKEY|*/ LWA_ALPHA ); } #endif diff --git a/harbour/contrib/gtwvg/wincallb.c b/harbour/contrib/gtwvg/wincallb.c index c29d66e21a..6bc2c2d0b1 100644 --- a/harbour/contrib/gtwvg/wincallb.c +++ b/harbour/contrib/gtwvg/wincallb.c @@ -231,9 +231,9 @@ LRESULT __CallbackDispatcher( PCALLBACKDATA pCallback, ... ) // execute if( pCallback->pSelf ) - hb_vmSend( pCallback->iFormalParams + pCallback->iCargoParams ); + hb_vmSend( ( USHORT ) ( pCallback->iFormalParams + pCallback->iCargoParams ) ); else - hb_vmDo( pCallback->iFormalParams + pCallback->iCargoParams ); + hb_vmDo( ( USHORT ) ( pCallback->iFormalParams + pCallback->iCargoParams ) ); lResult = hb_parnl( -1 ) ; @@ -368,9 +368,9 @@ static LPVOID _GenerateCallback( CALLBACKDATA * pCallback ) iParVal2 = 0x50; for ( i = 1; i <= pCallback->iFormalParams; i++ ) { - pParamData[1] = iParVal1; - pParamData[2] = 0x08 + ( ( pCallback->iFormalParams - i )* 4 ); - pParamData[3] = iParVal2; + pParamData[1] = ( BYTE ) iParVal1; + pParamData[2] = ( BYTE ) ( 0x08 + ( ( pCallback->iFormalParams - i )* 4 ) ); + pParamData[3] = ( BYTE ) iParVal2; memcpy( pMem+iOffset, pParamData, 4 ); iOffset += 4; @@ -386,8 +386,8 @@ static LPVOID _GenerateCallback( CALLBACKDATA * pCallback ) memcpy( pMem+iOffset, pFuncEpilog, 20 ); _udp( pMem, iOffset+1, pCallbackRecord ) ; // update callbackdata pointer _ucp( pMem, iOffset+6, __CallbackDispatcher, iOffset+ 10 ); // update code pointer - pMem[ iOffset+12 ] = 0x08 + ( ( pCallback->iFormalParams - 1 )* 4 ); - pMem[ iOffset+15 ] = pCallback->iFormalParams * 4; + pMem[ iOffset+12 ] = ( BYTE ) ( 0x08 + ( ( pCallback->iFormalParams - 1 )* 4 ) ); + pMem[ iOffset+15 ] = ( BYTE ) ( pCallback->iFormalParams * 4 ); } } return pMem; diff --git a/harbour/contrib/gtwvg/wvgwin.c b/harbour/contrib/gtwvg/wvgwin.c index 3edcb66fa8..0031d30164 100644 --- a/harbour/contrib/gtwvg/wvgwin.c +++ b/harbour/contrib/gtwvg/wvgwin.c @@ -914,7 +914,7 @@ HB_FUNC( WIN_CREATEWINDOWEX ) hb_retnint( ( HB_PTRDIFF ) hWnd ); } //----------------------------------------------------------------------// - +#if 0 HB_FUNC( WIN_CREATETOOLBAREX ) { HWND hWnd; @@ -935,6 +935,7 @@ HB_FUNC( WIN_CREATETOOLBAREX ) hb_retnint( ( HB_PTRDIFF ) hWnd ); } +#endif //----------------------------------------------------------------------// // // Bitmap Management Function . Coutesy GTWVW @@ -1315,7 +1316,7 @@ HB_FUNC( WVG_STATUSBARCREATEPANEL ) iParts = ( int ) SendMessage( hWndSB, SB_GETPARTS, ( WPARAM ) WIN_STATUSBAR_MAX_PARTS, ( LPARAM ) ( LPINT ) ptArray ); GetClientRect( hWndSB, &rc ); - width = ( USHORT ) rc.right / ( iParts + 1 ); + width = ( USHORT ) ( rc.right / ( iParts + 1 ) ); for( n = 0; n < iParts; n++ ) { ptArray[ n ] = ( width * ( n + 1 ) ); @@ -2101,9 +2102,9 @@ HB_FUNC( WIN_SETLAYEREDWINDOWATTRIBUTES ) SetWindowLong( hWnd, GWL_EXSTYLE, GetWindowLong( hWnd, GWL_EXSTYLE ) | WS_EX_LAYERED ); - if( pfnLayered( hWnd, cr, ( BYTE ) hb_parni( 3 ), /*LWA_COLORKEY |*/ LWA_ALPHA ) == 0 ); + if( pfnLayered( hWnd, cr, ( BYTE ) hb_parni( 3 ), /*LWA_COLORKEY |*/ LWA_ALPHA ) == 0 ) { -//hb_ToOutDebug( "ysyysys" ); + /* Just to supress warning */ } } FreeLibrary( h ); @@ -2448,7 +2449,7 @@ LRESULT CALLBACK ControlWindowProcedure( HWND hwnd, UINT msg, WPARAM wParam, LPA hb_vmPushLong( ( HB_PTRDIFF ) wParam ); hb_vmPushLong( ( HB_PTRDIFF ) lParam ); hb_vmDo( 4 ); - lRet = hb_parnint( -1 ); + lRet = ( long ) hb_parnint( -1 ); return lRet; } return DefWindowProc( hwnd, msg, wParam, lParam );