Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Large vs. small icon question

Posted on 1998-03-10
4
Medium Priority
?
247 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
[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
  • 2
4 Comments
 
LVL 39

Expert Comment

by:abel
ID: 1411878
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
ID: 1411879
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 400 total points
ID: 1411880
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
ID: 1411881
Thanks, this works.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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 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.…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
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…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

618 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