Click to See Complete Forum and Search --> : WM_DRAWITEM never called
Zolix2010
September 21st, 2005, 10:54 AM
hi,
i created a window and in the WM_CREATE created a button.
when the button style is PUSH_BUTTON i see it. but when it's ownerdraw WM_DRAWITEM never called and i cant catch the event to draw the button.
what to do? :eek:
Avi.
kkez
September 21st, 2005, 11:26 AM
Can't guess, let us see some code..
Runt888
September 21st, 2005, 03:28 PM
Other than specifying BS_OWNERDRAW as the style, there's not too much you can have wrong. One thing that always messes me up is that the WM_DRAWITEM message is sent to the parent, so make sure you're capturing it there, and not from the child.
Like kkez said, some code would help.
Kelly
Zolix2010
September 22nd, 2005, 01:20 AM
well i found my problem(s):
1. BS_OWNERDRAW should be with ws_visible and ws_child
- visible for to see it and need to draw it (DRAWITEM it)
- child for the parent window to catch the DRAWITEM.
2. my class destructed in the first wm_drawitem event bcuz of a bug (pointer that got out of order)
thanks for your attantion :)
Avi.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.