cwindowswinapititlebar

How do I make my program use the windows 7 basic and classic title bar instead of the windows 10 title bar?


I wanted to give my winapi c program an old look, but I wasn't able to find any documentation on how to do this without creating a custom title bar. Does anyone know how to do this?

7z installer run in compatibility mode

Note: I got these title bars by running the compatibility mode in the properties tab. For classic title bar, I ran the program for WinXP (SP3) and turned on 8 bit color and for the Windows 7 classic title bar, I just ran it under WinXP (SP3).

During booting, the classic title bar is active before winlogon.exe loads and then after that goes the Windows 7 basic title bar. When dwm.exe loads uxtheme.dll, that's when the Windows 10 title bar becomes active.


Solution

  • SetWindowTheme(hWnd, L" ", L" ");

    Gives the Win95 look. Works with controls too.

    Back to normal:

    SetWindowTheme(hWnd, NULL, NULL);

    In UsbTreeView and other tools, I use that to switch the theme on and off for the controls at runtime without any problem (Options -> Windows Theme).