[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

@ -123,7 +123,7 @@ LRESULT CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
LPNMHDR pnmh;
LPCREATESTRUCT lpCS;
LONG nThisApp = 0;
DialogData* pData = (DialogData*)GetWindowLong(hDlg, DWL_USER);
DialogData* pData = (DialogData*)GetWindowLongPtr(hDlg, DWLP_USER);
if (pData) nThisApp = pData->lData;
switch (message) {
@ -136,7 +136,7 @@ LRESULT CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
case WM_INITDIALOG:
pData = (DialogData*)lParam;
SetWindowLong(hDlg, DWL_USER, (LONG)pData);
SetWindowLongPtr(hDlg, DWLP_USER, (LONG_PTR)pData);
if (pData) nThisApp = pData->lData;
return OnCreate(hDlg, nThisApp);