WinFBX Check3State

Windows specific questions.
Post Reply
deltarho[1859]
Posts: 4310
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

WinFBX Check3State

Post by deltarho[1859] »

@Josep Roca

Hi José

When I use the following

pWindow.AddControl("Check3State", , IDC_CheckboxArch, "-arch ?", 66, nTop-25, 92, 20)

the BST_INDETERMINATE is not a greyed tick but a small black box.

It seems that programmatically all is well - it is just the display which is behaving oddly.
Josep Roca
Posts: 564
Joined: Sep 27, 2016 18:20
Location: Valencia, Spain

Re: WinFBX Check3State

Post by Josep Roca »

???. It works fine in my computer.
deltarho[1859]
Posts: 4310
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: WinFBX Check3State

Post by deltarho[1859] »

Thanks, José.

Check3State works OK with a PowerBASIC program. I then realized that the PB program was not themed, so I removed ' 1 24 "Theme.xml" ' from the rc file and the FreeBASIC program now works as it should.

So, there is something wrong with my Theme.xml which I have been using for ages without issue.

The xml was built from other people's submissions to get the best that I could - I am completely out of my depth here, so I may be gone sometime unless someone can spot what is wrong.

Theme.xml

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">

    <assemblyIdentity
        version="1.0.0.1"
        processorArchitecture="*"
        name="MyAppName.exe"
        type="win32"
    />
    <description>Optional MyDescription for MyAppName.exe</description>
    
    <asmv3:application>
        <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
        <dpiAware>true</dpiAware>
        </asmv3:windowsSettings>
    </asmv3:application>

    <!-- Compatibility section for Program Compatibility Assistant (PCA) -->
    <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
        <application>
            <!-- Windows Vista -->
            <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
            <!-- Windows 7 -->
            <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
            <!-- Windows 8 -->
            <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
            <!-- Windows 8.1 -->
            <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
            <!-- Windows 10 -->
            <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
        </application>
    </compatibility>

    <!-- Trustinfo section for User Account Control (UAC) -->
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
        <security>
            <requestedPrivileges>
                <!-- level   = "asInvoker"            -->
                <requestedExecutionLevel
                    level    = "asInvoker"
                    uiAccess = "false"
                />
            </requestedPrivileges>
        </security>
    </trustInfo>

    <!-- Dependency section -->
    <dependency>
        <dependentAssembly>
            <assemblyIdentity
                type="win32"
                name="Microsoft.Windows.Common-Controls"
                version="6.0.0.0"
                processorArchitecture="*"
                publicKeyToken="6595b64144ccf1df"
                language="*"
            />
        </dependentAssembly>
    </dependency>

</assembly>
deltarho[1859]
Posts: 4310
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: WinFBX Check3State

Post by deltarho[1859] »

I have just used the xml that Paul Squires uses in WinFBE and that isn't working correctly either; at least I am in good company. Image
deltarho[1859]
Posts: 4310
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: WinFBX Check3State

Post by deltarho[1859] »

Yours truly wrote:Check3State works OK with a PowerBASIC program.
So, I themed that, and we have a problem there now.

Either there is something wrong with the xml file or Windows theming is up the spout.

I tried changing the compatibility mode going back to XP and I could not find an OS where it worked properly. It was nice to see an XP theme again, I miss that.

Looks like there is something wrong with the xml file.
Josep Roca
Posts: 564
Joined: Sep 27, 2016 18:20
Location: Valencia, Spain

Re: WinFBX Check3State

Post by Josep Roca »

The appearance of Windows controls is not the same if you use themes. Using themes, the inderteminate state does not appear as greyed, but as a small black box, it seems.
deltarho[1859]
Posts: 4310
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: WinFBX Check3State

Post by deltarho[1859] »

Yep - found this Control templates

We live and learn.

It seems that we can create a template to change how the controls look, but I am definitely not going there. Image
Last edited by deltarho[1859] on Feb 21, 2020 22:17, edited 1 time in total.
Josep Roca
Posts: 564
Joined: Sep 27, 2016 18:20
Location: Valencia, Spain

Re: WinFBX Check3State

Post by Josep Roca »

Image
Post Reply