This happens at least with wxWidgets 2.8.9 and 2.8.10 on Windows XP, did not test on other patforms:
I have two dlls, a.dll and b.dll, which are VST plugins running in a host sequencer. They make use of wxWidgets and OpenGL. On initialization, I call this in both plugins (but with different m_width and m_height):
MyControl(..)
{
..
m_canvas = new wxGLCanvas(this, wxID_ANY, 0, wxPoint(0, 0), wxSize(m_width, m_height));
m_context = new wxGLContext(m_canvas);
..
m_canvas->SetCurrent(*m_context);
}
void MyControl::onPaint(wxPaintEvent& event)
{
m_canvas->SetCurrent(*m_context);
wxPaintDC dc(m_canvas);
..
m_canvas->SwapBuffers();
}
This works fine as long as I only open a.dll or b.dll. Also, opening multiple instances of either a.dll or b.dll works fine. However, as soon as I open a.dll and b.dll at the same time, the host sequencer immediately shuts down after calling this line (even while debugging):
m_canvas->SetCurrent(*m_context);
That is what I can see on the output:
"host.exe": "D:\something\b.dll" geladen, Symbole wurden geladen.
14:49:02: ..\..\src\msw\app.cpp(364): 'RegisterClass(frame)' failed with error 0x00000582 (klasse ist bereits vorhanden).
14:49:03: ..\..\src\msw\app.cpp(373): 'RegisterClass(no redraw frame)' failed with error 0x00000582 (klasse ist bereits vorhanden).
14:49:03: ..\..\src\msw\app.cpp(383): 'RegisterClass(MDI parent)' failed with error 0x00000582 (klasse ist bereits vorhanden).
14:49:03: ..\..\src\msw\app.cpp(392): 'RegisterClass(no redraw MDI parent frame)' failed with error 0x00000582 (klasse ist bereits vorhanden).
....