more /Wp64 warning fixes: mostly use UINT_PTR instead of UINT and define our WX[WL]PARAM with __w64 if available to avoid hundreds of warnings when casting LPARAMs to pointers/handles
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52165 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user