Hai,
my requirement is to draw a line over a bitmap loaded into memory. i am working in WinCE. The code i wrote is like this,
HGDIOBJ hPrevObj = 0;
HGDIOBJ hPrevObj1 = 0;
BOOL bStat = 0;
dwError = ::GetLastError();
hDCMem = ::CreateCompatibleDC( g_dc );
dwError = ::GetLastError();
SelectObject( hDCMem, g_hBitmap );
dwError = 0;
dwError = ::GetLastError();
SelectObject( hDCMem, g_hPen );
dwError = 0;
dwError = ::GetLastError();
bStat = MoveToEx( hDCMem, g_X, g_Y, 0 );
dwError = ::GetLastError();
bStat = 0;
g_X+= 10;
g_Y += 10;
bStat = LineTo( hDCMem, g_X, g_Y );
dwError = 0;
dwError = ::GetLastError();
bStat = 0;
//bStat = BitBlt( hDC, 0, 0, 240, 82, hDCMem, 0, 0, SRCCOPY );
bStat = StretchBlt( g_dc, 0, 0, 240, 82, hDCMem, 0, 0, 240, 82, SRCCOPY );
dwError = ::GetLastError();
The problem i am facing is that the line drawing function and BitBlt() function returns success but it is not getting reflected on the window or the loaded bit map.