How to pro-grammatically get list of accelerators used in the application from resource file?

  • Thread starter Thread starter sgrm123
  • Start date Start date
S

sgrm123

Guest
Hi,

I have list of accelerators in the accelerator table and I am using accelerators in the controls also using amber-stand. How to pro-grammatically get list of accelerators used in the application from resource file?

My requirement is whenever I press a key in the keyboard I need to check whether it is a accelerator key or not.


//
// Accelerator
//

IDC_ACC1 ACCELERATORS DISCARDABLE
BEGIN
"/", IDM_HELP_ABOUT, ASCII, ALT, NOINVERT
VK_F4, IDM_FILE_EXIT, VIRTKEY, ALT, NOINVERT
END




IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 253, 194
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Sans Serif"
BEGIN
CONTROL 114,IDC_STATIC,"Static",SS_BITMAP,0,0,253,178
PUSHBUTTON "&Help",IDC_HELP_BUTTON,109,179,63,14
PUSHBUTTON "&Close",IDC_CLOSE_BUTTON,187,179,63,14
PUSHBUTTON "&Screen Capture",IDC_SCREEN_CAPTURE_BUTTON,31,179,63,14
END

Through these API's EnumResourceTypes(),EnumResourceNames() I can get list list of accerator able resource id. From resource id I can get accelerator key text using below link Extracting Accelerators As Human Readable Text.

But I am unable to get the accelerator details of button with acclerator by using amberstand.how to get it?

Continue reading...
 
Back
Top