PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Weird problem with icon in Explorer  (Read 352 times)

Wilko Verweij

  • FireFly3 Registered User
  • Junior FireFly Member
  • *
  • Posts: 148
  • PB10 - FF3.7 User; Win 10
    • CHEAQS
Weird problem with icon in Explorer
« on: June 27, 2017, 03:59:52 PM »

Hi,
I have a weird problem with a program I am developing. Initially, I had one icon included in the resource file. Looks like this:
Code: [Select]
IMAGE_CHEAQS ICON "IMAGES\\CHEAQS.ICO"
I use that icon to appear on the top left of my program window (loaded with LoadImage in the RegisterClassEx call). Works fine. Now I added two other icons in the resource file. Looks like this now:
Code: [Select]
IMAGE_CHEAQS ICON "IMAGES\\CHEAQS.ICO"
ICON_INPUT ICON "IMAGES\\INPUT48.ICO"
ICON_OUTPUT ICON "IMAGES\\OUTPUT48.ICO"
I do not use the icons in the program itself, but use them in an utility program to associate input and output files with my main program. That works. However, in Windows Explorer, my main program now displays the second icon in this list while before the first one was displayed. I do not want that. How to change that?
What I already tried:
  • clear the icon cache by deleting iconcache.db
  • replace the first icon with a 64x64 copy (because the first icon originally is 32x32 and the second and third are 48x48; I thought maybe Windows selects a bigger one)
Any suggestions? I write this program with winfbe and freebasic.
Wilko
Logged

Josť Roca

  • FireFly3 Registered User
  • Master FireFly Member
  • *
  • Posts: 2785
    • Josť Roca Software
Re: Weird problem with icon in Explorer
« Reply #1 on: June 27, 2017, 04:46:08 PM »

Alphabetically, ICON_INPUT goes before IMAGE_CHEAQS. Either use numbers or use, for example, A_IMAGE_CHEAQS ICON "IMAGES\\CHEAQS.ICO".

Wilko Verweij

  • FireFly3 Registered User
  • Junior FireFly Member
  • *
  • Posts: 148
  • PB10 - FF3.7 User; Win 10
    • CHEAQS
Re: Weird problem with icon in Explorer
« Reply #2 on: June 27, 2017, 04:51:55 PM »

You are right (as ever...). It picks the first one from the alphabet...
Thanks again,
Wilko
Logged

Petrus Vorster

  • FireFly3 Registered User
  • Senior FireFly Member
  • *
  • Posts: 356
Re: Weird problem with icon in Explorer
« Reply #3 on: June 28, 2017, 08:59:40 AM »

Cool, and i never bothered to ask here on the forum, assuming i did something stupid again...
Will definitely go look at my resource file tonight.
Logged

Wilko Verweij

  • FireFly3 Registered User
  • Junior FireFly Member
  • *
  • Posts: 148
  • PB10 - FF3.7 User; Win 10
    • CHEAQS
Re: Weird problem with icon in Explorer
« Reply #4 on: June 28, 2017, 12:33:11 PM »

I assumed I did something stupid again too (and I did; I always thought the order in which resources are mentioned in the resource file was determining). But I keep asking. (Some) People here are real experts, and always friendly...
Logged

Petrus Vorster

  • FireFly3 Registered User
  • Senior FireFly Member
  • *
  • Posts: 356
Re: Weird problem with icon in Explorer
« Reply #5 on: June 28, 2017, 05:36:33 PM »

If it wasn't for these guys on this forum I probably would have been stuck in VB 6 still making silly little programs. I still don't know half of what they know, but my hobby projects and office tools got seriously better to the extent that i could produce tools i never imagined i would do. (and made my work a whole lot easier!!!)
I owe them a lot. You too had helped a lot!! very thankful for everything.
Logged