X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dfad0599246651d4994e348d868a3e65613c7379..5fc0243835d4f6cbe586d85e3a6baa3c9c95fc7c:/docs/latex/wx/module.tex diff --git a/docs/latex/wx/module.tex b/docs/latex/wx/module.tex index 8eee76aadf..5df78e2e80 100644 --- a/docs/latex/wx/module.tex +++ b/docs/latex/wx/module.tex @@ -10,6 +10,27 @@ and add the DECLARE\_DYNAMIC\_CLASS and IMPLEMENT\_DYNAMIC\_CLASS to header and create an instance of each, and call each OnInit function. On exit, wxWindows will call the OnExit function for each module instance. +Note that your module class does not have to be in a header file. + +For example: + +\begin{verbatim} + // A module to allow DDE initialization/cleanup + // without calling these functions from app.cpp or from + // the user's application. + + class wxDDEModule: public wxModule + { + DECLARE_DYNAMIC_CLASS(wxDDEModule) + public: + wxDDEModule() {} + bool OnInit() { wxDDEInitialize(); return TRUE; }; + void OnExit() { wxDDECleanUp(); }; + }; + + IMPLEMENT_DYNAMIC_CLASS(wxDDEModule, wxModule) +\end{verbatim} + \wxheading{Derived from} \helpref{wxObject}{wxobject}