+#if defined(__WXWINCE__) && _WIN32_WCE >= 400
+ if (!m_hMenu)
+ this->Create();
+#if wxUSE_POCKETPC_UI
+ if (GetToolBar())
+ {
+ HWND hCommandBar = (HWND) GetToolBar()->GetHWND();
+ if (!CommandBar_InsertMenubarEx(hCommandBar, NULL, (LPTSTR) m_hMenu, 0))
+ {
+ wxLogLastError(wxT("CommandBar_InsertMenubarEx"));
+ }
+ }
+#else
+ if (!m_commandBar)
+ m_commandBar = (WXHWND) CommandBar_Create(wxGetInstance(), (HWND) frame->GetHWND(), NewControlId());
+ if (m_commandBar)
+ {
+ if (m_hMenu)
+ {
+ if (!CommandBar_InsertMenubarEx((HWND) m_commandBar, NULL, (LPTSTR) m_hMenu, 0))
+ {
+ wxLogLastError(wxT("CommandBar_InsertMenubarEx"));
+ }
+ }
+ }
+#endif
+ // wxUSE_POCKETPC_UI
+#endif
+ // __WXWINCE__ && _WIN32_WCE >= 400
+