How Do I Create Rounded Drop-down Menus on Windows 11?

norepimorphism 1 Reputation point
2022-04-28T15:35:49.097+00:00

Hello,

I'd like to achieve the following style in my Win32 app:
197442-4852444d-fb8b-41fb-bc0c-2806764261bf.png

When I click on a menu name for the first time, the rounded drop-down menu displays correctly. However, when I move the cursor across a different menu name, or open the same drop-down menu again, the style changes to that of Windows 10:
197320-5cba3a5b-96bc-4417-8aba-a9c0ae8c9622.png

Why is this, and how can I ensure that my drop-down menus consistently use the Windows 11 style? I'm using the C++ WinAPI directly.

Thanks,
norepi

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,422 questions
C++
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.
3,527 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,163 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Castorix31 81,721 Reputation points
    2022-04-28T16:34:01.27+00:00

  2. Xiaopo Yang - MSFT 11,496 Reputation points Microsoft Vendor
    2022-04-29T02:35:34.867+00:00

    I cannot reproduce it with my Win32 application created by VisualStudio WindowsDesktopApplication template.
    Also as the Apply rounded corners in desktop apps for Windows 11 document said,

    If your app is not rounded by policy, it could be caused by one of the following things:

    Lack of frame styles
    Empty non-client area
    Other customizations, such as extra non-child windows used for custom shadows

    0 comments No comments

  3. norepimorphism 1 Reputation point
    2022-04-30T19:51:36.293+00:00

    As @David Lowndes suggested, I created a new application that uses the same underlying GUI library, and now my rounded corners are persistent. I'm really not sure what the issue was, but at this point, I'd rather accept this fact and move on without spending any more time debugging the issue.

    For reference, the affected program was built on Rust bindings to libui-ng and packaged alongside a manifest with compatibility GUIDs for Windows Vista and beyond.

    Thanks, everyone, for your input!

    0 comments No comments