- HWND hSubMenu = ::WinCreateWindow( GetWinHwnd(m_menuBar) // parent
- ,WC_MENU // type
- ,"Menu" // a generic name
- ,0L // no style flag
- ,0L,0L,0L,0L // no position
- ,GetWinHwnd(m_menuBar) // no owner
- ,HWND_TOP // always on top
- ,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)&m_vMenuData, (MPARAM)pItem->GetText().c_str());