Solved

Large vs. small icon question

Posted on 1998-03-10
4
230 Views
Last Modified: 2013-12-03
Greetings.  In my 32-bit Windows 95 app, I have both large and small versions of my icon that I would like Windows to display in Explorer.  Windows doesn't seem to be cooperating with me--it either wants to use my large icon for both, or my small icon for both, depending upon the how I order them in my resource file.  Is there a way to force Windows to select the appropriate default icon for each?
TIA.
0
Comment
Question by:danbind
  • 2
4 Comments
 
LVL 39

Expert Comment

by:abel
Comment Utility
It might help if you just hit F5 (refresh) in the explorer, but you probably tried that already.

Looking to your prior questions, I assume you use C++. Make sure your icon is in one resource-file. Hit the button next to where it says "32x32 (standard)" to make a new image of the same icon in the same resource. Make sure you choose 16x16 then. If you have both a 16x16 and a 32x32 in the same iconresource, make a shortcut to your compliled application. Look at the "Change icon"-dialog box in the properties window. It should only show you one icon, the 32x32. If you see here both the 32x32 and 16x16 icon, you have a problem and probably didn't put the icons in one iconresource file. If you did, I'm lost for the moment but would like some more details, like what version of C++, are you using MFC and did you use it with the app-wizard or not.

Hope this helps, if it doesn't, reject my answer to leave it to other experts. If you need more help, I'll be happy to post any comments.

Regards, Abel
0
 

Author Comment

by:danbind
Comment Utility
Thanks a lot for the comments--I guess I should have provided more info, especially now that I've investigated the issue a little more.  It seems that the WNDCLASSEX structure has an entry for the small icon, which you can set using RegisterClassEx() (sp?).  However, this is an old OWL application that I built with Borland C++ 4.52, and the help documentation doesn't specifically say that it supports WNDCLASSEX or RegisterClassEx(), which are updates of WNDCLASS and RegisterClass() for Win32 and/or Windows95.   This version of BC++ came out right about the same time as Windows 95, so it supports a lot of new Windows 95 functionality, but not all.
   So my revised question is this:  can I access the WNDCLASSEX structure from a BC++4.52 OWL app, or if not, is there a work-around?  I would move this question to the OWL zone if it was possible, and I'm kind of low on points right now--I need to make every one count!  Thanks.
0
 
LVL 22

Accepted Solution

by:
nietod earned 100 total points
Comment Utility
I don't know anything about OWL, but you can get around it.  During startup, register the window class using OWL as usual.  Then get the window class information using GetClassInfoEx(), then unregister the class using UnregisterClass().  Alter the class information to specify the small icon, and reregister the class using RegisterClassEx().
You must do this before any windows are created that use the class.
0
 

Author Comment

by:danbind
Comment Utility
Thanks, this works.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

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

8 Experts available now in Live!

Get 1:1 Help Now