From 2007cac5a69a0ea4a6dd8a609f70396bc64d078c Mon Sep 17 00:00:00 2001 From: evpobr Date: Thu, 20 Oct 2016 13:01:08 +0500 Subject: [PATCH] Fix incorrect type conversion UINT -> UINT_PTR as declared in MSDN. Closes #2448 --- PowerEditor/src/lastRecentFileList.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PowerEditor/src/lastRecentFileList.cpp b/PowerEditor/src/lastRecentFileList.cpp index 84f9a768c..57a10e4bf 100644 --- a/PowerEditor/src/lastRecentFileList.cpp +++ b/PowerEditor/src/lastRecentFileList.cpp @@ -116,18 +116,18 @@ void LastRecentFileList::updateMenu() cleanFileList = TEXT("Empty Recent Files List"); if (!isSubMenuMode()) - ::InsertMenu(_hMenu, _posBase + 0, MF_BYPOSITION, UINT(-1), 0); + ::InsertMenu(_hMenu, _posBase + 0, MF_BYPOSITION, static_cast(-1), 0); ::InsertMenu(_hMenu, _posBase + 1, MF_BYPOSITION, IDM_FILE_RESTORELASTCLOSEDFILE, openRecentClosedFile.c_str()); ::InsertMenu(_hMenu, _posBase + 2, MF_BYPOSITION, IDM_OPEN_ALL_RECENT_FILE, openAllFiles.c_str()); ::InsertMenu(_hMenu, _posBase + 3, MF_BYPOSITION, IDM_CLEAN_RECENT_FILE_LIST, cleanFileList.c_str()); - ::InsertMenu(_hMenu, _posBase + 4, MF_BYPOSITION, UINT(-1), 0); + ::InsertMenu(_hMenu, _posBase + 4, MF_BYPOSITION, static_cast(-1), 0); _hasSeparators = true; if (isSubMenuMode()) { - ::InsertMenu(_hParentMenu, _posBase + 0, MF_BYPOSITION | MF_POPUP, UINT(_hMenu), (LPCTSTR)recentFileList.c_str()); - ::InsertMenu(_hParentMenu, _posBase + 1, MF_BYPOSITION, UINT(-1), 0); + ::InsertMenu(_hParentMenu, _posBase + 0, MF_BYPOSITION | MF_POPUP, reinterpret_cast(_hMenu), (LPCTSTR)recentFileList.c_str()); + ::InsertMenu(_hParentMenu, _posBase + 1, MF_BYPOSITION, static_cast(-1), 0); } _pAccelerator->updateFullMenu(); }