开发者

Using wxWidgets from a DLL

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 perf开发者_StackOverflow社区orm 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.


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...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜