Note that there are some explanatory texts on larger screens.

plurals
  1. POwxWidgets - Add items to sizer via DLL
    text
    copied!<p>I have a GUI set up with wxWidgets (C++, MSVC) and part of the functionality is to add elements to the GUI via DLL's. Essentially, I would be passing in a sizer to the DLL which will in turn add the elements based on what is in the DLL.</p> <p>Could someone just point me in the right direction on how to get the DLL set up? I have looked, but don't see anything that's similar to what I'm looking for. The programming of the elements is fine with me, I just need to understand how to structure the DLL programming.</p> <p>Help appreciated.</p> <hr> <p>UPDATE</p> <p>I've done something similar to <a href="http://wiki.wxwidgets.org/Programs_That_Support_Plugins" rel="nofollow">http://wiki.wxwidgets.org/Programs_That_Support_Plugins</a>.</p> <p>Essentially, I get Access violation reading location errors whenever I try using wxWidgets components from within the DLL.</p> <p>In the samplePlugin.cpp, If I use</p> <pre><code>void samplePlugin::PerformTasks() { wxMessageBox(_("I would if I could...")); } </code></pre> <p>I get the error. If, however, I use</p> <pre><code>void samplePlugin::PerformTasks() { MessageBox(0,"Testing this thing","Test",0); } </code></pre> <p>which is not wxWidgets, but rather native to the OS, the message box works fine.</p> <p>I've tried adding WXUSINGDLL;WXMAKINGDLL; in the Preprocessor Definitions in MSVC in both the DLL and the App projects. The DLL compiles fine, but I can't even compile the App in that case and get exceptions.</p> <p>Does anyone know how to fix this issue?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload