diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1fd980d3af..7daa23e0a8 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,11 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-07-01 22:10 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * source/rtl/gtwvt/gtwvt.c + * contrib/gtwvg/gtwvg.c + ! Fixed MSVC warnings. + 2008-07-01 21:33 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * contrib/hbwhat32/_winmmcap.c ! #include -> #include "hbapi.h" diff --git a/harbour/contrib/gtwvg/gtwvg.c b/harbour/contrib/gtwvg/gtwvg.c index a58f3c578d..71b34885bf 100644 --- a/harbour/contrib/gtwvg/gtwvg.c +++ b/harbour/contrib/gtwvg/gtwvg.c @@ -517,13 +517,14 @@ static void hb_gt_wvt_ResetWindowSize( PHB_GTWVT pWVT ) static void hb_gt_wvt_FitSize( PHB_GTWVT pWVT ) { - RECT wi, ci; - LONG maxWidth; - LONG maxHeight; - LONG borderWidth; - LONG borderHeight; - SHORT left; - SHORT top; + RECT wi; + RECT ci; + int maxWidth; + int maxHeight; + int borderWidth; + int borderHeight; + int left; + int top; GetClientRect( pWVT->hWnd, &ci ); GetWindowRect( pWVT->hWnd, &wi ); @@ -551,8 +552,11 @@ static void hb_gt_wvt_FitSize( PHB_GTWVT pWVT ) } { - HFONT hOldFont, hFont; - USHORT fontHeight, fontWidth, n; + HFONT hOldFont; + HFONT hFont; + int fontHeight; + int fontWidth; + int n; fontHeight = maxHeight / pWVT->ROWS; fontWidth = maxWidth / pWVT->COLS; @@ -561,7 +565,8 @@ static void hb_gt_wvt_FitSize( PHB_GTWVT pWVT ) if( hFont ) { HDC hdc; - LONG width, height; + LONG width; + LONG height; TEXTMETRIC tm; hdc = GetDC( pWVT->hWnd ); @@ -861,7 +866,7 @@ static void hb_gt_wvt_MouseEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, L { ULONG ulSize; - USHORT irow, icol, j, top, left, bottom, right; + int irow, icol, j, top, left, bottom, right; char * sBuffer; RECT rect = { 0, 0, 0, 0 }; RECT colrowRC = { 0, 0, 0, 0 }; @@ -887,6 +892,7 @@ static void hb_gt_wvt_MouseEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, L { BYTE bColor, bAttr; USHORT usChar; + if( !HB_GTSELF_GETSCRCHAR( pWVT->pGT, irow, icol, &bColor, &bAttr, &usChar ) ) break; diff --git a/harbour/source/rtl/gtwvt/gtwvt.c b/harbour/source/rtl/gtwvt/gtwvt.c index 811b322de6..0b131e1c30 100644 --- a/harbour/source/rtl/gtwvt/gtwvt.c +++ b/harbour/source/rtl/gtwvt/gtwvt.c @@ -474,13 +474,14 @@ static void hb_gt_wvt_ResetWindowSize( PHB_GTWVT pWVT ) static void hb_gt_wvt_FitSize( PHB_GTWVT pWVT ) { - RECT wi, ci; - LONG maxWidth; - LONG maxHeight; - LONG borderWidth; - LONG borderHeight; - SHORT left; - SHORT top; + RECT wi; + RECT ci; + int maxWidth; + int maxHeight; + int borderWidth; + int borderHeight; + int left; + int top; GetClientRect( pWVT->hWnd, &ci ); GetWindowRect( pWVT->hWnd, &wi ); @@ -508,8 +509,11 @@ static void hb_gt_wvt_FitSize( PHB_GTWVT pWVT ) } { - HFONT hOldFont, hFont; - USHORT fontHeight, fontWidth, n; + HFONT hOldFont; + HFONT hFont; + int fontHeight; + int fontWidth; + int n; fontHeight = maxHeight / pWVT->ROWS; fontWidth = maxWidth / pWVT->COLS; @@ -518,7 +522,8 @@ static void hb_gt_wvt_FitSize( PHB_GTWVT pWVT ) if( hFont ) { HDC hdc; - LONG width, height; + LONG width; + LONG height; TEXTMETRIC tm; hdc = GetDC( pWVT->hWnd ); @@ -804,7 +809,7 @@ static void hb_gt_wvt_MouseEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, L { ULONG ulSize; - USHORT irow, icol, j, top, left, bottom, right; + int irow, icol, j, top, left, bottom, right; char * sBuffer; RECT rect = { 0, 0, 0, 0 }; RECT colrowRC = { 0, 0, 0, 0 }; @@ -830,6 +835,7 @@ static void hb_gt_wvt_MouseEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, L { BYTE bColor, bAttr; USHORT usChar; + if( !HB_GTSELF_GETSCRCHAR( pWVT->pGT, irow, icol, &bColor, &bAttr, &usChar ) ) break;