Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
i want to use combination of keys in c++ to pro-from different function
for example when i press "Alt+F4" the program will and if it is posible then please guide me

thanks
Posted
Updated 9-Jun-10 9:05am
v3
Comments
Richard MacCutchan 9-Jun-10 12:52pm    
It looks like part of your question got lost, please try and rewrite to make clear what you are trying to do.

1 solution

You could check for special keys in the keydown event when the required key is pressed.
For example, for Alt+F4, check for VK_F4 in the key down event.
When this key is pressed use GetKeyState(VK_MENU); to check if the Alt key is pressed.
 
Share this answer
 
Comments
Nish Nishant 13-Jul-10 11:14am    
Reason for my vote of 5
Worth 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900