• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 250
  • Last Modified:

Large vs. small icon question

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
danbind
Asked:
danbind
  • 2
1 Solution
 
abelCommented:
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
 
danbindAuthor Commented:
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
 
nietodCommented:
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
 
danbindAuthor Commented:
Thanks, this works.
0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now