wxDialog in a dll crashes
Piotr Starczewski
pstarczewski at o2.pl
Fri Dec 1 00:06:28 PST 2006
Hello,
If I'm right you need to activate wxWidgets with IMPLEMENT_APP_NO_MAIN.
More details can be found here:
http://www.wxwidgets.org/wiki/index.php/Creating_A_DLL_Of_An_Application
Regards,
Peter
Bryan Worthen wrote:
> Hi,
>
> Sorry if this is answered somewhere else, but I couldn't find an answer.
>
> I have a WX application which loads a dialog via a dll (so it can have
> a plugin interface). However, when the dialog is created in the dll,
> it crashes. In essence, the dll calls:
>
> wxDialog * test=new wxDialog(NULL, -1, _T("test"),wxDefaultPosition);
>
> and then it crashes with the stack trace, with a NULL
> wxWinHandleHash. Is there anything I have to do in the DLL to
> initialize this (and possibly other) global variables?
>
> Thanks,
> Bryan
>
> Plugind.dll!wxHashTableBase::GetNode(long key=68114, long
> value=68114) Line 109 + 0x7 bytes C++
> Plugind.dll!wxWinHashTable::Get(long key=68114, long value=68114)
> Line 579 + 0x2e bytes C++
> Plugind.dll!wxWinHashTable::Get(long key=68114) Line 579 + 0x1e
> bytes C++
> > Plugind.dll!wxFindWinFromHandle(void * hWnd=0x00010a12) Line
> 3036 C++
> Plugind.dll!wxGetWindowFromHWND(void * hWnd=0x00010a12) Line 5483
> + 0x9 bytes C++
> Plugind.dll!wxWindowBase::DoFindFocus() Line 634 + 0x9 bytes C++
> Plugind.dll!wxWindowBase::FindFocus() Line 2592 + 0x5 bytes C++
> Plugind.dll!wxDialog::Create(wxWindow * parent=0x00000000, int
> id=-1, const wxString & title={...}, const wxPoint & pos={...}, const
> wxSize & size={...}, long style=536877056, const wxString &
> name={...}) Line 182 + 0x5 bytes C++
> Plugind.dll!wxDialog::wxDialog(wxWindow * parent=0x00000000, int
> id=-1, const wxString & title={...}, const wxPoint & pos={...}, const
> wxSize & size={...}, long style=536877056, const wxString &
> name={...}) Line 47 C++
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help at lists.wxwidgets.org
>
>
>
More information about the wx-users
mailing list