[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Icon in Dialog title bar

Posted on 1999-12-28
11
Medium Priority
?
534 Views
Last Modified: 2013-11-20
How can I add an icon in my dialog's title bar?

URGENT...PLEASE REPLY WITH CODE.
0
Comment
Question by:Archs
  • 6
  • 5
11 Comments
 

Author Comment

by:Archs
ID: 2311337
URGENT
0
 
LVL 8

Accepted Solution

by:
Vinayak Kumbar earned 150 total points
ID: 2311345
Hi,

Do this In OnInitDialog()

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

Hope this helps.
VinExpert
0
 

Author Comment

by:Archs
ID: 2311347
That works. In addition, what is the ID of the Microsoft Windows Icon.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 8

Expert Comment

by:Vinayak Kumbar
ID: 2311356
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
 

Author Comment

by:Archs
ID: 2311369
HEY THANX A TONN!
U REALLY R A WIN EXPERT VIN!

BTW..HAPPY NEW YEAR!

0
 

Author Comment

by:Archs
ID: 2311372
btw...how can i change my dialog color from the default grey to a color of my choice?
0
 
LVL 8

Expert Comment

by:Vinayak Kumbar
ID: 2311395
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
 

Author Comment

by:Archs
ID: 2311402
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
 
LVL 8

Expert Comment

by:Vinayak Kumbar
ID: 2311417
Hi,

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

Hope this info will help u in future.
VinExpert
0
 

Author Comment

by:Archs
ID: 2311424
@ @
 v

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

Expert Comment

by:Vinayak Kumbar
ID: 2311455
Hi,

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

VinExpert
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Question has a verified solution.

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

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses

591 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