Hi,
how can i get the whole screen to be repainted?
im just running a little test application which draws an ellipse from one corner of the screen to another when the left mouse button is pressed down and then it tries to invalidate the rect to redraw everthing when the button goes up, but this doesnt work.
The title bar of my program doesnt get drawn again and all the windows in the background dont get redrawn. this is the code ive tried:
void CMainWindow::OnLButtonDown(UINT nFlags, CPoint point)
{
CRect rect;
::GetWindowRect
:GetDesktopWindow(), &rect);
CClientDC dc(NULL);
dc.Ellipse(&rect);
}
void CMainWindow::OnLButtonUp(UINT nFlags, CPoint point)
{
CRect rect;
::GetWindowRect
:GetDesktopWindow(), &rect);
InvalidateRect(&rect);
::InvalidateRect
:GetDesktopWindow(), NULL, TRUE);
}
But that doesnt work, the ellipse is still left on screen (the text printed by OnPaint gets updated, but nothing else)
how can i get the whole screen to be repainted?
im just running a little test application which draws an ellipse from one corner of the screen to another when the left mouse button is pressed down and then it tries to invalidate the rect to redraw everthing when the button goes up, but this doesnt work.
The title bar of my program doesnt get drawn again and all the windows in the background dont get redrawn. this is the code ive tried:
void CMainWindow::OnLButtonDown(UINT nFlags, CPoint point)
{
CRect rect;
::GetWindowRect

CClientDC dc(NULL);
dc.Ellipse(&rect);
}
void CMainWindow::OnLButtonUp(UINT nFlags, CPoint point)
{
CRect rect;
::GetWindowRect

InvalidateRect(&rect);
::InvalidateRect

}
But that doesnt work, the ellipse is still left on screen (the text printed by OnPaint gets updated, but nothing else)