Solved

Large vs. small icon question

Posted on 1998-03-10
4
237 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
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 100 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
RIA: CancelEdit() doesn't change entity back to Unchanged status 5 34
how to bring to back always mid parent image form 21 79
Post a good COM tutorial 1 53
SSRS troubles 4 46
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.…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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 a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

813 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