OnDrawItem question
-
Hello everyone!! I'm using OnDrawItem in a Form to draw some objects. I would like to know how can i recall that function after pressing a button (since the button is owner draw, i would like the user to notice when he is pressing a button). What i really want is to get the LPDRAWITEMSTRUCT struct. How can i do this? Thank you for your time
-
Hello everyone!! I'm using OnDrawItem in a Form to draw some objects. I would like to know how can i recall that function after pressing a button (since the button is owner draw, i would like the user to notice when he is pressing a button). What i really want is to get the LPDRAWITEMSTRUCT struct. How can i do this? Thank you for your time
OnDrawItem()
is passed a pointer to aDRAWITEMSTRUCT
. Check theitemAction
anditemState
members to see if the button is currently pressed. Here's[^] the MSDN link. /ravi Let's put "civil" back in "civilization" http://www.ravib.com ravib@ravib.com -
Hello everyone!! I'm using OnDrawItem in a Form to draw some objects. I would like to know how can i recall that function after pressing a button (since the button is owner draw, i would like the user to notice when he is pressing a button). What i really want is to get the LPDRAWITEMSTRUCT struct. How can i do this? Thank you for your time
I've never done ownerdrawn buttons, but isn't that what
ODS_SELECTED
orODA_SELECT
is for...? If not...I guess you could just check the state of the left mouse button insideDrawItem()
, assuming when you press down on a buttonOnDrawItem()
is fired off Cheers! :) "An expert is someone who has made all the mistakes in his or her field" - Niels Bohr