You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am writing a tray application under Windows. The tray menu needs to have multiple radio items and set a default item. I read the menu-related documents and did not find a way to implement this function.
It is easy to implement in traditional Window applications, and the effect is as follows:
Describe the solution you'd like
Radio item: Checks a specified menu item and makes it a radio item. At the same time, the function clears all other menu items in the associated group and clears the radio-item type flag for those items.
Default item: Specifies that the menu item is the default. A menu can contain only one default menu item, which is displayed in bold.
Describe the problem
I am writing a tray application under Windows. The tray menu needs to have multiple radio items and set a default item. I read the menu-related documents and did not find a way to implement this function.
It is easy to implement in traditional Window applications, and the effect is as follows:
Describe the solution you'd like
Radio item: Checks a specified menu item and makes it a radio item. At the same time, the function clears all other menu items in the associated group and clears the radio-item type flag for those items.
Default item: Specifies that the menu item is the default. A menu can contain only one default menu item, which is displayed in bold.
Win32 API
CheckMenuRadioItem()
: https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-checkmenuradioitemSetMenuDefaultItem()
: https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setmenudefaultitemMENUITEMINFOA
structureMFT_RADIOCHECK
andMFS_DEFAULT
: https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-menuiteminfoaAlternatives considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: