]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/dllwidget/test_dll.cpp
6 #include "../../contrib/dllwidget/dllwidget.h"
8 class TestWindow
: public wxWindow
11 TestWindow(wxWindow
*parent
, long style
)
12 : wxWindow(parent
, -1)
14 SetBackgroundColour(wxColour("white"));
17 int HandleCommand(int cmd
, const wxString
& param
)
21 SetBackgroundColour(wxColour("red"));
27 SetBackgroundColour(wxColour(param
));
33 wxMessageBox("Message from embedded widget:\n\n" + param
);
39 DECLARE_ABSTRACT_CLASS(TestWindow
)
42 IMPLEMENT_ABSTRACT_CLASS(TestWindow
, wxWindow
)
45 //DECLARE_DLL_WIDGET(TestWindow)
46 static int SendCommandToTestWindow(wxWindow
*wnd
, int cmd
, const wxString
& param
)
48 return wxStaticCast(wnd
, TestWindow
)->HandleCommand(cmd
, param
);
52 BEGIN_WIDGET_LIBRARY()
53 REGISTER_WIDGET(TestWindow
)