Link to home
Start Free TrialLog in
Avatar of Archs
Archs

asked on

Icon in Dialog title bar

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

URGENT...PLEASE REPLY WITH CODE.
Avatar of Archs
Archs

ASKER

URGENT
ASKER CERTIFIED SOLUTION
Avatar of Vinayak Kumbar
Vinayak Kumbar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Archs

ASKER

That works. In addition, what is the ID of the Microsoft Windows Icon.
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
Avatar of Archs

ASKER

HEY THANX A TONN!
U REALLY R A WIN EXPERT VIN!

BTW..HAPPY NEW YEAR!

Avatar of Archs

ASKER

btw...how can i change my dialog color from the default grey to a color of my choice?
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?
Avatar of Archs

ASKER

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!

Hi,

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

Hope this info will help u in future.
VinExpert
Avatar of Archs

ASKER

@ @
 v

i think this is a wonderful site!
never expected to get replies so fast!
don't u agree!
Hi,

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

VinExpert