[wx-dev] A little fix to isosurf and a question about wxW building

Luca Cappa luca.cappa at sequoia.it
Fri Jul 18 06:48:46 PDT 2008


Hello Vadim,

On Thu, 17 Jul 2008 22:25:06 +0200, Vadim Zeitlin <vadim at wxwidgets.org>  =

wrote:
> On Thu, 17 Jul 2008 14:47:47 +0200 Luca Cappa <luca.cappa at sequoia.it>  =

> wrote:
>
> LC> Other samples (like penguin or calendar or auidemo) include  =

> uncoditionally
> LC> the file "samples/sample.xpm"
>
>  Well, they shouldn't. It doesn't hurt but it's really unnecessary.

Instead it seems that it is necessary since many samples (either in  =

WX_2_8_BRANCH or in trunk) to set the main frame icon do include the .xpm  =

file and then  call SetIcon(wxIcon(the_xpm_data_pointer_var)); this  =

SetIcon call would not compile (the_xpm_data_pointer_var undefined) if the  =

xpm file is not included.

> And  the minimal sample shows how it is supposed to work under MSW/OS2.

Ok, I added a simple patch (for all samples in WX_2_8_BRANCH and tested on  =

the MSW platform) which reproduces what the minimal sample does for  =

setting the icon on the frame title bar.

> LC> and then call SetIcon(wxIcon(sample_xpm)).
>  In fact it doesn't do this any more since 5 months, see
> 	http://svn.wxwidgets.org/viewvc/wx?view=3Drev&revision=3D51746

Do not look to the code of the "bool MyApp::OnInit()" member function, but  =

to the MyFrame constructor: in fact in there there is a call to  =

"SetIcon(wxIcon(sample_xpm));", which triggers the error I said above  =

(.xpm file not included and 'sample_xpm' not defined). To fix that, I just  =

removed the latter call in the MyFrame constructor.

Let me know if I missed something :)

Greetings,
Luca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: samples_icon.patch
Type: application/octet-stream
Size: 11226 bytes
Desc: not available
Url : http://lists.wxwidgets.org/pipermail/wx-dev/attachments/20080718/bac4=
ac0e/samples_icon-0001.obj


More information about the wx-dev mailing list