Re: wxTaskBarIcon help
- Posted by ghaberek (admin) Feb 18, 2009
- 1157 views
mattlewis said...
Stupid pointer tricks:
wxIcon ico = (wxIcon)icon; ...should be... wxIcon ico = *(wxIcon*)icon;The int icon parameter is really a pointer, but since you need to pass a reference, you can dereference it like that. You could alternatively do this:
wxIcon* ico = (wxIcon*)icon; ... ((EuTaskBarIcon*)taskbar)->SetIcon( *ico, str );I think the weird error was probably due to the compiler trying too hard to construct a wxIcon object from an int.
Figures. This is why I hate pointers (and therefore dislike C as a whole).
mattlewis said...
Also, how are you generating the exports? It's always missing some:
Failed to link function: +get_staticbitmap Failed to link procedure: +set_mdi_child_title Failed to link procedure: +set_staticbitmap Failed to link variable: null_pen Failed to link variable: null_brushI committed r371 fixing wxTaskBarIcon.cpp and the exports.
See export.exw. It uses the same methods as wrap.exw to fish out all the routines and dump them into wat_dll\exports.lbc. So they're in exports.lbc, but they're not showing up in the final dll, for some reason. I just updated export.exw to output null_pen and null_brush, but they're still not showing up. And with the recent addition of wxTaskBarIcon.cpp, the list gets longer:
Failed to link function: +get_staticbitmap Failed to link procedure: +set_mdi_child_title Failed to link procedure: +set_staticbitmap Failed to link function: +new_wxTaskBarIcon Failed to link function: +get_taskbar_menu Failed to link procedure: +set_taskbar_icon Failed to link variable: null_pen Failed to link variable: null_brushI just committed r372 with my changes to export.exw. Still broken.
-Greg