Archived

This topic is now archived and is closed to further replies.

kuphryn

Virtual Keys :: MFC

Recommended Posts

Hi. I would like to know how to determine when the user presses, say, ''z'' *while* holding down one of the virtual keys, say Ctrl. For example // Ctrl + Z I can use either OnKeyDown(...) and/or OnChar(...) to determine *either* Ctrl or z, but not both. I am trying to implement an "undo" feature. Thanks, Kuphryn

Share this post


Link to post
Share on other sites
My personal solution would be to use GetAsyncKeyState with VK_CONTROL while you process the VK_Z to determine whether or not Ctrl (or shift or anything else for that matter) is being pressed simultaneously.

-fel

Share this post


Link to post
Share on other sites