|
-
June 9th, 1999, 03:19 PM
#1
How do I change button states via SW (rather than mouse)
I want to manipulate the state of a button control (selected, focused, down, deselected) via SW data rather than from a mouse click. I'll liken this to player piano keys moving via the music roll. I need a push in the right direction and any suggestions are appreciated. This is my second request. Someone please respond.
-
June 25th, 1999, 06:46 AM
#2
Re: How do I change button states via SW (rather than mouse)
I guess I have to answer my own question. I figured out that resources can be manipulated to simulate button clicks etc. by sending messages to the resource using the following code:
::SendMessage(GetDlgItem(nButtonID)->m_hWnd, BM_CLICK, TRUE, 0);
and the various button messages. Thanks to myself.
-
June 25th, 1999, 07:30 AM
#3
Re: How do I change button states via SW (rather than mouse)
I have accomplished this using owner draw buttons. In my code, I assigned member variables to the buttons as type CButton, then manually changed them from this to CBitmapButton. This class allows you to load bitmap images that correspond to each button state. Hope this helps. For more info, just email me at [email protected]. I'd be willing to share source code.
Andy
-
June 25th, 1999, 07:36 AM
#4
Re: How do I change button states via SW (rather than mouse)
Deja vu, that's precisely what I did in building my multimedia components. Thanks. I've noted your e-mail and hope you do the same.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|