[PSDK][REACTOS] Fix definitions and usage of DWLP_MSGRESULT, DWLP_DLGPROC, and DWLP_USER

- Make sure the DWLP_* values are correct on _WIN64
- Don't use the DWL_* constants, they are not portable. Enforce this by removing them entirely from winuser.h
- Make sure Get/SetWindowLong*Ptr* is used and pointers are not truncated to LONG
This commit is contained in:
Timo Kreuzer 2018-02-27 22:48:32 +01:00
parent 6cdd1357d6
commit 0182dcd71b
35 changed files with 142 additions and 131 deletions

View file

@ -460,7 +460,7 @@ CDrvDefExt::GeneralPageProc(
if (GetDlgItemTextW(hwndDlg, 14000, wszBuf, _countof(wszBuf)))
SetVolumeLabelW(pDrvDefExt->m_wszDrive, wszBuf);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR);
SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
return TRUE;
}
}

View file

@ -712,7 +712,7 @@ CFileDefExt::GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
ERR("MoveFileW failed\n");
}
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR);
SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
return TRUE;
}
break;
@ -767,7 +767,7 @@ CFileDefExt::InitVersionPage(HWND hwndDlg)
AddVersionString(hwndDlg, L"ProductVersion");
/* Attach file version to dialog window */
SetWindowLongPtr(hwndDlg, DWL_USER, (LONG_PTR)this);
SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)this);
/* Select first item */
HWND hDlgCtrl = GetDlgItem(hwndDlg, 14009);

View file

@ -1240,7 +1240,7 @@ FolderOptionsViewDlg(
case NM_CUSTOMDRAW: // custom draw (for graying)
Draw = (NMTVCUSTOMDRAW *)lParam;
Result = ViewDlg_OnTreeCustomDraw(hwndDlg, Draw);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, Result);
SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, Result);
return Result;
case TVN_KEYDOWN: // key is down
ViewDlg_OnTreeViewKeyDown(hwndDlg, (TV_KEYDOWN *)lParam);

View file

@ -334,7 +334,7 @@ RecycleBinDlg(
}
if (StoreDriveSettings(hwndDlg))
{
SetWindowLongPtr( hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR );
SetWindowLongPtr( hwndDlg, DWLP_MSGRESULT, PSNRET_NOERROR );
return TRUE;
}
}