Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Owner-draw buttons responding key press???

Status
Not open for further replies.

Vachaun22

Programmer
Oct 7, 2003
171
US
This is probably very simple, but the solution is escaping me.

I have a series of owner-draw buttons that are being drawn when the parent window receives the WM_DRAWITEM message. This all works perfectly fine for clicking on the button.

My question is, how would I get the ownerdraw button to respond to a key press event? For example, if I want a button to respond to the 1 key being pressed.

I am catching the WM_KEYDOWN for the keys I'd like to capture, but I don't know how to make the button press and return to normal with a key press. Any help would be appreciated. Thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top