I am having a problem with the BitMapViewer tutorial from: http://sunlightd.virtualave.net/Windows/GUI/
If you take a look at my screen shot, youíll see that the bmp I load into my static group box IDC_VIEW isnít staying within its border it runs on through to the edge of the window.
Looking at the following code I see how it finds the top and left coords but how does it know where the lower left of the view is supposed to be?
void MainDialog_OnPaint(HWND hWnd, HDC hDC)
if (hBitmap == NULL)
GetClientRect(GetDlgItem(hWnd, IDC_VIEW), &r);
p.x = r.left;
p.y = r.top;
ClientToScreen(GetDlgItem(hWnd, IDC_VIEW), &p);
DrawState(hDC, NULL, NULL, (LPARAM)hBitmap, 0, p.x, p.y, 0, 0, DST_BITMAP | DSS_NORMAL);