// Created: 28.05.2004
// RCS-ID: $Id$
// Copyright: (c) Wlodzimierz Skiba
-// License: wxWindows licence
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
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)
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;
if (!SHCreateMenuBar(&menu_bar))
{
- wxFAIL_MSG( _T("SHCreateMenuBar failed") );
+ wxFAIL_MSG( wxT("SHCreateMenuBar failed") );
return;
}
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;