dll中如何使用或模拟PreTranslateMessage函数 rt! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://support.microsoft.com/kb/140850 dll导出一函数PreTranslateMessageDll.你的主程序CMainFrame::PreTranslateMessage(){ if( PreTranslateMessageDll() ) { return true; } .......} STDAPI_(INT_PTR) ShowxxxDialog(HWND hParentWnd=NULL){ CMessageLoop theLoop; CxxxDialog aDialog; theLoop.AddMessageFilter(&aDialog); aDialog.Create(hParentWnd); aDialog.ShowWindow(SW_SHOWNORMAL); INT_PTR ret = theLoop.Run(); theLoop.RemoveMessageFilter(&aDialog); return ret;}CMessageLoop是从WTL借来的代码... 楼上的五星朋友,MFC跟WTL不一样, 没有CMessageLoop 这个东东,而且你得把 theLoop加到Application的消息Loop中,_Module.AddMessageLoop(&theLoop); 证卷交易所的网络接口是公开的?难道随便都可以去连接下载行情数据? 如何在关闭程序的时候,做一些操作? GetDlgItem的问题,请大家帮分析该如何解决 高手求帮!紧急求助!help me!hurry up! vc中调用bmp格式图片要用到什么类? 我用CFileStatus如何获得一个文件两个以上的文件属性。 关于软件在线更新的问题~ 如何确定一个CAsyncSocket连接断开? VC数据库程序:为什么会发生数据截断? 数据库vc编程 怎么让菜单一直高亮显示不变灰? 如何截获OnNavigateComplete2,后发生变化的网页的代码?
dll导出一函数PreTranslateMessageDll.你的主程序
CMainFrame::PreTranslateMessage()
{
if( PreTranslateMessageDll() )
{
return true;
}
.......
}
{
CMessageLoop theLoop;
CxxxDialog aDialog;
theLoop.AddMessageFilter(&aDialog);
aDialog.Create(hParentWnd);
aDialog.ShowWindow(SW_SHOWNORMAL);
INT_PTR ret = theLoop.Run();
theLoop.RemoveMessageFilter(&aDialog);
return ret;
}CMessageLoop是从WTL借来的代码...
而且你得把 theLoop加到Application的消息Loop中,
_Module.AddMessageLoop(&theLoop);