dll中创建对话框,分割窗口出错

guyanhun 2007-08-08 01:26:27
dll 中创建一个对话框,然后在对话框上分割窗口,左边的是CFormview ,右边的是CView ,在m_SplitterWnd.CreateView 的时候出错了。GetActivePane 函数中的GetParentFrame 出错了。

以前在exe 中创建对话框是没有问题的。

谢谢!
...全文
264 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
DentistryDoctor 2007-08-11
  • 打赏
  • 举报
回复
By default, MFC uses the resource handle of the main application to load the resource template. If you have an exported function in a DLL, such as one that launches a dialog box in the DLL, this template is actually stored in the DLL module. You need to switch the module state for the correct handle to be used. You can do this by adding the following code to the beginning of the function:

AFX_MANAGE_STATE(AfxGetStaticModuleState( ));

guyanhun 2007-08-11
  • 打赏
  • 举报
回复
我是写在一个plx 的插件中直接调用的,不是dll中导出一个函数供exe调用。
guyanhun 2007-08-11
  • 打赏
  • 举报
回复
加了也不管用。问题依旧。

15,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 进程/线程/DLL
社区管理员
  • 进程/线程/DLL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧