X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/42e69d6b435a4dd5415caf3750db62cf45b6f373..2356708db31b737c6eae53c2316b642aa5a2e68d:/src/msw/menuitem.cpp diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp index e039ec75d0..bd46e7336a 100644 --- a/src/msw/menuitem.cpp +++ b/src/msw/menuitem.cpp @@ -29,11 +29,14 @@ #endif #ifndef WX_PRECOMP - #include "wx/menu.h" #include "wx/font.h" #include "wx/bitmap.h" #include "wx/settings.h" #include "wx/font.h" + #include "wx/window.h" + #include "wx/accel.h" + #include "wx/menu.h" + #include "wx/string.h" #endif #include "wx/ownerdrw.h" @@ -84,7 +87,7 @@ wxMenuItem::wxMenuItem(wxMenu *pParentMenu, int id, #endif //owner drawn m_strHelp(strHelp) { - wxASSERT_MSG( pParentMenu != NULL, "a menu item should have a parent" ); + wxASSERT_MSG( pParentMenu != NULL, _T("a menu item should have a parent") ); #if wxUSE_OWNER_DRAWN // set default menu colors @@ -102,6 +105,7 @@ wxMenuItem::wxMenuItem(wxMenu *pParentMenu, int id, m_pParentMenu = pParentMenu; m_pSubMenu = pSubMenu; m_bEnabled = TRUE; + m_bChecked = FALSE; m_idItem = id; } @@ -147,7 +151,7 @@ void wxMenuItem::Enable(bool bDoEnable) void wxMenuItem::Check(bool bDoCheck) { - wxCHECK_RET( IsCheckable(), "only checkable items may be checked" ); + wxCHECK_RET( IsCheckable(), _T("only checkable items may be checked") ); if ( m_bChecked != bDoCheck ) { long rc = CheckMenuItem(GetHMenuOf(m_pParentMenu), @@ -188,12 +192,12 @@ void wxMenuItem::SetName(const wxString& strName) flagsOld |= MF_POPUP; } - LPCSTR data; + LPCTSTR data; #if wxUSE_OWNER_DRAWN if ( IsOwnerDrawn() ) { flagsOld |= MF_OWNERDRAW; - data = (LPCSTR)this; + data = (LPCTSTR)this; } else #endif //owner drawn @@ -206,7 +210,7 @@ void wxMenuItem::SetName(const wxString& strName) MF_BYCOMMAND | flagsOld, id, data) == 0xFFFFFFFF ) { - wxLogLastError("ModifyMenu"); + wxLogLastError(_T("ModifyMenu")); } } }