Control Panel items are normally registered under HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace, however a lot of the built-in panels aren't listed there, such as the Automatic Updates item.
I'm trying to find out where the icon used for the Automatic Updates item is. If you open the Control Panel in Tiles mode (48x48 icons) you'll see the icon is being scaled up, yet all of the icon resources in all of the Windows Update files have 48x48 subimages, so I can't figure this one out.
It's a similar story with the NVidia control panel item: the icon is black and seemingly downscaled from a subimage larger than 48x48, yet the actual nvidia control panel files don't contain this black icon (instead they have the silver version). When I create a Shortcut to the control panel item and inspect its binary bits there is no path to the icon specified, just to the cpl file itself (with the totally different icon). I've checked the registry and there aren't any clues in there either.
Any ideas?
Control Panel applets can be registered in several different ways, or not at all (if they reside in the %system% folder):
Registering Control Panel Items
If an applet does not register its icon information in the Registry, then the applet has to provide the icon information when requested by the Control Panel via the CPL_INQUIRE and/or CPL_NEWINQUIRE messages to its CPLApplet() entry point, in which case the applet has no idea what size icon to return. It sounds like maybe you are running into that scenario.
Related
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)
I've got a Windows Mobile 5 and i need to hide settings icon
We have employees that don't speak English, and I need the desktop to be very simplified. I just need hide the icon settings beacause got configuration that they cant to move
Here is an application including source code to hide elements from the home screen.
You have to look at the registry at HKLM\Software\Microsoft\Today\Items and set Enabled=0 for the items that should not be shown.
The settings icon is controlled separately by HKLM\Security\Shell\StartInfo:HideSettings registry key.
Although you can hide the settings icon, the user can still access settings using the top bar! To prohibit that you need to code more. See my KIOSK articles at my web blog above.
In my MFC app, I'm attempting to make a window that resembles the Windows 7 Open File dialog, but it browses a virtual/fake file system. It doesn't need to be pixel-perfect, but I'd like parity with the native OS dialog where possible.
Probably the most challenging part is the address bar the runs along the top of an Open dialog. The address bar control is also atop all Windows Explorer windows. It shows the folder names that make up your path. It shows and hides buttons when moused over (including an attractive fade animation), changes the active directory when names are clicked, and shows submenus when the triangles between names are clicked. This doesn't seem to correspond to any MFC control (or group of controls). Spy++ shows it as an "AddressDisplay Control" but I can't find much documentation beyond that.
Is there a way to access a control like this, or to mimic it, in MFC? Also, I am not browsing the real file system, so I have to be able to tell the control what to display--I can't just point it at C:\ and let the system do the rest.
Here's a picture of the control in question.
Unfortunately, I think this is one of those controls that Microsoft has decided not to expose to developers through the Feature Pack. The Feature Pack was developed from the BCG control library. And, that library contains the control you want. However, it's not free. The only other alternative is to code it yourself.
I am porting an old (Visual Studio 6.0) application to Visual Studio 2012 in order to add some enhancements. The application's icon in the resources view clearly has 2 versions of the icon, a 32x32 4bit bitmap and a 16x16 4bit bitmap.
In the main AppDlg.cpp there are 2 calls to SetIcon() as follows (created by default by MFC app wizard):
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
However, the icon displayed in the top left corner of the application's dialog window is the larger one, scaled down to 16x16 instead of the small one. Its also happening for the icon shown in the system tray.
It seems it uses the correct small one for the executable file when viewing it in Windows Explorer (detailed view / list view). So it is picking the small one in some circumstances.
How do I make it choose the smaller 16x16 icon for the top left corner of the dialog box and System tray?
Known Microsoft bug. See this discussion. (if you do not want to read, just comment out SetIcon(m_hIcon, FALSE) line and you'll be fine). Please note, that SetIcon only sets the icon on the dialog title bar (small icon) and when you use Alt-tab (big icon)
The icons you see in the Windows Explorer are the main Application Icons (the icon with the lowest ID in you rc file). It has nothing to do with the main dialog's SetIcon() method
The icon in the System Tray is something completely different. Normally, you would use Shell_NotifyIcon API to set the icon, but I bet your project would have a helper class that sets the icon CSystemTray by Chris Maunder is a popular one used by many programmers. Just search for Shell_NotifyIcon in your program to find out exactly what resource is used for the system tray icon
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/