Microsoft KB Archive/269863

{|
 * width="100%"|

BUG: Check Marks Missing from System Menu

 * }

Q269863

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK), on platform(s):
 * Microsoft Windows 98
 * Microsoft Windows Millennium Edition

-

SYMPTOMS
On Windows 98 and Windows Me platforms, if the entire contents of the system menu for a window are deleted and the new nonbitmap items are added, check marks and/or radio buttons are not displayed in the menu.

CAUSE
On Windows 98 and Windows Me, space is not generated for a check mark if a bitmap is not associated with at least one of the menu items, regardless of whether or not the bitmap is used.

RESOLUTION
To completely repopulate the system menu with new items (having removed all original items), you must ensure that at least one of the items you are adding to the system menu has a bitmap associated with it.

STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

MORE INFORMATION
When a user clicks the application icon (often called the system icon) of an application window, the system menu is displayed. This menu can be accessed, modified, or reset by using the GetSystemMenu function.

If you call GetSystemMenu with the bRevert parameter, the function returns a copy of the menu, which can be modified. If you call the function with the bRevert parameter set to TRUE, the system menu is reset to its original state, and returns NULL.

The following code illustrates how to add a menu item to the system menu that has a bitmap associated with it:

//Insert a checked menu item that will ensure check marks are visible: MENUITEMINFO mii ; ZeroMemory(&mii, sizeof(mii)) ; mii.cbSize = sizeof(mii) ; mii.fMask = MIIM_STRING|MIIM_STATE|MIIM_BITMAP; mii.dwTypeData = TEXT(&quot;test item&quot;) ; mii.cch = lstrlen(TEXT(&quot;test item&quot;)) ; mii.fState = MFS_CHECKED ; mii.hbmpItem = HBMMENU_SYSTEM ; InsertMenuItem(hmenu, 0, TRUE, &mii) ; Additional query words:

Keywords : kbMenu kbSDKWin32 kbGrpDSUser kbOSWin98bug kbDSupport kbOSWinMEbug

Issue type : kbbug

Technology : kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWin32sSearch