On Tue, 30 Jun 2026 15:19:43 GMT, Alexey Ivanov <[email protected]> wrote:

>> This docu 
>> https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getsyscolor
>> says about COLOR_MENUBAR
>> 'Windows 2000, Windows 10 or greater:  This value is not supported.'
>> probably that's why we define it in the codebase.
>> Regarding 'built on NT', I think we can remove this (maybe it was the case 
>> 20 or 25 years ago) ?
>
> Yes, I think they're safe to delete now: both the comment and the `ifndef`.
> 
> Windows XP introduced visual styles, and the menu bar and pop-up menus have 
> different background colors.

> [URL] says about COLOR_MENUBAR: Windows 2000, Windows 10 or greater: This 
> value is not supported

I think that means it's still defined as a constant (so no need for the 
`ifndef`), just not fully usable as a parameter in some places. Checked locally 
on Windows 11 25H2 (build 26200.8655):


#include <windows.h>
#include <stdio.h>

int main(void) {
    printf("COLOR_MENUBAR = %d\n", COLOR_MENUBAR);
    printf("GetSysColor(COLOR_MENUBAR) = 0x%08lX\n", 
GetSysColor(COLOR_MENUBAR));
    return 0;
}


Output:


COLOR_MENUBAR = 30
GetSysColor(COLOR_MENUBAR) = 0x00F0F0F0

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/31676#discussion_r3500629752

Reply via email to