]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/wince/menuce.cpp
leave i386 compiler to default
[wxWidgets.git] / src / msw / wince / menuce.cpp
index 477b00dac197eec00a4323642492aaeb01c55488..9f8822d9bc38a130f47725d566272af25f80f09d 100644 (file)
@@ -4,9 +4,8 @@
 // Author:      Wlodzimierz ABX Skiba
 // Modified by:
 // Created:     28.05.2004
-// RCS-ID:      $Id$
 // Copyright:   (c) Wlodzimierz Skiba
-// License:     wxWindows licence
+// Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
@@ -54,11 +53,7 @@ wxTopLevelWindowMSW::ButtonMenu::ButtonMenu()
 
 wxTopLevelWindowMSW::ButtonMenu::~ButtonMenu()
 {
-    if(m_menu)
-    {
-        delete m_menu;
-        m_menu = NULL;
-    };
+    wxDELETE(m_menu);
 }
 
 void wxTopLevelWindowMSW::SetLeftMenu(int id, const wxString& label, wxMenu *subMenu)
@@ -78,7 +73,7 @@ void wxTopLevelWindowMSW::ButtonMenu::SetButton(int id, const wxString& label, w
     m_assigned = true;
     m_id = id;
     if(label.empty() && wxIsStockID(id))
-        m_label = wxGetStockLabel(id, false);
+        m_label = wxGetStockLabel(id, wxSTOCK_NOFLAGS);
     else
         m_label = label;
     m_menu = subMenu;
@@ -225,7 +220,7 @@ void wxTopLevelWindowMSW::ReloadAllButtons()
 
     if (!SHCreateMenuBar(&menu_bar))
     {
-        wxFAIL_MSG( _T("SHCreateMenuBar failed") );
+        wxFAIL_MSG( wxT("SHCreateMenuBar failed") );
         return;
     }
 
@@ -252,7 +247,7 @@ bool wxTopLevelWindowMSW::HandleCommand(WXWORD id, WXWORD WXUNUSED(cmd), WXHWND
     if ( id == IDM_LEFT || id == IDM_RIGHT )
     {
         int menuId = id == IDM_LEFT ? m_LeftButton.GetId() : m_RightButton.GetId() ;
-        wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, menuId);
+        wxCommandEvent commandEvent(wxEVT_MENU, menuId);
         commandEvent.SetEventObject(this);
         GetEventHandler()->ProcessEvent(commandEvent);
         return true;