PRB: TrackPopupMenu() on LoadMenuIndirect() Menu Causes UAEID: Q75254
|
When LoadMenuIndirect() is used to create a menu from a menu template and the menu handle is passed to TrackPopupMenu(), Windows reports an unrecoverable application error (UAE). Windows NT and Windows 95 display the floating pop-up menu as a vertical bar.
The menu handle returned from LoadMenuIndirect() does not point to a menu with the MF_POPUP bit set.
The following code fragment demonstrates the correct procedure to "wrap"
the menu created by LoadMenuIndirect() inside another menu. This procedure
sets the MF_POPUP bit properly.
hMenu1 = LoadMenuIndirect(lpMenuTemplate);
hMenuDummy = CreateMenu();
InsertMenu(hMenuDummy, 0, MF_POPUP, hMenu1, NULL);
hMenuToUse = GetSubMenu(hMenuDummy, 0);
Keywords : kbcode kbMenu kbNTOS350 kbNTOS351 kbResource kbGrpUser kbWinOS kbWinOS95
Version :
Platform :
Issue type : kbprb
Last Reviewed: March 7, 1999