From 9ae8cd0497f97cc78d1115b7c3d51247510db404 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Sat, 21 Feb 2009 21:01:51 +0000 Subject: [PATCH] 2009-02-21 13:00 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * harbour/contrib/gtwvg/wvgsink.c * harbour/contrib/gtwvg/wvgutils.c * harbour/contrib/gtwvg/wvgwin.c ! Pacified more warnings on 64bits. --- harbour/ChangeLog | 6 ++++++ harbour/contrib/gtwvg/wvgsink.c | 10 +++++++--- harbour/contrib/gtwvg/wvgutils.c | 3 +-- harbour/contrib/gtwvg/wvgwin.c | 20 ++++++++++++-------- 4 files changed, 26 insertions(+), 13 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index e96f310000..03c9340288 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-02-21 13:00 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * harbour/contrib/gtwvg/wvgsink.c + * harbour/contrib/gtwvg/wvgutils.c + * harbour/contrib/gtwvg/wvgwin.c + ! Pacified more warnings on 64bits. + 2009-02-21 19:31 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * bin/hb-func.sh * harbour.spec diff --git a/harbour/contrib/gtwvg/wvgsink.c b/harbour/contrib/gtwvg/wvgsink.c index 833b487a62..5cee54f21c 100644 --- a/harbour/contrib/gtwvg/wvgsink.c +++ b/harbour/contrib/gtwvg/wvgsink.c @@ -802,7 +802,6 @@ HB_FUNC( HB_AX_ATLAXCREATECONTROL ) UINT uLen; PATLAXCREATECONTROL AtlAxCreateControl; HWND hContainer = NULL; - RECT rc; char *class = hb_parc( 1 ); HWND hParent = ( HWND ) ( HB_PTRDIFF ) hb_parnint( 2 ); char *Caption = ISNIL( 4 ) ? "" : hb_parc( 3 ); @@ -860,13 +859,18 @@ HB_FUNC( HB_AX_ATLAXCREATECONTROL ) hb_retnint( ( HB_PTRDIFF ) obj ); #if 0 - GetClientRect( hContainer, &rc ); - MoveWindow( GetDlgItem( hContainer, ( int ) id ), 0, 0, rc.right-rc.left, rc.bottom-rc.top, TRUE ); + { + RECT rc; + GetClientRect( hContainer, &rc ); + MoveWindow( GetDlgItem( hContainer, ( int ) id ), 0, 0, rc.right-rc.left, rc.bottom-rc.top, TRUE ); + } #endif } #else if( pUnkCtrl ) { + RECT rc; + pUnkCtrl->lpVtbl->QueryInterface( pUnkCtrl, &IID_IDispatch, ( void** ) (void*) &obj ); pUnkCtrl->lpVtbl->Release( pUnkCtrl ); hb_retnint( ( long ) obj ); diff --git a/harbour/contrib/gtwvg/wvgutils.c b/harbour/contrib/gtwvg/wvgutils.c index 0710a8aa0c..44a8a50687 100644 --- a/harbour/contrib/gtwvg/wvgutils.c +++ b/harbour/contrib/gtwvg/wvgutils.c @@ -1260,8 +1260,7 @@ HB_FUNC( WVT__MAKEDLGTEMPLATE ) p = lpwAlign( p ); - //hb_retclen( ( LPSTR ) pdlgtemplate, ( ( HB_PTRDIFF ) p - ( HB_PTRDIFF ) pdlgtemplate ) ) ; - hb_retclen( ( LPSTR ) pdlgtemplate, ( ( WORD ) p - ( WORD ) pdlgtemplate ) ) ; + hb_retclen( ( LPSTR ) pdlgtemplate, ( ( HB_PTRDIFF ) p - ( HB_PTRDIFF ) pdlgtemplate ) ) ; LocalFree( LocalHandle( pdlgtemplate ) ); } diff --git a/harbour/contrib/gtwvg/wvgwin.c b/harbour/contrib/gtwvg/wvgwin.c index 28d87b7729..3195a42204 100644 --- a/harbour/contrib/gtwvg/wvgwin.c +++ b/harbour/contrib/gtwvg/wvgwin.c @@ -918,7 +918,7 @@ HB_FUNC( WIN_CREATETOOLBAREX ) HWND hWnd; hWnd = CreateToolbarEx( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ), - ( HB_PTRDIFF ) hb_parnint( 2 ), + ( DWORD ) hb_parnint( 2 ), hb_parni( 3 ), hb_parni( 4 ), ISNIL( 5 ) ? NULL : ( HINSTANCE ) ( HB_PTRDIFF ) hb_parnint( 5 ), @@ -1414,7 +1414,7 @@ HB_FUNC( WIN_SETWNDPROC ) #if (defined(_MSC_VER) && (_MSC_VER <= 1200 || defined(HB_OS_WIN_CE)) || defined(__DMC__)) && !defined(HB_ARCH_64BIT) oldProc = ( WNDPROC ) SetWindowLong( hWnd, GWL_WNDPROC, ( long ) wndProc ) ; #else - oldProc = ( WNDPROC ) SetWindowLongPtr( hWnd, GWLP_WNDPROC, ( long ) wndProc ) ; + oldProc = ( WNDPROC ) SetWindowLongPtr( hWnd, GWLP_WNDPROC, ( HB_PTRDIFF ) wndProc ) ; #endif hb_retnint( ( HB_PTRDIFF ) oldProc ); @@ -1471,7 +1471,7 @@ HB_FUNC( WVG_GETNMMOUSEINFO ) hb_arraySetNI( pEvParams , 1, nmh.code ); hb_arraySetNInt( pEvParams, 2, ( HB_PTRDIFF ) nmh.idFrom ); hb_arraySetNInt( pEvParams, 3, ( HB_PTRDIFF ) nmh.hwndFrom ); - hb_arraySetNL( pEvParams , 4, nmm->dwItemSpec ); + hb_arraySetNInt( pEvParams, 4, ( HB_PTRDIFF ) nmm->dwItemSpec );//hb_arraySetNL( pEvParams , 4, nmm->dwItemSpec ); hb_itemReturnRelease( pEvParams ); } @@ -2118,7 +2118,11 @@ HB_FUNC( WVG_ADDTOOLBARBUTTON ) // set bitmap // tbab.hInst = NULL; +#if (_WIN32_IE >= 0x0500) + tbab.nID = wapi_par_HBITMAP( 2 ); +#else tbab.nID = ( UINT ) wapi_par_HBITMAP( 2 ); +#endif iNewBitmap = ( int ) SendMessage( hWndTB, TB_ADDBITMAP, ( WPARAM ) 1, ( LPARAM ) &tbab ); // set string @@ -2181,14 +2185,14 @@ HB_FUNC( WIN_SENDTOOLBARMESSAGE ) case TB_ADDBITMAP : { TBADDBITMAP tbab; - int iBitmap; tbab.hInst = NULL; +#if (_WIN32_IE >= 0x0500) + tbab.nID = wapi_par_HBITMAP( 3 ); +#else tbab.nID = ( UINT ) wapi_par_HBITMAP( 3 ); - - iBitmap = SendMessage( hTB, TB_ADDBITMAP, ( WPARAM ) 1, ( LPARAM ) &tbab ); - - wapi_ret_NI( iBitmap ); +#endif + wapi_ret_NI( ( int ) SendMessage( hTB, TB_ADDBITMAP, ( WPARAM ) 1, ( LPARAM ) &tbab ) ); } break; case TB_ADDBUTTONS :