Jump to content
  • Advertisement
Sign in to follow this  
Dookie

Easy icon question...

This topic is 4863 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

Hey guys, here's an easy one! I'm writing my game using the Visual C++ .net IDE, and I've figured how to assign an icon to the compiled executable. But I haven't figured out yet how to get my icon to appear on the game window itself... For example, Windows' 'Calculator' program uses a little calculator picture for its icon. When you browse your harddrive for the calculator program (calc.exe), you will see its calculator icon. Now, go ahead and launch 'Calculator'. See that little calculator icon next to the word 'Calculator' in the upper left corner of the calculator's window? Also, look at the calculator on the taskbar and you'll see an icon of a calculator next to the word 'Calculator'. Now, browse the harddrive for my game. You will see an atomic bomb explosion icon for my game 'Atomic Ball.exe'. But when I run the program 'Atomic Ball.exe', the icon in the upper left corner of the game window is a generic application icon (pic of a blank window) instead of my fancy atomic bomb icon. Also, the icon displayed for the Atomic Ball game on the taskbar is a generic application icon. How do I put my game's icon in the upper left corner of my game window? Thanks in advance for the help!

Share this post


Link to post
Share on other sites
Advertisement
When you register your class, set the icon with LoadIcon in the WNDCLASS object you pass in to RegisterClass.

Share this post


Link to post
Share on other sites
Sorry I didn't reply sooner, but I've been studying for finals in school and hadn't much time to code.

Thanks for the icon information, I finally got a chance to implement what you guys posted and got it to work perfectly! Now my game is easy to find on the taskbar when a dozen other programs are running, heh!

Thanks again for the info, I really appreciate it! [smile]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!