Sign in to follow this  

Loading a Icon in c++

This topic is 3549 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Free but old, you should grab Visual Studio 2008 Express here http://www.microsoft.com/express/ it's free too. Or you can try Code::Blocks http://www.codeblocks.org/ some people here seems to recommend it.

Share this post


Link to post
Share on other sites
A windows app with a single main window typically has two icons: one that is associated with the window and displayed in the upper left corner, and one that is read by the shell and used as the icon in Explorer and in the taskbar. The first you associate with the window class when you call RegisterClassEx by specifying a handle to your icon. You obtain this handle by calling LoadImage and specifying either the resource or filename of your icon. The second gets associated "automatically", all you have to do is make it the first icon resource in your application. I don't remember if Dev-C++ has a resource editor or not (it's been a long time), but you really should be using Visual Studio anyway at this point if you're doing any serious Windows programming.

Your shell icon also need to have different sizes built in, typically you need 16x16, 32x32, and 48x48. XP supports 32-bit icons with alpha channel, but for previous versions you'll need to supply low-color versions as well. Vista also supports a 256x256 icon size with PNG compression.

Share this post


Link to post
Share on other sites

This topic is 3549 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this