Jump to content
  • Advertisement
Sign in to follow this  
ChiefArmstrong

Custom icons/cursors in Dev-C++

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

I would like to use a custom icon and cursor in a C++ program written in Dev C++, however I don't have the ablility to make a "resource file." Could I just make an icon and a cursor and use the LookupIconIdFromDirectory function? If this isn't the correct function, then how could I do this?

Share this post


Link to post
Share on other sites
Advertisement
When you make a project under Dev-C++, you can go to the Project => Project Options menu. There, on the 1st tab ("General"), there is an Icon section. Click the [Browse] button to select your program's icon.

Don't know about the cursor, though.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:

I don't have the ablility to make a "resource file."


May I ask, why not?

The solution that lonesock gave will change the icon used to represent the application's executable file.

The icon displayed in the app's titlebar and the intial cursor can be loaded in the portion of your code that uses the WNDCLASS structure. According to MSDN, it is preferred that you use LoadImage() to load both of them. This function can load an app's resource or it can load a cursor or icon from a file. It can also cursors or icons that are used by the system.


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!