safely cast from 32bit long to 64bit HWND

This commit is contained in:
Paddy Xu
2017-06-10 13:15:58 +03:00
parent 78eba880aa
commit 17f5005b63

View File

@@ -103,7 +103,7 @@ void Shell32::getSelectedFromDesktop(PWCHAR buffer)
if (FAILED(psw->FindWindowSW(&pvarLoc, &pvarLoc, SWC_DESKTOP, &phwnd, SWFO_NEEDDISPATCH, reinterpret_cast<IDispatch**>(&pwba))))
return;
if (isCursorActivated(reinterpret_cast<HWND>(phwnd)))
if (isCursorActivated(reinterpret_cast<HWND>(LongToHandle(phwnd))))
return;
getSelectedInternal(pwba, buffer);