visual c++ - Create resource from existing .ico icon -


i have icon in .ico format. want add resource in vc++ project. want set main icon using wxwidgets.

i right click resources, , choices existing item , new item. if select new item , .ico, brings bitmap editor. can't right. select "existing item" , put foo.ico resources. following fails:

wxframe::seticon(wxicon(foo));

i have tried various decorations, foo.ico , wxbitmap_type_ico_resource, yada yada, have yet strike perfect combination.

edit: found on net says need create new resource , add foo.ico that. tried following instructions, no joy.

i managed it, there must better way.

i copied resource file, namely sample.rc, wxwidgets samples. edited in text editor, replacing icon name foo.ico in couple of places. commented-out #include referred wxwidget project directory. in visual studio, added file resources. in myframe constructor in program, wrote,

seticon(wxicon(sample)); 

very hackish, worked.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -