I am trying to paint individual pixels in a dialog on mouse messages. I have a picture control in the dialog of type rectangle where I am displaying bitmaps. I want to be able to paint over part of these bitmaps by directly setting pixels in the dialog. I have tried simple code like this:
// get a device context for the rectangle area
CWnd* pWnd = GetDlgItem(IDC_RECTANGLE_CONTROL);
CDC* pDC = pWnd->GetDC();
// now paint the pixel white where the mouse is
COLORREF colorOutline = 0x00ffffff;
// release the device context
Am I missing something?? this seems like a simple task.