c++winapimfc

Date and Time Picker Control with DTS_SHOWNONE style has huge oversized checkbox


My C++ application contains standard Date and Time Picker Control with DTS_SHOWNONE style in UI. When app works on Windows 11 the control renders none checkbox blurry and oversized.

I've created the simplest Dialog based MFC app from Visule Studio 2022 template and i see the same behavior of Date and Time Picker Control.

enter image description here

Both application and MFC sample use standard Windows manifest:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <dependency>
        <dependentAssembly>
            <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="amd64" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
        </dependentAssembly>
    </dependency>
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
        <security>
            <requestedPrivileges>
                <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
            </requestedPrivileges>
        </security>
    </trustInfo>
    <application xmlns="urn:schemas-microsoft-com:asm.v3">
        <windowsSettings>
            <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
        </windowsSettings>
    </application>
</assembly>

The question only one, how to fix it?

P.S.: The same application and sample works good on Windows 10, so i would say the bug is in Windows 11 version of Date and Time Picker Control.

UPDATE: It seems that control checkbox fills whole height, that looks weird. enter image description here


Solution

  • Promote @JonathanPotter 's comment to answer.

    It's a Windows high-DPI bug. Unfortunately there's exactly zero chance of Microsoft ever doing anything about it. We were forced to render our own in order to fix it.

    I submitted new internal feedback about this, https://aka.ms/AAryqe9.