Hmm, I did what you suggested and it creates the white box just like I want. Then I do something like this:
Code:
CDC *myDC = GetDlgItem(IDC_DRAWBOX)->GetDC();
myDC->Rectangle(10, 10, 20, 20);
And it doesn't seem to draw anything. If I overwrite the view's OnDraw function, I can do something like this:
Code:
void CDrawView::OnDraw(CDC* pDC)
{
pDC->Rectangle(10, 10, 20, 20);
}
And it draws on the main window. But I want to draw in the picture box. But using the picture box's dc doesn't seem to draw anything. Is there some update function or something I'm supposed to use? Or some way to make the pDC draw in the correct spot?