[wx-dev] New event
Vadim Zeitlin
vadim at wxwidgets.org
Fri Feb 1 09:16:36 PST 2008
On Thu, 31 Jan 2008 22:02:31 -0500 (EST) Igor Korot <ikorot at earthlink.net> wrote:
IK> In toolbar.h:
IK>
IK> extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_TOOLBAR_CUSTOMIZE;
IK>
IK> typedef void (wxEvtHandler::*wxToolbarCustomizeEventFunction)(wxCommandEvent&);
IK>
IK> #define wxToolbarCustomizeEventHandler(func) \
IK> (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxToolbarCustomizeEventFunction, &func)
IK>
IK> #define EVT_TOOLBAR_CUSTOMIZE(winid,func) \
IK> wx__DECLARE_EVT0(wxEVT_COMMAND_TOOLBAR_CUSTOMIZE, wxToolbarCustomizeEventHandler(func))
This macro doesn't use its winid argument.
IK> In msw/frame.cpp
IK>
IK> BEGIN_EVENT_TABLE(wxFrame, wxFrameBase)
IK> EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged)
IK> EVT_TOOLBAR_CUSTOMIZE(wxFrame::OnToolbarCustomize)
And here you pass just one argument to a macro which expects two of them.
The errors are probably due to this.
Regards,
VZ
More information about the wx-dev
mailing list