我问过一个问题:"请问怎么用一个对话框中的按钮调出另一个已经作好的对话框."
朋友们给的解答是YourDlg::OnButtonDown()
{
YourOtherDlg dlg;
dlg.DoModal();
}
不要忘了在YourDlgd的cpp或.h文件中添加#include "YourOtherDlg.h"!我这么做了,编译通过,运行时出错,提示:Dlg.obj : error LNK2005: "public: __thiscall Dlg::Dlg(class CWnd *)" (??0Dlg@@QAE@PAVCWnd@@@Z) already defined in BISHE1.obj
Dlg.obj : error LNK2005: "protected: virtual void __thiscall Dlg::DoDataExchange(class CDataExchange *)" (?DoDataExchange@Dlg@@MAEXPAVCDataExchange@@@Z) already defined in BISHE1.obj
Dlg.obj : error LNK2005: "protected: static struct AFX_MSGMAP const * __stdcall Dlg::_GetBaseMessageMap(void)" (?_GetBaseMessageMap@Dlg@@KGPBUAFX_MSGMAP@@XZ) already defined in BISHE1.obj
Dlg.obj : error LNK2005: "protected: virtual struct AFX_MSGMAP const * __thiscall Dlg::GetMessageMap(void)const " (?GetMessageMap@Dlg@@MBEPBUAFX_MSGMAP@@XZ) already defined in BISHE1.obj
Dlg.obj : error LNK2005: "protected: static struct AFX_MSGMAP const Dlg::messageMap" (?messageMap@Dlg@@1UAFX_MSGMAP@@B) already defined in BISHE1.obj
Dlg.obj : error LNK2005: "private: static struct AFX_MSGMAP_ENTRY const * const Dlg::_messageEntries" (?_messageEntries@Dlg@@0QBUAFX_MSGMAP_ENTRY@@B) already defined in BISHE1.obj
Debug/BISHE1.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.BISHE1.exe - 7 error(s), 0 warning(s)请问怎么解决?
请高手帮忙,谢谢.
朋友们给的解答是YourDlg::OnButtonDown()
{
YourOtherDlg dlg;
dlg.DoModal();
}
不要忘了在YourDlgd的cpp或.h文件中添加#include "YourOtherDlg.h"!我这么做了,编译通过,运行时出错,提示:Dlg.obj : error LNK2005: "public: __thiscall Dlg::Dlg(class CWnd *)" (??0Dlg@@QAE@PAVCWnd@@@Z) already defined in BISHE1.obj
Dlg.obj : error LNK2005: "protected: virtual void __thiscall Dlg::DoDataExchange(class CDataExchange *)" (?DoDataExchange@Dlg@@MAEXPAVCDataExchange@@@Z) already defined in BISHE1.obj
Dlg.obj : error LNK2005: "protected: static struct AFX_MSGMAP const * __stdcall Dlg::_GetBaseMessageMap(void)" (?_GetBaseMessageMap@Dlg@@KGPBUAFX_MSGMAP@@XZ) already defined in BISHE1.obj
Dlg.obj : error LNK2005: "protected: virtual struct AFX_MSGMAP const * __thiscall Dlg::GetMessageMap(void)const " (?GetMessageMap@Dlg@@MBEPBUAFX_MSGMAP@@XZ) already defined in BISHE1.obj
Dlg.obj : error LNK2005: "protected: static struct AFX_MSGMAP const Dlg::messageMap" (?messageMap@Dlg@@1UAFX_MSGMAP@@B) already defined in BISHE1.obj
Dlg.obj : error LNK2005: "private: static struct AFX_MSGMAP_ENTRY const * const Dlg::_messageEntries" (?_messageEntries@Dlg@@0QBUAFX_MSGMAP_ENTRY@@B) already defined in BISHE1.obj
Debug/BISHE1.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.BISHE1.exe - 7 error(s), 0 warning(s)请问怎么解决?
请高手帮忙,谢谢.
解决方案 »
- 一个多线程的问题,请高手看看
- 关于分组单选框关联变量的问题
- Picture控件的缺陷
- 界面设计问题
- 在GDI对象中,如何自定义线型:如增加一种点画线类型,其点间距和样式与标准点画线有所区别。
- 安装一个软件比如office,这个软件可能被复制到,注车表,文件目录 还有其他什么地方吗
- getservbyname getservbyport这些函数是干什么用的
- wsprintf的错误,头疼ing
- lllllll(lalalala) 进来领分!
- 为了布局美观,想让工具条一开始就dock在窗口的最右边,现在已经是dockable的属性了。想达到如上的效果应该如何做?谢谢。
- 我在OnInitialUpdate中已经初始化了pEdit,但是在程序函数中用时为什么连接不到编辑控件
- 为什么下面这条select语句在access2003里写一个查询操作能执行成功,但是在vc里执行总是失败
要设置类似
#if !defined(HEAD_FILE_YourOtherDlg)
#define HEAD_FILE_YourOtherDlg//代码#endif