开发者

Help with application icons

开发者 https://www.devze.com 2023-01-11 01:24 出处:网络
I\'m building a program in C++ (target is windows XP) using Visual Studio 2008 and I\'m trying to add application icons, the ones that show up in the taskbar, explorer, desktop,开发者_开发知识库 etc.

I'm building a program in C++ (target is windows XP) using Visual Studio 2008 and I'm trying to add application icons, the ones that show up in the taskbar, explorer, desktop,开发者_开发知识库 etc. My .ico file has the sizes 48x48, 32x32, 24x24, and 16x16 pix in color depths 32-bit, 24-bit, 256 colors, and 16 colors. For what it's worth, I'm adding the .ico file to the binary in IcoFX.

I can get all the icons to show up like they should except for the one in the upper left corner of the program itself--the one that you can click on to bring up a menu with window size options--it still shows the default icon.

To get this little icon to change do I need a different image size or is there a completely different way of managing this one icon? Does that icon even have a specific name?

Thanks for your help.


Duplicated: How do I set the icon for my application in visual studio 2008?

According to one answer on that thread, you need to make sure that your icon is the first icon in the resources file.


Ok, I've figured it out:

I'm using wxWidgets as my GUI toolkit, so this is the only satisfactory answer I can give. wxWidgets has classes to set the main frame icons, those classes include wxIcon and wxIconBundle. Then wxTopLevelWindow::SetIcons can be used to set the application's icons. This sets ALL the icons (taskbar, main frame, alt-tab chooser, etc), no need to mess with a resource file in Visual Studio.

0

精彩评论

暂无评论...
验证码 换一张
取 消