Open medasaro opened 4 years ago
This doesn't work for ntvdm either but maybe ideas can be found with java programs like https://stackoverflow.com/questions/1834599/pinning-a-java-application-to-the-windows-7-taskbar .
Setting PKEY_AppUserModel_RelaunchCommand and PKEY_AppUserModel_RelaunchDisplayNameResource works, but the icon disappears. Setting PKEY_AppUserModel_RelaunchIconResource will show the icon, but it's a nasty issue because the icon needs to be saved to a file.
Looking at how 32-bit applications behave when pinned, it appears that the icon that is in the task bar is the icon associated with the executable file not the icon that the application's main window has. So we should be able to extract the icon from the application executable and use that for the task bar icon when pinned.
-Matthew
Trouble is the program doesn't know when something is pinned so every win16 window would have to get it's icon extracted. A compromise might be to see if progman dde already saved an icon when the program was installed and use that otherwise just use a default icon.
This problem has been plaguing users since, I think, Windows 7, even on 32bit version. Microsoft for some reason removed their 16bit Icon parsing support (iirc they claimed that it was for security reasons) from the PrivateExtractIconsW API function. I updated the NTVDMx64 loader code https://github.com/leecher1337/ntvdmx64/commit/9b966f587023e5c2e36270cdad895ec12ecc8e13 so that 16bit Icon support can be restored in Windows. If you install the most recent NTVDMx64 loader, you can work around the bug with it. The compiled version of the updated loaders is available in my github repository, as you can see.
Winevdm extracts icons upon installation just well. As well as in runtime.
This problem has been plaguing users since, I think, Windows 7, even on 32bit version. Microsoft for some reason removed their 16bit Icon parsing support (iirc they claimed that it was for security reasons) from the PrivateExtractIconsW API function.
The official point of view on this seems to be this one: http://technet.microsoft.com/en-us/magazine/cc462815.aspx
To reproduce: 1) Open a 16-bit windows application in winevdm 2) Right click on the application's icon in the taskbar 3) Select "Pin to taskbar" 4) Close the 16-bit application 5) Click on the newly created icon on the taskbar
Expected behavior: The application launches
Actual behavior: winevdm launches and asks for the location of a .EXE file.
Platform: Windows 10 Pro
-Matthew D'Asaro