Using an application manifest to disable window theming

RLWA32 50,826 Reputation points
2021-08-06T16:09:04.423+00:00

According to application-manifests the disableTheming element is available. I added the necessary xml to my application manifest for a Win32 desktop application but it seems that disableTheming is ignored by the system.
The xml that was added to the application manifest was as follows

<?xml version="1.0" encoding="utf-8"?>  
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">  
    <asmv3:application>  
        <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">  
            <disableTheming>true</disableTheming>  
        </asmv3:windowsSettings>  
    </asmv3:application>  
</assembly>  

The documentation at manifest-file-schema indicates that disableTheming belongs to the http://schemas.microsoft.com/SMI/2011/WindowsSettings namespace but this is erroneous. An application using this namespace in the manifest fails to start with an SxS error that disableTheming is not registered. Inspection of the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SMI\WinSxS Settings\x86_microsoft-windows-settings_31bf3856ad364e35_none_025c648fcaefab55 indicates that the 2005 namespace is the correct one.

Regardless of the manifest contents dialog windows and their controls continue to be themed. Has anyone gotten disableTheming to work?

Windows development | Windows API - Win32
Developer technologies | C++
Developer technologies | C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.