|
|
|
|
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 |
|
Moby Dick
|
Nov 22, 2004 - 6:15 AM
|
Hi, I had a CDialog window which managed the OnPaint event in order to draw an image on the window (using a bitmap would be too high a cost in the EXE file). I modified it by a class CExtWS<CDialog> to give it the ProfUIS style. Since I use the class CExtWS<CDialog>, the OnPaint event of my window is not called any more. I tried to intercept the message using WindowProc without result. Where does the problem come from and how can I solve it ? Thanks, Moby.
|
|
Technical Support
|
Nov 22, 2004 - 8:40 AM
|
You may intercept the WM_PAINT message in the WindowProc virtual method. If you need to redraw the dialog background in the OnPaint method, you should add the code like this to your dialog class:virtual LRESULT WindowProc(
UINT message,
WPARAM wParam,
LPARAM lParam
)
{
if( message == WM_PAINT || message == WM_ERASEBKGND )
return CDialog :: WindowProc( message, wParam, lParam );
return CExtWS < CDialog > :: WindowProc(
message,
wParam,
lParam
);
}
|
|