有点难度的dll中的消息接收问题
在dll中创建了对话框,这个对话框最终嵌在主程序的界面中显示.
但dll中的这个对话框无法接收键盘事件(鼠标事件可以),
PreTranslateMessage函数也不会被调用.
我已有解决办法,就是在主程序的PreTranslateMessage向dll中的窗口发送
它的消息
我想知道出现这种情况的原因在哪里
[解决办法]
因为对话框窗口进程拦截了键盘消息。
[解决办法]
PreTranslateMessage depends on the message pump in CWinApp::Run
it is not called when a modal dialog is created.
[解决办法]
support.microsoft.com/support/kb/articles/q140/8/50.asp
support.microsoft.com/kb/175502