> hi all,
>
> can someone point me to an example of loading icons from an .icl file,
> .dll or other (windows) icon resource? i'd like to package up my icons
> (into a .dll preferably) and ship this with my app instead of a bunch of
> scattered .ico files
I don't think this is possible.
> i'm currently doing:
>
> use Wx qw(wxBITMAP_TYPE_ICO);
>
> followed by
>
> $frame->SetIcon(Wx::Icon->new('my/file.ico', wxBITMAP_TYPE_ICO));
>
> but the wxWindows docs seem to suggest (tho i'm not that good at
> translating the C documentation to perl in my head...) that there is
> also a wxBITMAP_TYPE_ICO_RESOURCE constant which could be passed to
> LoadIcon to have it read an .icl or .dll (or .exe? what else exactly
> *is* an icon resource?) but when i tried changing the above to:
>
> use Wx qw(wxBITMAP_TYPE_ICO_RESOURCE);
> ^^^^^^^^^
> $frame->SetIcon(Wx::Icon->new('icons.icl', wxBITMAP_TYPE_ICO_RESOURCE,
> 1));
> # tried this with and w/out this "index" parameter ^^^
>
> the call does not die, but fails silently, loading no icon from the
> file.
This won't work, _ICO_RESOURCE will try to load the file from Wx.dll.
Regards
Mattia
|