from DLL events
Les Newell
lesnewell at fmail.co.uk
Fri Sep 1 09:38:32 PDT 2006
Are you always going to be calling this dll from a wx app? If so then
make sure that you use wx as a dll then pass a copy of your main
application's instance pointer (wxApp::GetInstance()) to your dll. In
the dll use wxApp::SetInstance() with that pointer. This will
synchronise the two instances.
Les
bray at sent.com wrote:
> Hello:
>
> I wish use wxWidgets from DLLs. I used this code:
>
> class wxNoneAppA : public wxApp
> {
> public:
> virtual bool OnInit() { return true; }
> };
>
> IMPLEMENT_APP_NO_MAIN( wxNoneAppA )
>
> Then call wxInitialize() when it loads. It works fine by itself (not
> used in a wxApp). However, when I load from a wxApp, the events are
> never being called from the wxApp instance. Dialogs come up but the
> events are no longer being called. The same wxApp without the DLL calls
> the events. I presume the DLL instance is intercepting these, no?
>
> Any ideas on what I may be doing wrong?
>
> Regards, Brian
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help at lists.wxwidgets.org
>
>
More information about the wx-users
mailing list