Icon in Dialog title bar

How can I add an icon in my dialog's title bar?

URGENT...PLEASE REPLY WITH CODE.
ArchsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ArchsAuthor Commented:
URGENT
0
Vinayak KumbarSr Program ManagerCommented:
Hi,

Do this In OnInitDialog()

HICON hicon = ::LoadIcon(0, IDI_HAND);
this->SetIcon(hicon, FALSE);

Hope this helps.
VinExpert
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ArchsAuthor Commented:
That works. In addition, what is the ID of the Microsoft Windows Icon.
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Vinayak KumbarSr Program ManagerCommented:
Hi,

R U looking for IDI_WINLOGO. U can go to the LoadIcon() function's help. U will get all of them(standard ones)

Cheers,
VinExpert
0
ArchsAuthor Commented:
HEY THANX A TONN!
U REALLY R A WIN EXPERT VIN!

BTW..HAPPY NEW YEAR!

0
ArchsAuthor Commented:
btw...how can i change my dialog color from the default grey to a color of my choice?
0
Vinayak KumbarSr Program ManagerCommented:
Hi,

Hay, That is one more big question!!!.
U want me to tell the trick?.

Ok I will tell it to U.

Go to dialog's .h file. Add the following line of code
CBrush m_MyBrush;

Then in the OnInitDialog() function
m_MyBrush.CreateSolidBrush(RGB(255,0,0));

Now go to classwizard and map the WM_CTLCOLOR message to ur dialog class.

Then in the OnCtlColor() function instead of returning default brush, return Urs.
So replace
return hbr;
with
return m_MyBrush;

That will solve Ur Problem.
Hope this will give some GUI fantacy.
VinExpert


::But I have a question, why u gave me B grade?
0
ArchsAuthor Commented:
THAT'S PERFECT!

well...i am new to this site and really don't know how the grading works!
Sorry ... u definitely deserve an AAA!

Will ask more questions in future...tougher ones....and will definitely give u an AAAAAAA next time!

0
Vinayak KumbarSr Program ManagerCommented:
Hi,

But U can't give an AAAAAAA to a single question :-)

Hope this info will help u in future.
VinExpert
0
ArchsAuthor Commented:
@ @
 v

i think this is a wonderful site!
never expected to get replies so fast!
don't u agree!
0
Vinayak KumbarSr Program ManagerCommented:
Hi,

Thats why I got used to it.
And made to U tooooo(sorry, I am assuming like that!)

VinExpert
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.