#include "wx/ownerdrw.h"
#endif
+#include "wx/ptr_scpd.h"
+
#include "wx/msw/private.h"
#include "wx/msw/wrapcctl.h" // include <commctrl.h> "properly"
}
mii.cch = itemText.length();
- mii.dwTypeData = wx_const_cast(wxChar *, itemText.wx_str());
+ mii.dwTypeData = const_cast<wxChar *>(itemText.wx_str());
if (flags & MF_POPUP)
{
// item and this looks downright ugly
//
// so instead draw it ourselves in MSWOnDrawItem()
- mii.dwItemData = wx_reinterpret_cast(ULONG_PTR, pItem);
+ mii.dwItemData = reinterpret_cast<ULONG_PTR>(pItem);
if ( pItem->IsCheckable() )
{
mii.hbmpChecked =
return count;
}
+wxAcceleratorTable *wxMenu::CreateAccelTable() const
+{
+ const size_t count = m_accels.size();
+ wxScopedArray<wxAcceleratorEntry> accels(new wxAcceleratorEntry[count]);
+ CopyAccels(accels.get());
+
+ return new wxAcceleratorTable(count, accels.get());
+}
+
#endif // wxUSE_ACCEL
// ---------------------------------------------------------------------------
info.fMask = MIIM_TYPE;
info.fType = MFT_STRING;
info.cch = m_title.length();
- info.dwTypeData = wx_const_cast(wxChar *, m_title.wx_str());
+ info.dwTypeData = const_cast<wxChar *>(m_title.wx_str());
if ( !SetMenuItemInfo(hMenu, 0, TRUE, & info) )
{
wxLogLastError(wxT("SetMenuItemInfo"));
if ( m_hMenu != 0 )
return m_hMenu;
- wxToolMenuBar * const bar = wx_static_cast(wxToolMenuBar *, GetToolBar());
+ wxToolMenuBar * const bar = static_cast<wxToolMenuBar *>(GetToolBar());
if ( !bar )
return NULL;
info.fMask = MIIM_TYPE;
info.fType = MFT_STRING;
info.cch = label.length();
- info.dwTypeData = wx_const_cast(wxChar *, label.wx_str());
+ info.dwTypeData = const_cast<wxChar *>(label.wx_str());
if ( !SetMenuItemInfo(GetHmenu(), id, TRUE, &info) )
{
wxLogLastError(wxT("SetMenuItemInfo"));