Using LoadImage I changed the icon of all the windows in a group. However the group icon does not change. How can I get the corresponding group to a window and set its icon?
The group icon comes from the EXE file itself (in the case of multiple EXEs contributing to the same group, I imagine the taskbar has some algorithm to decide which EXE to pull the icon from). There is no official API to change the group icon. You would have to manipulate the Taskbar directly, which is not impossible but not trivial either.
Update: I just came across the following answer, maybe it will help you:
https://stackoverflow.com/a/219128/65863
Update: Apparently the Registry value in the above link only applies if the app is pinned to the Taskbar.
Your issue is this: The icon does infact take the icon of the first WINDOW, not exe. HOWEVER, after setting the icons, you have to right click on the icon in the taskbar, then pin it, then unpin it. On unpin the taskbar icon now takes the first windows icon.
I don't know how to programatically do this to maybe #RemyLebeau knows. Maybe setClassLongPtr? Not sure.
Now when it's pinned you want to make it use the same icon, so set the registry value like #RemyLebeau suggested.
Also I don't know how to explain this, but after unpinning, and the icon takes, if you open the jump list, the icon reverts back to the exe's icon. This may be fixed with the registry setting for pinned icon, I'm not sure.
Wow so Win7 taskbar is so tweakish.
Edit: I tried setting my registry values and the icon didnt work. It might have to do something with: the registry entires that i found for TaskbarGroupIcon all had a data value ending with a comma and a number (ex: ,-4 in %SystemRoot%\System32\imageres.dll,-4)
Related
I have windows 7 and here is my problem, I have an sequence of actions that I should make once every 3 minutes, it's right click on mcafee icon, and click on a parameter, that's all, I would like to create a keybord shortcut of that, I know that I didn't explain a lot, but I'm open to any questions you would have.
I assume that with "mcafee icon" you mean its tray icon.
If so, you can't do it with a single shortcut (unless that parameter you want to click on has one), but you can do it with either:
A sequence of shortcuts:
Windows key (or Ctrl+Esc)
Esc
Shift+Tab
Shift+Tab
You will now have set the focus on either the leftmost tray icon or the arrow to display the hidden tray icons (the focused item will have a rectangle around it), and you'll be able to move the focus to the other tray icons with the right or left keys. So...
Press the right or left keys until you focus the mcafee icon
Press the "menu key" or, if your keyboard doesn't have it, Shift+F10
You'll now have opened the mcafee's tray icon context menu, where if I understood you your "parameter" is. All you have left to do is to:
Select the "parameter" entry with the up or down keys
Press Return
Or you can probably do it with some kind of macro recording, UI automated testing or "gui scripting" (e.g. AutoHotKey) software . I don't know well any though so I can't advice you on that.
Beware that if you adopt the first solution the sequence of shortcuts solution will vary over time, you can't for example put it in a script and rely that it will always work, because the tray icons generally get placed in different orders and if you have the auto-hide feature enabled every now and then some get hidden.
The automated solution might be more stable instead, if the icons can be reliably identified.
I should also warn you that I wasn't able to really test the shortcuts' sequence on Windows 7 before posting, I have at my disposal at this moment just a Vista, but I'm rather confident it is valid for 7 too.
Is there any way to place the taksbar icons of all the open apps in Windows 8.1 next to each other automatically?
Say I open an app whose icon is on the far left, next to the start button, and I want said icon to appear to move to the far right of my string of icons, next to all my other open programs, automatically.
Is there any way to do that?
Do you mean, for applications that you have already pinned to the taskbar, you want them to move over to the end of the line of open programs? I don't think it is possible to set this option automatically. However, you can manually move them to where-ever and they will remain pinned. For other taskbar settings, just search Taskbar and the settings box will come up.
some of my icons disappeared, for example the whole Microsoft office icons, they disappeared in the start menu, programm and features and also on the desktop.,
what i've tried is , to go to the folder of the exe, and pin it to the taskbar this will also show up the icon for unknown exe. changing icon doesnt work for the shortcuts, its disabled.
then i made a new shortcut and put it on the desktop that will show up the original icon. so i can recreate the start menu and the desktop, but still the icons are missed in programm and features.
i also tried to delete the icon cache db a 100 times but that doesnt work.
has anybody a solution?
does somebody know where the icon references are stored in the registry. i dont know where to start
Rebuild the icon cache.
If that doesn't work look here for a quick and easy fix.
http://www.arcane.org/the-mystery-of-the-disappearing-windows-7-start-menu-icons/
I have a normal MFC Application with an embedded icon. If I start the application, the icon is shown inside the windows-7 taskbar.
But when I change the icon inside the resources, rebuild the application and start it, the taskbar doesn't show the current icon, but the icon from the first run.
There is no special code inside the application that does something specific with the windows-7 taskbar.
Is there a way, (in C++) to tell the windows-7 taskbar to show the current icon?
Did you empty/delete the shell icon cache?
I believe that if you rebuild an application, but it's still called by the same name, then explorer doesn't think it should reload the icon, even though the new icon is the only one in the app.
If you were to release the program, no-one else would have this problem since the first version of the app would have the new icon, but for your own purposes you can call SHChangeNotify(); from shell32.dll to refresh your own view of the icon.
did your remove the previous icon from resource....and assign the new icon to the file..too after putting in the resource...might that would work....
I've got an windows mobile 6.5 application I'm developing and am having trouble with one icon. At the top right hand of the screen there is an icon that, when clicked, will display a list of programs running the background with the option to close them.
When my program is in this list, it's icon does not show up as the others do.
I'm my exe I've got an .ico for 16x16, 22x22, 32x32, 36x36, 44x44, 45x45, 60x60, and 64x64, with the optional 90x90 png and registry setting in my cab.
What am I missing?
I'm just guessing here, but is this an HTC phone? Stock Windows Mobile does not have a "task list" icon in the system tray, so this task list is provided by the OEM. You would need to find out how they are obtaining the icon.
Chances are they are not obtaining it from the cab, but are actually getting it from your top level app window. You should check you're specifying the right icon in your WNDCLASS structure when calling RegisterClass. It is pretty common in WM to forget this because normally this icon is not visible.
Windows Embedded Handheld (Windows Mobile) 6.5/6.5.3 Appications use the exe embedded ico files only if there is no icon via registry available. In those cases the icon also look very ugly in the start menu. So you will have to add a registry entry to an icon file.
[HKEY_LOCAL_MACHINE\Security\Shell\StartInfo\Start\MyApp.lnk]
"Icon"="\Windows\myapp.png"
See also: https://blogs.windows.com/windowsexperience/2009/08/11/using-custom-icons-in-windows-mobile-6-5/