Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Jocker Zhang
|
Mar 2, 2005 - 9:09 PM
|
I have added a CExtResizableDialog into CExtToolControlBar, But I find it can not trigger OnPaint event when I want to repaint the content of CExtResizableDialog;
|
|
Technical Support
|
Mar 3, 2005 - 5:21 AM
|
You cannot handle the WM_PAINT windows message in the OnPaint() method because it’s intercepted in the WindowProc() virtual method of the resizable dialog’s base type. Please override the WindowProc() virtual method like as follows:LRESULT CYourDialog:WindowProc(
UINT message, WPARAM wParam, LPARAM lParam )
{
switch( message )
{
case WM_PAINT:
{
CPaintDC dc( this );
. . .
}
return 0;
} // switch( message )
return
CExtResizableDialog::WindowProc(
message, wParam, lParam );
} The background of the resizable dialog is painted in the CExtWS::WindowProc() method. You might need to copy some parts of this method into your WM_PAINT handler code.
|
|