Creating a DLL Application
Stavros Tsolakos
stsolakos at patras.atmel.com
Fri Dec 1 01:32:25 PST 2006
Hi.
>
> /* Display a dialog box - this method works*/
> extern "C" __declspec(dllexport) void DLLFunction (HWND handle)
> {
> wxWindow win;
> win.SetHWND ((WXHWND) handle);
> win.Enable (false);
> wxDialog (&win, -1, "String", wxDefaultPosition, wxSize(150,150));
> wxButton (&dlg, 123, "press me");
> dlg.ShowModal();
> win.Enable (true);
> win.SetHWND(0);
> }
>
I am not familiar with wx and DLLs but I think that it is a really bad
idea creating windows on the stack. Try to create ALL windows in the
heap using new, instead.
Perhaps this is not the problem but, again, it is a very bad idea.
Stavros
More information about the wx-users
mailing list