我做了一个基于CFileDialog的对话框的类CMyFileDialog,想重新设定按Tab键触发的事件,即原先按Tab键是依具层次切换焦点,现在我不想按Tab键依具层次切换焦点了,想依具自己设定的次序显示对话框.
我重载了CMyFileDialog的PreTranslateMessage函数,但是CFileDialog的消息好象不通过这个函数,使用键盘钩子可以得到按Tab键按下消息,但没发屏蔽默认依具层次切换焦点的功能.
Help Me 谢谢了!
我重载了CMyFileDialog的PreTranslateMessage函数,但是CFileDialog的消息好象不通过这个函数,使用键盘钩子可以得到按Tab键按下消息,但没发屏蔽默认依具层次切换焦点的功能.
Help Me 谢谢了!
PreTranslateMessage应该可以捕获相应的消息
To customize the dialog box, derive a class from CFileDialog, provide a custom dialog template, and add a message map to process the notification messages from the extended controls. Any unprocessed messages should be passed to the base class.大概可以在自定义的对话框模版上 定义tab功能(顺序、是否激活)。
------------
你钩到TAB消息后,去掉return CallNextHookEx(g_hHook, code, wParam, lParam);
其它消息return CallNextHookEx(g_hHook, code, wParam, lParam);
偶的Email:[email protected]
先谢谢了!