X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/660e7fda2ce2bf5f9703416d12890ec16d2cdae1..5e05df3c7ff33db7eab01f5012ab218ac2843cea:/src/msw/menuitem.cpp?ds=sidebyside diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp index 964e64892f..32b92ee7d2 100644 --- a/src/msw/menuitem.cpp +++ b/src/msw/menuitem.cpp @@ -186,13 +186,13 @@ wxMenuItem::~wxMenuItem() // ---- // return the id for calling Win32 API functions -unsigned wxMenuItem::GetMSWId() const +WXWPARAM wxMenuItem::GetMSWId() const { // we must use ids in unsigned short range with Windows functions, if we // pass ids > USHRT_MAX to them they get very confused (e.g. start // generating WM_COMMAND messages with negative high word of wParam), so // use the cast to ensure the id is in range - return m_subMenu ? wx_reinterpret_cast(unsigned, m_subMenu->GetHMenu()) + return m_subMenu ? wxPtrToUInt(m_subMenu->GetHMenu()) : wx_static_cast(unsigned short, GetId()); }