Reputation: 21
Is it possible to use wxWidgets from a DLL? I'm writing a plugin of sorts. (ACM for use in VirtualDub in this case, but I have other projects where I would like to do a similar thing)
All the docs that I come across discuss wxWidgets from the point of view of an executable. In most of these cases, I don't have access to the executable's source, but I'm writing various libraries for use in the process space of these executables.
Ideally, I would like to perform the minimum startup required to get wxWidgets up and running in a DLL. Which probably means performing some initialization, and starting a message pump, but without advertising an entry point for wxWidgets to use.
Upvotes: 2
Views: 1365
Reputation: 21
Using wxWidgets 2.9.2, all you need to do is the following:
wxApp::SetInstance(new wxApp());
new wxInitializer();
Then delete the wxInitializer when you are finished with it. Though I still cannot find this documented anywhere...
Upvotes: 2