[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Assigning custom size icons to CStatic controls

Posted on 1997-08-14
5
Medium Priority
?
339 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
ID: 1303801
Another icon size I want to use is 550x30.  How can I set this?

Dave
0
 

Accepted Solution

by:
syjwg earned 150 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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…
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.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .

834 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