krompo
January 19th, 2005, 07:43 AM
hi everyone!
Could somebody help? I have an app wizard generated dialog based app. I want to be able to catch keyboard presses similiar (or the same way) as it is done in a standard SDI/MDI MFC generated app. So for instance, if a user presses (while over/in my dialog) ctrl-C, I want to be able to know that the user pushed ctrl-C so I can handle it.
Since standard dialogs do not have accelerator tables, how to accomplish this task in a dialog? I tried to override PreTranslateMessage (so I can catch the 'c' pressed by intercepting WM_CHAR) but have no idea how to find out whether the CTRL key was pressed as well. please help.
thanks,
krompo
Could somebody help? I have an app wizard generated dialog based app. I want to be able to catch keyboard presses similiar (or the same way) as it is done in a standard SDI/MDI MFC generated app. So for instance, if a user presses (while over/in my dialog) ctrl-C, I want to be able to know that the user pushed ctrl-C so I can handle it.
Since standard dialogs do not have accelerator tables, how to accomplish this task in a dialog? I tried to override PreTranslateMessage (so I can catch the 'c' pressed by intercepting WM_CHAR) but have no idea how to find out whether the CTRL key was pressed as well. please help.
thanks,
krompo