diff --git a/harbour/ChangeLog b/harbour/ChangeLog index bf6121f95b..4a277a4d78 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,17 @@ The license applies to all entries newer than 2009-04-28. */ +2012-01-02 22:29 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * harbour/contrib/gtwvg/wvgutils.c + * harbour/contrib/gtwvg/wvgwing.c + * eliminated HB_TCHAR_*() macros + ; TOFIX: replace hb_parvc() and nCopyAnsiToWideChar() function + with valid HB_STR* macros. + Function nCopyAnsiToWideChar() should be removed. + + * harbour/contrib/xhb/xhw32prn.prg + ! added missing ; + 2012-01-02 21:38 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * harbour/include/hbapistr.h * harbour/src/vm/strapi.c diff --git a/harbour/contrib/gtwvg/wvgutils.c b/harbour/contrib/gtwvg/wvgutils.c index 2afd8cae8b..13be9b44ad 100644 --- a/harbour/contrib/gtwvg/wvgutils.c +++ b/harbour/contrib/gtwvg/wvgutils.c @@ -301,7 +301,7 @@ HB_FUNC( WVT_SETTOOLTIP ) if( SendMessage( _s->hWndTT, TTM_GETTOOLINFO, 0, ( LPARAM ) &ti ) ) { - LPTSTR text = HB_TCHAR_CONVTO( hb_parc( 5 ) ); + void * hText; xy = hb_wvt_gtGetXYFromColRow( hb_parni( 2 ), hb_parni( 1 ) ); iTop = xy.y; @@ -311,7 +311,7 @@ HB_FUNC( WVT_SETTOOLTIP ) iBottom = xy.y - 1; iRight = xy.x - 1; - ti.lpszText = text; + ti.lpszText = ( LPTSTR ) HB_PARSTR( 5, &hText, NULL ); ti.rect.left = iLeft; ti.rect.top = iTop; ti.rect.right = iRight; @@ -319,7 +319,7 @@ HB_FUNC( WVT_SETTOOLTIP ) SendMessage( _s->hWndTT, TTM_SETTOOLINFO, 0, ( LPARAM ) &ti ); - HB_TCHAR_FREE( text ); + hb_strfree( hText ); } } @@ -328,19 +328,19 @@ HB_FUNC( WVT_SETTOOLTIP ) HB_FUNC( WVT_SETTOOLTIPTEXT ) { PHB_GTWVT _s = hb_wvt_gtGetWVT(); - TOOLINFO ti; + memset( &ti, 0, sizeof( ti ) ); ti.cbSize = sizeof( TOOLINFO ); ti.hwnd = _s->hWnd; ti.uId = 100000; if( SendMessage( _s->hWndTT, TTM_GETTOOLINFO, 0, ( LPARAM ) &ti ) ) { - LPTSTR text = HB_TCHAR_CONVTO( hb_parc( 1 ) ); - ti.lpszText = text; + void * hText; + ti.lpszText = ( LPTSTR ) HB_PARSTR( 1, &hText, NULL ); SendMessage( _s->hWndTT, TTM_UPDATETIPTEXT, 0, ( LPARAM ) &ti ); - HB_TCHAR_FREE( text ); + hb_strfree( hText ); } } diff --git a/harbour/contrib/gtwvg/wvgwing.c b/harbour/contrib/gtwvg/wvgwing.c index 91196188e6..17998fe023 100644 --- a/harbour/contrib/gtwvg/wvgwing.c +++ b/harbour/contrib/gtwvg/wvgwing.c @@ -684,7 +684,7 @@ HB_FUNC( WVG_TREEVIEW_GETSELECTIONINFO ) HB_FUNC( WVG_TREEVIEW_ADDITEM ) { TVINSERTSTRUCT tvis; - LPTSTR text = HB_TCHAR_CONVTO( hb_parcx( 3 ) ); + void * hText; tvis.hInsertAfter = TVI_LAST; HB_WIN_V_UNION( tvis, item.mask ) = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_STATE; @@ -695,11 +695,11 @@ HB_FUNC( WVG_TREEVIEW_ADDITEM ) HB_WIN_V_UNION( tvis, item.state ) = 0; /* TVI_BOLD */ tvis.hParent = HB_ISNUM( 2 ) ? ( HTREEITEM ) wvg_parhandle( 2 ) : NULL; - HB_WIN_V_UNION( tvis, item.pszText ) = text; + HB_WIN_V_UNION( tvis, item.pszText ) = ( LPTSTR ) HB_PARSTRDEF( 3, &hText, NULL ); hb_retnint( ( HB_PTRDIFF ) TreeView_InsertItem( wvg_parhwnd( 1 ), &tvis ) ); - HB_TCHAR_FREE( text ); + hb_strfree( hText ); } /*----------------------------------------------------------------------*/ @@ -959,10 +959,12 @@ HB_FUNC( WVG_FONTCREATE ) { LOGFONT lf; HFONT hFont; + void * hText; memset( &lf, 0, sizeof( lf ) ); - HB_TCHAR_COPYTO( lf.lfFaceName, hb_parvcx( 1, 1 ), HB_SIZEOFARRAY( lf.lfFaceName ) - 1 ); + HB_STRNCPY( lf.lfFaceName, HB_PARASTRDEF( 1, 1, &hText, NULL ), + HB_SIZEOFARRAY( lf.lfFaceName ) - 1 ); lf.lfHeight = ( LONG ) hb_parvnl( 1, 2 ); lf.lfWidth = ( LONG ) hb_parvnl( 1, 3 ); @@ -1222,7 +1224,6 @@ HB_FUNC( WVG_CREATETOOLTIPWINDOW ) { HWND hwndTip; TOOLINFO toolInfo; - LPTSTR pszText = HB_TCHAR_CONVTO( "" ); hwndTip = CreateWindowEx( ( DWORD ) NULL, TOOLTIPS_CLASS, NULL, WS_POPUP |TTS_ALWAYSTIP, // | TTS_BALLOON, @@ -1233,18 +1234,17 @@ HB_FUNC( WVG_CREATETOOLTIPWINDOW ) if( ! hwndTip ) return; + memset( &toolInfo, 0, sizeof( toolInfo ) ); toolInfo.cbSize = sizeof( toolInfo ); toolInfo.hwnd = ( HWND ) wvg_parhwnd( 1 ); toolInfo.uFlags = TTF_IDISHWND | TTF_SUBCLASS; toolInfo.uId = ( UINT_PTR ) ( HWND ) wvg_parhwnd( 1 ); - toolInfo.lpszText = pszText; + toolInfo.lpszText = ( LPTSTR ) TEXT( "" ); if( SendMessage( hwndTip, TTM_ADDTOOL, 0, ( LPARAM ) &toolInfo ) ) wvg_rethandle( hwndTip ); else wvg_rethandle( NULL ); - - HB_TCHAR_FREE( pszText ); } /*----------------------------------------------------------------------*/ @@ -1252,17 +1252,18 @@ HB_FUNC( WVG_CREATETOOLTIPWINDOW ) HB_FUNC( WVG_SETTOOLTIPTEXT ) { TOOLINFO toolInfo; - LPTSTR pszText = HB_TCHAR_CONVTO( hb_parcx( 3 ) ); + void * hText; + memset( &toolInfo, 0, sizeof( toolInfo ) ); toolInfo.cbSize = sizeof( toolInfo ); toolInfo.hwnd = ( HWND ) wvg_parhwnd( 1 ); toolInfo.uFlags = TTF_IDISHWND | TTF_SUBCLASS; toolInfo.uId = ( UINT_PTR ) ( HWND ) wvg_parhwnd( 1 ); - toolInfo.lpszText = pszText; + toolInfo.lpszText = ( LPTSTR ) HB_PARSTRDEF( 3, &hText, NULL ); SendMessage( wvg_parhwnd( 2 ), TTM_SETTOOLINFO, ( WPARAM ) 0, ( LPARAM ) &toolInfo ); - HB_TCHAR_FREE( pszText ); + hb_strfree( hText ); } /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/xhb/xhw32prn.prg b/harbour/contrib/xhb/xhw32prn.prg index 058706da20..4d69c6ac02 100644 --- a/harbour/contrib/xhb/xhw32prn.prg +++ b/harbour/contrib/xhb/xhw32prn.prg @@ -127,7 +127,7 @@ METHOD TextAtFont( nPosX, nPosY, cString, cFont, nPointSize, ; RETURN ::WIN_PRN:TextAtFont( nPosX, nPosY, cString, cFont, nPointSize, ; nWidth, nBold, lUnderLine, lItalic, lNewLine, ; - lUpdatePosX, nColor, + lUpdatePosX, nColor, ; HB_BITOR( nAlignHori, nAlignVert ) ) CREATE CLASS Win32Bmp FROM WIN_BMP