-
July 19th, 2006, 09:18 AM
#1
Wm_erasebkgnd
I wrote:
>>CPaintdc dc(this);//in a function of mydialog
>>SendMessage(WM_ERASEBKGND,(WPARAM)dc,0)
but the background of my dialog doesn't erase...
Can someone tell me what's wrong?
Thank you,
Isabella
-
July 19th, 2006, 09:41 AM
#2
Re: Wm_erasebkgnd
You should call InvalidateRect to tell window to repaint and erase background.
Code:
RECT rect;
/// fill out parameters in rect to specify which rectangle on the window to mark for repaint,
// passing NULL would invalidate complete window
// second parameter is to tell whether to erase background or not.
myView->InvalidateRect(NULL, TRUE);
Or
::InvalidateRect(hWnd, &rect,TRUE);
Regards,
Ramkrishna Pawar
-
July 19th, 2006, 09:43 AM
#3
Re: Wm_erasebkgnd
WM_ERASEBKGND is notification sent to your window when the background must be erased, you should not "Send" this message to force background erase.
Regards,
Ramkrishna Pawar
-
July 19th, 2006, 10:39 AM
#4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|