#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"
#endif //owner drawn
m_strHelp(strHelp)
{
- wxASSERT_MSG( pParentMenu != NULL, "a menu item should have a parent" );
+ wxASSERT_MSG( pParentMenu != NULL, wxT("a menu item should have a parent") );
#if wxUSE_OWNER_DRAWN
// set default menu colors
m_pParentMenu = pParentMenu;
m_pSubMenu = pSubMenu;
m_bEnabled = TRUE;
+ m_bChecked = FALSE;
m_idItem = id;
}
void wxMenuItem::Check(bool bDoCheck)
{
- wxCHECK_RET( IsCheckable(), "only checkable items may be checked" );
+ wxCHECK_RET( IsCheckable(), wxT("only checkable items may be checked") );
if ( m_bChecked != bDoCheck ) {
long rc = CheckMenuItem(GetHMenuOf(m_pParentMenu),
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
if ( ::ModifyMenu(hMenu, id,
MF_BYCOMMAND | flagsOld,
- id, data) == 0xFFFFFFFF )
+ id, data) == (int)0xFFFFFFFF )
{
- wxLogLastError("ModifyMenu");
+ wxLogLastError(wxT("ModifyMenu"));
}
}
}