私は2つのプロジェクトで解決策を持っています。最初のプロジェクトでは、Frame といくつかのコントロールがあり、2 番目のプロジェクトでは CForcesEditorDialog:CDialog があります。もちろん、それらを比較したいと思います。しかし、このエラーではプロジェクトをコンパイルできません:
MainFrame.obj : エラー LNK2019: 未解決の外部シンボル "public: __thiscall CForcesEditorDialog::CForcesEditorDialog(class CWnd *,class MainFrame *)" (??0CForcesEditorDialog@@QAE@PAVCWnd@@PAVMainFrame@@@Z) 関数で参照されている "保護されています: int __thiscall MainFrame::OnCreate(struct tagCREATESTRUCTA *)" (?OnCreate@MainFrame@@IAEHPAUtagCREATESTRUCTA@@@Z)
class CForcesEditorDialog;
class MainFrame : public CFrameWnd
{
CForcesEditorDialog* forcesEditorDialog;
public:
MainFrame();
~MainFrame();
//virtual void CreateChildControls( void );
//afx_msg void OnMouseMove(UINT, CPoint);
protected:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
DECLARE_MESSAGE_MAP()
};
int MainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
forcesEditorDialog = new CForcesEditorDialog(this,this);//CForcesEditorDialog(this,this);
}
class CForcesEditorDialog : public CDialog
{
//For including ForcesBar
ForcesBar* m_forcesBar;
MainFrame* pMainFrame;
public:
CForcesEditorDialog(CWnd* _pParentWnd = NULL, MainFrame* _pMainFrame = NULL); // standard constructor
}
CForcesEditorDialog::CForcesEditorDialog(CWnd* _pParentWnd, MainFrame* _pMainFrame)
: CDialog(IDD_CUR_DIALOG, _pParentWnd),
p_expander (0),
p_selectedItem(0),
m_enabled (false)
{
m_forcesBar = new ForcesBar();
pMainFrame = _pMainFrame;
}
このプロジェクトを含めることに問題があるかもしれません。私は2つのプロジェクトで解決策を考えたことはありませんでした。それについて何かアイデアはありますか?