Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Subclassing WM_PAINT of windows controls

4 views
Skip to first unread message

Daniel Kim

unread,
Dec 19, 2008, 12:54:03 AM12/19/08
to
Hi

I have subclassed some of windows controls, such as edit box and combo box.
I did this to modify texts and draw it in my way.
And I found some strange behavior. I have subclassed WM_PAINT message, but
the controls paint strings without WM_PAINT message.
So the modified text-which I did- is drawn, and the original text is drawn,
too.
I have no idea how to handle this. Do you know where those controls draws
texts?

Thanks!

With BR,
Daniel Kim

Norman Bullen

unread,
Dec 19, 2008, 6:34:29 AM12/19/08
to
Daniel Kim wrote:

Controls like the EDIT control are designed with the assumption that
they will receive many more user input messages than WM_PAINT messages.
User input usually changes a small part of the control window (such as a
single character) and it is more efficient to redraw that small part of
the window in the user input message handler rather than the whole
window. WM_PAINT, on the other hand, has to be prepared to redraw the
entire window.

--
Norm

To reply, change domain to an adult feline.

Daniel Kim

unread,
Dec 22, 2008, 11:11:01 PM12/22/08
to
Dear Norman

I guess your explanation makes sense..
Thanks..I need to override whole procedure then.

With BR,
Daniel Kim

0 new messages