OK. I get it.
In fact, in ressources.rc, "1" is the name of my "ICON" ressource. And, as any function, method, class, variable of whatever is named into a source code, it does not support to begin with a number.
As i previously didn't really understand contents of ressources file, i missed this.
So, when changing my ressources to smtg like "MYICON ICON "MyApp_1.ico""), writing "this->SetIcon(wxICON(Icon_ressource_name))" does finally make sense, and everything works now like a charm.
Thank you doublemax to have pushed me to seek further the "wxICON(Icon_ressource_name)" way
Final code :
Code: Select all
this->SetIcon(wxICON(MyICON)); // sets app window icon (shown in upper left corner)
this->trayIcon = new MyTaskBarIcon(this); // creates taskbar icon
this->trayIcon->SetIcon(wxIcon(MyApp_2_xpm), "AppName"); // sets taskbar icon image and name
Notice that 32x32 and 16x16 versions are enough to get everything working fine.