Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
I am currently writing an open source (GPL) plugin dll for an adobe application on windows. I need to have some UI of course and would like to use wxWidgets 3.1.2 (static linked) for this. Currently I use MFC but it's a nightmare working with it and I'd like to have easy cross platform support in the future.
Building a classic application / executable is pretty easy, but how can I get it working inside a dll? I did take a look at the dll sample project already and it partially works. But then I could only access GUI components using the events. I was also not able to enable the visual styles. They were working in MFC dialogs but not in wxWidgets.
I would like to be free in choice where I use dialogs and notifications and everything. Is there a way to get it working?
I think (I may be wrong though), you should use dynamic build of wx.
Other than that - what do you mean "access GUI components using events"? What else do you expect?
Also - what visual styles you are looking for? Keep in mind that it is possible to have a conditional compilation based on the OS.
And finally - there are example of how to build Adobe Plugin using wxWidgets on the web. I believe Vadim wrote one or referenced one notr that long ago.
Did you look?
I was searching the whole week for an example or a possible solution for it. What I basically want is a plugin class where I could simply execute wxWidgets code. I am aware that I need some kind of event loop running and everything. Creating and showing a wxDialog like in my example code simply doesn't work right?
I find it very difficult to search in this matter in google. When in I search for "wxWidgets in a dll application" I get mostly results dealing with wxWidgets dlls.
In the host application i have a button "configure video encoder ..." and once the user clicks i just want to do some wxWidgets magic.
The visual styles are are the common controls 6 styles. I added the resource file, tried adding the pragma... nothing worked. I get it working for MFC, but not for wxWidgets. But lets try to solve the first issue first.
The "dll" sample shows how to run the whole wxWidgets event loop in a separate thread. That's also the method used to create e.g. PhotoShop plugins with wxWidgets. Are you doing the same?
But then I could only access GUI components using the events.
It's still not clear to me what this means. Can you elaborate?
// Send a message to wx thread to show a new frame:
wxThreadEvent *event = new wxThreadEvent(wxEVT_THREAD, CMD_SHOW_WINDOW);
event->SetString(title);
wxQueueEvent(wxApp::GetInstance(), event);