在一个按钮名称后用(&+字母)结尾就可以产生一个alt+该字母的热键,如有个按钮名叫  我的按钮(&a) 就可以使用热键alt+a来响应这个按钮的单击事件。请问系统是怎么做的,就是通过哪些函数,响应什么消息?
当焦点在主对话框上后,用这个方法现在子对话框上产生的热键就失效了...等待解决...

解决方案 »

  1.   

    这个好像是【对话框窗口类】内定的,不需要应用程序处理。【对话框窗口类】是Windows提供的标准窗口类,它封装了很多东西。以上只是猜测,具体没有研究过。
      

  2.   

    PreTranslateMessage->PreTranslateInput->IsDialogMessageWhen IsDialogMessage processes a message, it checks for keyboard messages and converts them into selection commands for the corresponding dialog box. For example, the tab key, when pressed, selects the next control or group of controls, and the down arrow key, when pressed, selects the next control in a group.参看 MSDN的IsDialogMessage
      

  3.   

    没有详细一点的解释么,或者谁给个能响应不同子窗口内热键例子的程序也行,谢谢啊
    email:[email protected]
      

  4.   

    http://topic.csdn.net/t/20010307/09/80404.html
      

  5.   

    http://topic.csdn.net/t/20030907/22/2233768.html