Taskbar button icon problem

My GUI is in a floating desktop window and is implemented as a DLL. I have an icon for it specified in the RC file in .icon format. The icon has both 16x16 and 32x32 sizes. When I switch windows using ALT-TAB I see my icon but in the taskbar button I see the standard icon for DLL and not my icon. Any idea why (it worked with JUCE 1.8 with the same icon)

thanks

Hey! I’m still a noob, and I dont really understand what you are doing, but I think DLLs are not really supposed to have icons. Does the hosting app have an icon?

Any desktop window can have an icon in Windows…the Window just take it from the icon in the DLL resource. This stuff worked in my previous version that used JUCE 1.8, now I am using JUCE 1.20 and it does not but I don’t know if I changed anything or is it JUCE…

Oh I see. I spoke in haste.

If it shows up when you alt-tab windows can obviously get at the resource.

The icon is set in createWindowCallback() in juce_win32_Windowing.cpp - I changed the way it worked recently so it gets the icon from the module handle set by PlatformUtilities::setCurrentModuleInstanceHandle()…

So if you’re bypassing the normal JUCEApplication startup code, are you making sure you set that value to the handle of you DLL when it gets loaded? Have a look at the VST wrapper code for an example of this.

I already fixed the PlatformUtilities::setCurrentModuleInstanceHandle() and this solved the icon problem but I see it only in the ALT-TAB scenario and not the smaller taskbar button secenario. Any idea how this happened?

thanks

Not sure - Windows is a bit strange when it comes to picking the icon to use, and I couldn’t figure out exactly how it chooses the one to use when there are different sizes, etc.

I guess its not critical, i have this problem alone left in the PC version and the repaint after unhide in the Mac version so I guess I am ready for release, just mention it in the 'issues list…