Solved

Assigning custom size icons to CStatic controls

Posted on 1997-08-14
5
333 Views
Last Modified: 2013-11-19
I want to have the custom size icons I've created assigned to a CStatic control, but for some reason the only thing it wants to display is the 32x32 icon image rather than my 40x45 icon image.  Is there a way to set the CStatic control so it displays the one I want.  Source examples, please.

Thanks in advance,
    Dave
0
Comment
Question by:David Gray
[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
  • 3
  • 2
5 Comments
 

Author Comment

by:David Gray
ID: 1303801
Another icon size I want to use is 550x30.  How can I set this?

Dave
0
 

Accepted Solution

by:
syjwg earned 50 total points
ID: 1303802
The problem is that LoadIcon() etc. always returns a HICON to
a standard 32x32 icon. But...
Go to www.microsoft.com and use the search engine. Look for
"ReadIconFromICOFile" (there will be 3 records found). In the
file ICONS.C you will find the complete answer how to get a
real HICON from any icon file. When this is done you just have
to override CStatus::OnPaint (if you want a CStatic to
to the job?!) and draw it your self with DrawIcon().
0
 

Expert Comment

by:syjwg
ID: 1303803
continuing...
Because I don't believe SetIcon() works, but you can always try.
0
 

Author Comment

by:David Gray
ID: 1303804
I have tried for the past four days to get onto the MSDN site, and I haven't been able to get the files you're suggesting I look at.  I'm not a registered member the MSDN site, but I have tried countless times to register but the server is always to busy to allow me to register.  I would really appreciate it if you could e-mail these three files to me, as I can't seem to get them.

I really appreciate it,
    Dave
    jedimstr@esus.cs.montana.edu
0
 

Author Comment

by:David Gray
ID: 1303805
I got the articles from another site.  Thanks for the help.

Dave
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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

705 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