If you’re using a custom icon file, make sure it’s at least 128 x 128. For this example, I used a notepad icon file from the web, saved it to a permanent location, and mentioned the full path.
If the DefaultIcon key does not exist by default, you need to create it manually. Navigate to the following key (where txtfile is the Prog ID noted in Step 2 or Step 4 above) HKEY_CLASSES_ROOT\txtfile\DefaultIcon.In the right pane, note down the (default) value data (e.g.If the UserChoice branch does not exist, navigate to the following branch: HKEY_CLASSES_ROOT\.txt.This is the user-chosen (via Default Programs or Open with dialog) Programmatic Identifier for the file extension. In the right pane, note down the value data for Progid (e.g.Navigate to the following branch: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt\UserChoice.Click Start, type regedit.exe, and press Enter.Let’s assume you want to change the file type icon for.
MFC SET ICON FOR FILE HOW TO
In the second method, let’s see how to change the default icon using Default Programs Editor. You can change the default icon for a file type using the built-in Registry Editor. Instructions apply to all versions of Windows, including Windows 10 How to Change the Default Icon for a File Type
This article explains how to change the default icon for a file type using different methods in Windows.