Advertisement

Calling Functions

Started by March 02, 2002 07:07 PM
6 comments, last by Scott_U 22 years, 6 months ago
Hello. I was wondering if it was possible to call a function using input. Also, if it is possible could someone post an example or link me to a good site? Thank you very much. Scott_U
what kind of input? keyboard, mouse, joystick, microphone, infra-red , file, pipe, socket?
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
Advertisement
Keyboard, sorry for not explaining...
um... which OS? I''ll assume C/C++
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
Again, sorry, but yes, Dev-C++...
Ok - Windows then. Do you mean hotkeys? If so look for info on AcceleratorTables. There are several messages to consider handling: WM_KEYDOWN, WM_SYSKEYDOWN, WM_KEYUP, WM_SYSKEYUP and more - and the associated key codes that go along with those. Other useful apis are GetKeyState, GetAsyncKeyState, GetKeyboardState and more. There also is Direct Input. There are several different possibilities for handling keyboard input. Sorry I can''t be more specific.
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
Advertisement
:|...What? Thanks for your help. I found an example thought. I appreciate you trying...
Glad to hear that you found something. The question seems so simple, but there are so many ways to approach it that I thought it would be best to through out decent keywords and such.
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man

This topic is closed to new replies.

Advertisement