Creating a DLL Application

Mario Velasco mavelasco at oficsa.com
Fri Dec 1 11:06:09 PST 2006


Using mingw (windows) or g++ (linux) you don't need anything more than 
propertly use WXIMPORT or WXEXPORT, either linking or using 
wxDynamicLibrary.

Mario Velasco

----- Original Message ----- 
From: "Stavros Tsolakos" <stsolakos at patras.atmel.com>
To: <wx-users at lists.wxwidgets.org>
Sent: Friday, December 01, 2006 3:32 AM
Subject: Re: Creating a DLL Application


> 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
>
> ---------------------------------------------------------------------
> 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