Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Setting up an Icon for my app.

Posted on 2002-06-12
8
Medium Priority
?
233 Views
Last Modified: 2010-04-15
Hi. I just created this small Win32 Console Application. It runs in a DOS window. I need to setup an Icon for it different from the one setup automatically by Windows.

How can I do this????

p.s. I am using Visual C++ 6.0 for development.
Thanks in advance.
0
Comment
Question by:dyma82
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 7073264
Add an Icon resource to your project, that's it.
0
 
LVL 1

Author Comment

by:dyma82
ID: 7073340
I did that, but my project keeps having the default windows Icon for Console applications. Do I have to change any setting for the project????

Thanks a lot!
0
 
LVL 86

Expert Comment

by:jkr
ID: 7073353
Hmm, you will also have to make sure that the resource ID for the icon is '1'
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 1

Author Comment

by:dyma82
ID: 7075329
Let me try that...
0
 
LVL 1

Expert Comment

by:RolandAZ
ID: 7080316
jkr is correct, dyma.
Just create a resource icon,
resource value doesn't have to be "1," though.

If you didn't see your app with your custom icon,
you tried running it inside VC++. It seems like VC++ IDE
doesn't set the icon for the console app.


Look at your executable file, you'll see it has your
custom icon. Run it from outside VC++, it will display your icon.
:)

give jkr the points. :)

hope that helps!
Roland


0
 
LVL 1

Author Comment

by:dyma82
ID: 7083758
Hi. I did all you guys said. It still does not work.
Does it have any importance the fact that this is a
Win32 console application???

I was able to create the Icon in Visual C++ (That's the IDE I am using). Then, I compiled my code, but nothing special happen. My app kept it blue-and-white little window as an icon.

How can I check the resource ID for the icon???

Thanks a lot for your help.
0
 
LVL 86

Accepted Solution

by:
jkr earned 200 total points
ID: 7083803
Check your .rc file - there should be an entry like

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
1           ICON    DISCARDABLE     "myicon.ico"

BTW - you have added the .rc file to your project, have you?
0
 
LVL 1

Author Comment

by:dyma82
ID: 7084028
Hey "jkr", I was missing just that. Adding the d... .rc file to my project. Now it is working fine!!!


Thanks a lot everybody.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question