make your own hotkeys?
hello all, im a newb and i was wondering how i would put output from programs to the computer as if i had typed the character myself, not just out put to the screen like cout << "not on the screen" << endl; im looking to make my own hotkeys so i can change the volume whil im in one of my games, or if any of you play counter strike make my own buy script.
my email addy is firstname.lastname@example.org
so you want to be able to press a key from inside your program that will change the volume?
1. write some code that will check for the key specified using getchar(),fgetc(), etc.
2. go to MSDN and look up on multimedia functions. Insert desired code to execute after detection of specified key. This code should basically be an increment to the current volume, which will probably be in hex, so it might take two or three lines, unless the ++ operator will handle-I've never tried but it might work, and then the volumeIncrease function or whatever that passes a handle to the sound device and the new volume.