- ok = ::AppendMenu(GetHmenu(), flags, id, pData);
+ HWND hSubMenu = ::WinCreateWindow( HWND_DESKTOP // parent
+ ,WC_MENU // type
+ ,"Menu" // a generic name
+ ,0L // no style flag
+ ,0L,0L,0L,0L // no position
+ ,NULLHANDLE // no owner
+ ,NULLHANDLE // no insertion position
+ ,0L // no ID needed for dynamic creation
+ ,NULL // no control data
+ ,NULL // no presentation params
+ );
+
+ m_vMenuData.iPosition = 0;
+ m_vMenuData.hwndSubMenu = hSubMenu;
+ m_vMenuData.hItem = NULLHANDLE;
+
+ bOk = (bool)::WinSendMsg(GetHmenu(), MM_INSERTITEM, (MPARAM)&vItem, (MPARAM)NULL);