API + Buttons

Just starting out? Need help? Post your questions and find answers here.
DarthPuff
User
User
Posts: 47
Joined: Sat Apr 26, 2003 2:51 am
Location: USA
Contact:

API + Buttons

Post by DarthPuff »

=\ I was wondering how to use the WinAPI in order to see if a button has been clicked... I'm thinking I need to send it a message then process the PB events... but I dont know quite how...
User avatar
waffle
Enthusiast
Enthusiast
Posts: 129
Joined: Mon May 12, 2003 1:34 pm
Location: USA
Contact:

Post by waffle »

not sure why you need the api to read a button.... maybe you wish to simulate a button press from another app? One way to support that would be to add a keyboard shortcut to a menu item in your "PB app" and then use the SendKeys api function to send a message to your "PB app" which then peform some action when the shortcut key is recieved. The triggered event would be the same as a menu item selection, which could call the button pressed function that you would call in the button pressed event.

hope this gets you looking in the right places for answers. Naturally, I left out stuff like how to locate your app from the window title and exactly what parameters you need, but the help files for the win api should provide that information much better than I can.
DarthPuff
User
User
Posts: 47
Joined: Sat Apr 26, 2003 2:51 am
Location: USA
Contact:

Post by DarthPuff »

=P I need a really reliable way of getting button presses... =\ has to be win api... i guess...
Post Reply