Solved

Assigning custom size icons to CStatic controls

Posted on 1997-08-14
5
317 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
  • 3
  • 2
5 Comments
 

Author Comment

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

Dave
0
 

Accepted Solution

by:
syjwg earned 50 total points
Comment Utility
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
Comment Utility
continuing...
Because I don't believe SetIcon() works, but you can always try.
0
 

Author Comment

by:David Gray
Comment Utility
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
Comment Utility
I got the articles from another site.  Thanks for the help.

Dave
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now