But, when i do
Code: Select all
BEGIN_EVENT_TABLE(GhostFrame, wxFrame)
EVT_MENU(EVENTID_MAINFRAME_EXIT,GhostFrame::OnExit())
END_EVENT_TABLE()
Code: Select all
1>e:\ghostengine\projects\testapp\main.cpp(42) : error C2102: '&' requires l-value
1>e:\ghostengine\projects\testapp\main.cpp(42) : error C2466: cannot allocate an array of constant size 0
1>e:\ghostengine\projects\testapp\main.cpp(42) : error C2440: 'initializing' : cannot convert from 'int' to 'const wxEventTableEntry'
1> No constructor could take the source type, or constructor overload resolution was ambiguous
But anyway, if it helps, here's my GhostFrame class declaration:
Code: Select all
class GhostFrame : public wxFrame
{
public:
GhostFrame(wxFrame *parent, wxWindowID id = wxID_ANY, const wxString& title = _T("wxToolBar Sample"),
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize ) :
wxFrame(parent, id, title, pos, size )
{
wxMenu *menuFile = new wxMenu;
menuFile->Append( EVENTID_MAINFRAME_EXIT, "E&xit" );
wxMenuBar *menuBar = new wxMenuBar;
menuBar->Append( menuFile, "&File" );
SetMenuBar( menuBar );
CreateStatusBar();
SetStatusText( "GhostEngine Scene Graph Editor is loading..." );
};
static void OnExit()
{
wxExit();
};
DECLARE_EVENT_TABLE()
};
Code: Select all
1>e:\ghostengine\projects\testapp\main.cpp(41) : error C2352: 'GhostFrame::OnExit' : illegal call of non-static member function
1> e:\ghostengine\projects\testapp\main.cpp(34) : see declaration of 'GhostFrame::OnExit'
Thank you all for your time regarding this message.