LPPICTURE and painting to a control.
I have a question regarding LPPICTURE and painting in a contol in a dialog.
My question, how do I clear the picture in a dialog (erase for the next picture to get drawn? I thought I could do it like so:
Code:
....
InvalidateRect(hctrl, NULL, true);
UpdateWindow(hctrl);
This code seems to have no effect.
Here is screen shot #1 followed by screen shot #2.
How do I go about clearing the control before rendering a new pict?
This is how I render the picture: (code from cprog, code guru and code project):
Code:
gpPicture->Render(hdcCtrl, rect.left, rect.top, rect.right, rect.bottom, 0, hmHeight, hmWidth, -hmHeight, &rc);
ReleaseDC( hctrl, hdcCtrl );
gpPicture->Release();
}
Thank you.
Edit:
It seems like I always have trouble trying to research programming questions on MSDN. Always a bunch of non-existent links:
http://msdn.microsoft.com/en-us/libr...8VS.90%29.aspx
A whole page of links that don't work!