- m_doBreak = FALSE;
-
- // create the menu
- m_hMenu = (WXHMENU)0; // CreatePopupMenu();
- if ( !m_hMenu )
- {
- wxLogLastError("CreatePopupMenu");
- }
-
- // if we have a title, insert it in the beginning of the menu
- if ( !!m_title )
- {
- Append(idMenuTitle, m_title);
+ m_bDoBreak = FALSE;
+
+ //
+ // Create the menu (to be used as a submenu or a popup)
+ //
+ if ((m_hMenu = ::WinCreateWindow( HWND_DESKTOP
+ ,(const wxChar*)WC_MENU
+ ,"Menu"
+ ,0L
+ ,0L
+ ,0L
+ ,0L
+ ,0L
+ ,NULLHANDLE
+ ,HWND_TOP
+ ,0L
+ ,NULL
+ ,NULL
+ )) == 0)
+ {
+ wxLogLastError("WinLoadMenu");
+ }
+ m_vMenuData.iPosition = 0;
+ m_vMenuData.afStyle = MIS_SUBMENU | MIS_TEXT;
+ m_vMenuData.afAttribute = (USHORT)0;
+ m_vMenuData.id = (USHORT)0;
+ m_vMenuData.hwndSubMenu = m_hMenu;
+ m_vMenuData.hItem = NULLHANDLE;
+
+ //
+ // If we have a title, insert it in the beginning of the menu
+ //
+ if (!m_title.IsEmpty())
+ {
+ Append( idMenuTitle
+ ,m_title
+ );