一个主框架D,下面一个DLL插件里建了个基于对话框主面板CParsePanel,点击CParsePanel上一个按钮想让它弹出对话框void CParsePanel::OnButton()
{
// TODO: Add your control notification handler code here
CLock lock;
m_ctlConfigPathName.GetWindowText(m_strConfigPathName);
CConfigModify dlg(this,m_strConfigPathName);
dlg.DoModal();
}CLock类如下
CLock::CLock()
{
m_hOldHandle=::AfxGetResourceHandle();
::AfxSetResourceHandle(theApp.m_hInstance);
}运行到DoModal时报错,dlgdata.cpp line:308
内容是ASSERT(::GetWindowLong(hWndCtrl, GWL_STYLE) & WS_GROUP);
我不明白什么意思,请高人指点另外,不加CLock时不报错,但不弹出对话框
我在以前一个插件里用与上面一模一样的代码,可以弹出对话框,不报错
{
// TODO: Add your control notification handler code here
CLock lock;
m_ctlConfigPathName.GetWindowText(m_strConfigPathName);
CConfigModify dlg(this,m_strConfigPathName);
dlg.DoModal();
}CLock类如下
CLock::CLock()
{
m_hOldHandle=::AfxGetResourceHandle();
::AfxSetResourceHandle(theApp.m_hInstance);
}运行到DoModal时报错,dlgdata.cpp line:308
内容是ASSERT(::GetWindowLong(hWndCtrl, GWL_STYLE) & WS_GROUP);
我不明白什么意思,请高人指点另外,不加CLock时不报错,但不弹出对话框
我在以前一个插件里用与上面一模一样的代码,可以弹出对话框,不报错
解决方案 »
- 关于typedef和参数类型的问题
- 向BYTE类型的变量中插入数据
- 使用到的函数库的一些问题
- 谁有xpbutton类?能都给小弟一份,非常感谢!
- 用VS2005的朋友有没有觉得这个版本不太稳定啊?
- visual assist X安装问题!!
- 找不到头文件?文件在include 目录中。(急)
- VC中定时器底名称是什么,我找不到Timer这个控件。
- 如何使用代理服务器访问国外网站和服务器
- 在COM方法中传递自定义类型是不是要自己编写列集、存根啊?我刚刚接触Com!哪位高手指点一下,多谢了!
- 怎么避免XML数据损坏,在保存的时候如果程序强制关闭,XML文件就坏了
- 利用hook获取桌面图标句柄遇到的问题
从这一段,看不去必须设置WS_GROUP的属性.
MSDN
WS_GROUP
Specifies the first control of a group of controls. The group consists of this first control and all controls defined after it, up to the next control with the WS_GROUP style. The first control in each group usually has the WS_TABSTOP style so that the user can move from group to group. The user can subsequently change the keyboard focus from one control in the group to the next control in the group by using the direction keys.
You can turn this style on and off to change dialog box navigation. To change this style after a window has been created, use SetWindowLong.