Dear Otto,
Thank you for your kind help. I found the problem now. It is the C Function in new FWH version.
Dear Antonio,
Could you change this function to Backward Compatible by default
width, height := 0
void DrawGray( HDC hdc, HBITMAP hbm, int y, int x, int width, int height )
{
HDC hdcBmp = CreateCompatibleDC( hdc );
HBITMAP hbmOld;
BITMAP bm;
COLORREF TransColor, col;
int i, j, sum;
GetObject( hbm, sizeof( BITMAP ), ( LPSTR ) &bm );
hbmOld = ( HBITMAP ) SelectObject( hdcBmp, hbm );
TransColor = GetPixel( hdcBmp, 0, 0 );
if ( width == 0 ) width = bm.bmWidth;
if ( height == 0 ) height = bm.bmHeight;
for( i = 0; i < width; i++ )
for( j = 0; j < height; j++ )
{
col = GetPixel( hdcBmp, i , j );
if( col != TransColor )
{
sum = GetRValue( col ) / 3 + GetGValue( col ) / 3 + GetBValue( col ) / 3;
if( sum )
{
if( sum < ( 255 - 20 ) )
sum += 20;
else
sum = 255;
}
SetPixel( hdc, i + x, j + y, RGB( sum, sum, sum ) );
}
}
SelectObject( hdcBmp, hbmOld );
DeleteDC( hdcBmp );
}
TSButton use this function in BPAINT.C and missing 2 new parameter.
void DrawGray( HDC hDC, HBITMAP hBmp, signed int iRow, signed int iCol ) ;
I fixed by add 2 new parameter in BPAINT.C
void DrawGray( HDC hDC, HBITMAP hBmp, signed int iRow, signed int iCol, signed int width, signed int height ) ;
..
DrawGray( hDC, hBitMap1, nTop, nLeft ,0 ,0 ) ;
Thank you for everyone.