wxsashlayoutwindow に取り組んでいますが、実行できません。誰か助けてください。
これらは私が得ているリンクエラーです:
1>MyFrame.obj : error LNK2019: unresolved external symbol "public: bool __thiscall
wxLayoutAlgorithm::LayoutFrame(class wxFrame *,class wxWindow *)" (?
LayoutFrame@wxLayoutAlgorithm@@QAE_NPAVwxFrame@@PAVwxWindow@@@Z) referenced in function
"public: __thiscall MyFrame::MyFrame(class wxWindow *,int,class wxString const &,class
wxPoint const &,class wxSize const &,long,class wxString const &)" (??
0MyFrame@@QAE@PAVwxWindow@@HABVwxString@@ABVwxPoint@@ABVwxSize@@J1@Z)
1>MyFrame.obj : error LNK2019: unresolved external symbol "public: void __thiscall
wxSashWindow::SetSashVisible(enum wxSashEdgePosition,bool)" (?
SetSashVisible@wxSashWindow@@QAEXW4wxSashEdgePosition@@_N@Z) referenced in function
"public: __thiscall MyFrame::MyFrame(class wxWindow *,int,class wxString const &,class
wxPoint const &,class wxSize const &,long,class wxString const &)" (??
0MyFrame@@QAE@PAVwxWindow@@HABVwxString@@ABVwxPoint@@ABVwxSize@@J1@Z)
1>MyFrame.obj : error LNK2019: unresolved external symbol "public: bool __thiscall
wxSashLayoutWindow::Create(class wxWindow *,int,class wxPoint const &,class wxSize const
&,long,class wxString const &)" (?
Create@wxSashLayoutWindow@@QAE_NPAVwxWindow@@HABVwxPoint@@ABVwxSize@@JABVwxString@@@Z)
referenced in function "public: __thiscall MyFrame::MyFrame(class wxWindow *,int,class
wxString const &,class wxPoint const &,class wxSize const &,long,class wxString const &)"
(??0MyFrame@@QAE@PAVwxWindow@@HABVwxString@@ABVwxPoint@@ABVwxSize@@J1@Z)
1>MyFrame.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall
wxSashWindow::~wxSashWindow(void)" (??1wxSashWindow@@UAE@XZ) referenced in function
__unwindfunclet$??0wxSashLayoutWindow@@QAE@XZ$0
1>MyFrame.obj : error LNK2019: unresolved external symbol "private: void __thiscall
wxSashLayoutWindow::Init(void)" (?Init@wxSashLayoutWindow@@AAEXXZ) referenced in function
"public: __thiscall wxSashLayoutWindow::wxSashLayoutWindow(void)" (??
0wxSashLayoutWindow@@QAE@XZ)
1>MyFrame.obj : error LNK2001: unresolved external symbol "public: virtual class
wxClassInfo * __thiscall wxSashLayoutWindow::GetClassInfo(void)const " (?
GetClassInfo@wxSashLayoutWindow@@UBEPAVwxClassInfo@@XZ)
1>MyFrame.obj : error LNK2001: unresolved external symbol "protected: virtual struct
wxEventTable const * __thiscall wxSashLayoutWindow::GetEventTable(void)const " (?
GetEventTable@wxSashLayoutWindow@@MBEPBUwxEventTable@@XZ)
1>MyFrame.obj : error LNK2001: unresolved external symbol "protected: virtual class
wxEventHashTable & __thiscall wxSashLayoutWindow::GetEventHashTable(void)const " (?
GetEventHashTable@wxSashLayoutWindow@@MBEAAVwxEventHashTable@@XZ)
1>MyFrame.obj : error LNK2019: unresolved external symbol "private: void __thiscall
wxSashWindow::Init(void)" (?Init@wxSashWindow@@AAEXXZ) referenced in function "public:
__thiscall wxSashWindow::wxSashWindow(void)" (??0wxSashWindow@@QAE@XZ)
1>MyFrame.obj : error LNK2001: unresolved external symbol "public: virtual class
wxClassInfo * __thiscall wxSashWindow::GetClassInfo(void)const " (?
GetClassInfo@wxSashWindow@@UBEPAVwxClassInfo@@XZ)
1>MyFrame.obj : error LNK2001: unresolved external symbol "protected: virtual struct
wxEventTable const * __thiscall wxSashWindow::GetEventTable(void)const " (?
GetEventTable@wxSashWindow@@MBEPBUwxEventTable@@XZ)
1>MyFrame.obj : error LNK2001: unresolved external symbol "protected: virtual class
wxEventHashTable & __thiscall wxSashWindow::GetEventHashTable(void)const " (?
GetEventHashTable@wxSashWindow@@MBEAAVwxEventHashTable@@XZ)
1>MyFrame.obj : error LNK2001: unresolved external symbol "int const wxEVT_SASH_DRAGGED" (?
wxEVT_SASH_DRAGGED@@3HB)
これは私のコードです:
//Frame.h
#ifndef __MAIN_FRAME__
#define __MAIN_FRAME__
#include "wx/frame.h"
#include <wx/laywin.h>
//#include <wx/sashwin.h>
class MyFrame : public wxFrame
{
public:
MyFrame();
MyFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = _T( "Frame" ));
~MyFrame();
void OnDrag(wxSashEvent &event);
void OnSize(wxSizeEvent& event);
private:
wxLayoutAlgorithm _layout;
wxSashLayoutWindow *window;
wxSize siz;
DECLARE_DYNAMIC_CLASS( MyFrame )
DECLARE_EVENT_TABLE()
};
#endif
//Frame.cpp
enum
{
ID_BTN_FIRST = 100,
SASHID
};
IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame )
BEGIN_EVENT_TABLE(MyFrame ,wxFrame)
EVT_SASH_DRAGGED(SASHID ,MyFrame::OnDrag)
EVT_SIZE(MyFrame::OnSize)
END_EVENT_TABLE()
MyFrame::MyFrame()
{
}
MyFrame::~MyFrame()
{
}
MyFrame::MyFrame(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos, const wxSize &size , long style , const wxString &name )
:wxFrame( parent, id, title, pos, size, style, name )
{
siz = wxGetDisplaySize();
window = new wxSashLayoutWindow();
window->Create(this ,SASHID );
window->SetDefaultSize(wxSize(200 ,siz.GetHeight()));
window->SetOrientation(wxLAYOUT_VERTICAL);
window->SetAlignment(wxLAYOUT_LEFT);
window->SetBackgroundColour(this->GetBackgroundColour());
window->SetSashVisible(wxSASH_RIGHT, true);
wxPanel *panel = new wxPanel(this);
MWTreeCtrl *tree = new MWTreeCtrl(window);
_layout.LayoutFrame(this ,panel);
}
void MyFrame::OnDrag(wxSashEvent &event)
{
window->SetDefaultSize(wxSize(event.GetDragRect().width, siz.GetHeight()));
_layout.LayoutFrame(this ,panel);
}
void MyFrame::OnSize(wxSizeEvent& event)
{
_layout.LayoutFrame(this ,panel);
}