https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6572dd7f489916426dceb…
commit 6572dd7f489916426dceb01dfb272601a24f5ef9
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Mon Oct 10 22:59:46 2022 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Oct 12 16:10:22 2022 +0200
[WINDOWSX.H] Fix some x64 incompatibilities. (#4768)
---
sdk/include/psdk/windowsx.h | 40 ++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/sdk/include/psdk/windowsx.h b/sdk/include/psdk/windowsx.h
index 15dc2053bc4..f9df189301e 100644
--- a/sdk/include/psdk/windowsx.h
+++ b/sdk/include/psdk/windowsx.h
@@ -59,7 +59,7 @@
#define Edit_Enable(hwndCtl,fEnable) EnableWindow((hwndCtl),(fEnable))
#define Edit_FmtLines(hwndCtl,fAddEOL)
((BOOL)(DWORD)SendMessage((hwndCtl),EM_FMTLINES,(WPARAM)(BOOL)(fAddEOL),0))
#define Edit_GetFirstVisibleLine(hwndCtl)
((int)(DWORD)SendMessage((hwndCtl),EM_GETFIRSTVISIBLELINE,0,0))
-#define Edit_GetHandle(hwndCtl)
((HLOCAL)(UINT)(DWORD)SendMessage((hwndCtl),EM_GETHANDLE,0,0))
+#define Edit_GetHandle(hwndCtl)
((HLOCAL)(UINT_PTR)SendMessage((hwndCtl),EM_GETHANDLE,0,0))
#define Edit_GetLine(hwndCtl,line,lpch,cchMax) ((*((int*)(lpch)) =
(cchMax)),((int)(DWORD)SendMessage((hwndCtl),EM_GETLINE,(WPARAM)(int)(line),(LPARAM)(LPTSTR)(lpch))))
#define Edit_GetLineCount(hwndCtl)
((int)(DWORD)SendMessage((hwndCtl),EM_GETLINECOUNT,0,0))
#define Edit_GetModify(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl),EM_GETMODIFY,0,0))
@@ -76,7 +76,7 @@
#define Edit_ReplaceSel(hwndCtl,lpszReplace)
((void)SendMessage((hwndCtl),EM_REPLACESEL,0,(LPARAM)(LPCTSTR)(lpszReplace)))
#define Edit_Scroll(hwndCtl,dv,dh)
((void)SendMessage((hwndCtl),EM_LINESCROLL,(WPARAM)(dh),(LPARAM)(dv)))
#define Edit_ScrollCaret(hwndCtl)
((BOOL)(DWORD)SendMessage((hwndCtl),EM_SCROLLCARET,0,0))
-#define Edit_SetHandle(hwndCtl,h)
((void)SendMessage((hwndCtl),EM_SETHANDLE,(WPARAM)(UINT)(HLOCAL)(h),0))
+#define Edit_SetHandle(hwndCtl,h)
((void)SendMessage((hwndCtl),EM_SETHANDLE,(WPARAM)(UINT_PTR)(HLOCAL)(h),0))
#define Edit_SetModify(hwndCtl,fModified)
((void)SendMessage((hwndCtl),EM_SETMODIFY,(WPARAM)(UINT)(fModified),0))
#define Edit_SetPasswordChar(hwndCtl,ch)
((void)SendMessage((hwndCtl),EM_SETPASSWORDCHAR,(WPARAM)(UINT)(ch),0))
#define Edit_SetReadOnly(hwndCtl,fReadOnly)
((BOOL)(DWORD)SendMessage((hwndCtl),EM_SETREADONLY,(WPARAM)(BOOL)(fReadOnly),0))
@@ -103,13 +103,13 @@
#define FORWARD_WM_COMPAREITEM(hwnd,lpCompareItem,fn)
(int)(DWORD)(fn)((hwnd),WM_COMPAREITEM,(WPARAM)(((const
COMPAREITEMSTRUCT*)(lpCompareItem))->CtlID),(LPARAM)(const
COMPAREITEMSTRUCT*)(lpCompareItem))
#define FORWARD_WM_COPY(hwnd,fn) (void)(fn)((hwnd),WM_COPY,0,0)
#define FORWARD_WM_CREATE(hwnd,lpCreateStruct,fn)
(BOOL)(DWORD)(fn)((hwnd),WM_CREATE,0,(LPARAM)(LPCREATESTRUCT)(lpCreateStruct))
-#define FORWARD_WM_CTLCOLORBTN(hwnd,hdc,hwndChild,fn)
(HBRUSH)(UINT)(DWORD)(fn)((hwnd),WM_CTLCOLORBTN,(WPARAM)(HDC)(hdc),(LPARAM)(HWND)(hwndChild))
-#define FORWARD_WM_CTLCOLORDLG(hwnd,hdc,hwndChild,fn)
(HBRUSH)(UINT)(DWORD)(fn)((hwnd),WM_CTLCOLORDLG,(WPARAM)(HDC)(hdc),(LPARAM)(HWND)(hwndChild))
-#define FORWARD_WM_CTLCOLOREDIT(hwnd,hdc,hwndChild,fn)
(HBRUSH)(UINT)(DWORD)(fn)((hwnd),WM_CTLCOLOREDIT,(WPARAM)(HDC)(hdc),(LPARAM)(HWND)(hwndChild))
-#define FORWARD_WM_CTLCOLORLISTBOX(hwnd,hdc,hwndChild,fn)
(HBRUSH)(UINT)(DWORD)(fn)((hwnd),WM_CTLCOLORLISTBOX,(WPARAM)(HDC)(hdc),(LPARAM)(HWND)(hwndChild))
-#define FORWARD_WM_CTLCOLORMSGBOX(hwnd,hdc,hwndChild,fn)
(HBRUSH)(UINT)(DWORD)(fn)((hwnd),WM_CTLCOLORMSGBOX,(WPARAM)(HDC)(hdc),(LPARAM)(HWND)(hwndChild))
-#define FORWARD_WM_CTLCOLORSCROLLBAR(hwnd,hdc,hwndChild,fn)
(HBRUSH)(UINT)(DWORD)(fn)((hwnd),WM_CTLCOLORSCROLLBAR,(WPARAM)(HDC)(hdc),(LPARAM)(HWND)(hwndChild))
-#define FORWARD_WM_CTLCOLORSTATIC(hwnd,hdc,hwndChild,fn)
(HBRUSH)(UINT)(DWORD)(fn)((hwnd),WM_CTLCOLORSTATIC,(WPARAM)(HDC)(hdc),(LPARAM)(HWND)(hwndChild))
+#define FORWARD_WM_CTLCOLORBTN(hwnd,hdc,hwndChild,fn)
(HBRUSH)(UINT_PTR)(fn)((hwnd),WM_CTLCOLORBTN,(WPARAM)(HDC)(hdc),(LPARAM)(HWND)(hwndChild))
+#define FORWARD_WM_CTLCOLORDLG(hwnd,hdc,hwndChild,fn)
(HBRUSH)(UINT_PTR)(fn)((hwnd),WM_CTLCOLORDLG,(WPARAM)(HDC)(hdc),(LPARAM)(HWND)(hwndChild))
+#define FORWARD_WM_CTLCOLOREDIT(hwnd,hdc,hwndChild,fn)
(HBRUSH)(UINT_PTR)(fn)((hwnd),WM_CTLCOLOREDIT,(WPARAM)(HDC)(hdc),(LPARAM)(HWND)(hwndChild))
+#define FORWARD_WM_CTLCOLORLISTBOX(hwnd,hdc,hwndChild,fn)
(HBRUSH)(UINT_PTR)(fn)((hwnd),WM_CTLCOLORLISTBOX,(WPARAM)(HDC)(hdc),(LPARAM)(HWND)(hwndChild))
+#define FORWARD_WM_CTLCOLORMSGBOX(hwnd,hdc,hwndChild,fn)
(HBRUSH)(UINT_PTR)(fn)((hwnd),WM_CTLCOLORMSGBOX,(WPARAM)(HDC)(hdc),(LPARAM)(HWND)(hwndChild))
+#define FORWARD_WM_CTLCOLORSCROLLBAR(hwnd,hdc,hwndChild,fn)
(HBRUSH)(UINT_PTR)(fn)((hwnd),WM_CTLCOLORSCROLLBAR,(WPARAM)(HDC)(hdc),(LPARAM)(HWND)(hwndChild))
+#define FORWARD_WM_CTLCOLORSTATIC(hwnd,hdc,hwndChild,fn)
(HBRUSH)(UINT_PTR)(fn)((hwnd),WM_CTLCOLORSTATIC,(WPARAM)(HDC)(hdc),(LPARAM)(HWND)(hwndChild))
#define FORWARD_WM_CUT(hwnd,fn) (void)(fn)((hwnd),WM_CUT,0,0)
#define FORWARD_WM_DEADCHAR(hwnd,ch,cRepeat,fn)
(void)(fn)((hwnd),WM_DEADCHAR,(WPARAM)(TCHAR)(ch),MAKELPARAM((cRepeat),0))
#define FORWARD_WM_DELETEITEM(hwnd,lpDeleteItem,fn)
(void)(fn)((hwnd),WM_DELETEITEM,(WPARAM)(((const
DELETEITEMSTRUCT*)(lpDeleteItem))->CtlID),(LPARAM)(const
DELETEITEMSTRUCT*)(lpDeleteItem))
@@ -125,11 +125,11 @@
#define FORWARD_WM_ERASEBKGND(hwnd,hdc,fn)
(BOOL)(DWORD)(fn)((hwnd),WM_ERASEBKGND,(WPARAM)(HDC)(hdc),0)
#define FORWARD_WM_FONTCHANGE(hwnd,fn) (void)(fn)((hwnd),WM_FONTCHANGE,0,0)
#define FORWARD_WM_GETDLGCODE(hwnd,lpmsg,fn)
(UINT)(DWORD)(fn)((hwnd),WM_GETDLGCODE,(lpmsg ? lpmsg->wParam :
0),(LPARAM)(LPMSG)(lpmsg))
-#define FORWARD_WM_GETFONT(hwnd,fn) (HFONT)(UINT)(DWORD)(fn)((hwnd),WM_GETFONT,0,0)
+#define FORWARD_WM_GETFONT(hwnd,fn) (HFONT)(UINT_PTR)(fn)((hwnd),WM_GETFONT,0,0)
#define FORWARD_WM_GETMINMAXINFO(hwnd,lpMinMaxInfo,fn)
(void)(fn)((hwnd),WM_GETMINMAXINFO,0,(LPARAM)(LPMINMAXINFO)(lpMinMaxInfo))
#define FORWARD_WM_GETTEXT(hwnd,cchTextMax,lpszText,fn)
(int)(DWORD)(fn)((hwnd),WM_GETTEXT,(WPARAM)(int)(cchTextMax),(LPARAM)(LPTSTR)(lpszText))
#define FORWARD_WM_GETTEXTLENGTH(hwnd,fn) (int)(DWORD)(fn)((hwnd),WM_GETTEXTLENGTH,0,0)
-#define FORWARD_WM_HSCROLL(hwnd,hwndCtl,code,pos,fn)
(void)(fn)((hwnd),WM_HSCROLL,MAKEWPARAM((UINT)(int)(code),(UINT)(int)(pos)),(LPARAM)(UINT)(hwndCtl))
+#define FORWARD_WM_HSCROLL(hwnd,hwndCtl,code,pos,fn)
(void)(fn)((hwnd),WM_HSCROLL,MAKEWPARAM((UINT)(int)(code),(UINT)(int)(pos)),(LPARAM)(HWND)(hwndCtl))
#define FORWARD_WM_HSCROLLCLIPBOARD(hwnd,hwndCBViewer,code,pos,fn)
(void)(fn)((hwnd),WM_HSCROLLCLIPBOARD,(WPARAM)(HWND)(hwndCBViewer),MAKELPARAM((code),(pos)))
#define FORWARD_WM_ICONERASEBKGND(hwnd,hdc,fn)
(BOOL)(DWORD)(fn)((hwnd),WM_ICONERASEBKGND,(WPARAM)(HDC)(hdc),0)
#define FORWARD_WM_INITDIALOG(hwnd,hwndFocus,lParam,fn)
(BOOL)(DWORD)(fn)((hwnd),WM_INITDIALOG,(WPARAM)(HWND)(hwndFocus),(lParam))
@@ -144,14 +144,14 @@
#define FORWARD_WM_MBUTTONUP(hwnd,x,y,keyFlags,fn)
(void)(fn)((hwnd),WM_MBUTTONUP,(WPARAM)(UINT)(keyFlags),MAKELPARAM((x),(y)))
#define FORWARD_WM_MDIACTIVATE(hwnd,fActive,hwndActivate,hwndDeactivate,fn)
(void)(fn)(hwnd,WM_MDIACTIVATE,(WPARAM)(hwndDeactivate),(LPARAM)(hwndActivate))
#define FORWARD_WM_MDICASCADE(hwnd,cmd,fn)
(BOOL)(DWORD)(fn)((hwnd),WM_MDICASCADE,(WPARAM)(cmd),0)
-#define FORWARD_WM_MDICREATE(hwnd,lpmcs,fn)
(HWND)(UINT)(DWORD)(fn)((hwnd),WM_MDICREATE,0,(LPARAM)(LPMDICREATESTRUCT)(lpmcs))
+#define FORWARD_WM_MDICREATE(hwnd,lpmcs,fn)
(HWND)(UINT_PTR)(fn)((hwnd),WM_MDICREATE,0,(LPARAM)(LPMDICREATESTRUCT)(lpmcs))
#define FORWARD_WM_MDIDESTROY(hwnd,hwndDestroy,fn)
(void)(fn)((hwnd),WM_MDIDESTROY,(WPARAM)(hwndDestroy),0)
-#define FORWARD_WM_MDIGETACTIVE(hwnd,fn)
(HWND)(UINT)(DWORD)(fn)((hwnd),WM_MDIGETACTIVE,0,0)
+#define FORWARD_WM_MDIGETACTIVE(hwnd,fn)
(HWND)(UINT_PTR)(fn)((hwnd),WM_MDIGETACTIVE,0,0)
#define FORWARD_WM_MDIICONARRANGE(hwnd,fn) (void)(fn)((hwnd),WM_MDIICONARRANGE,0,0)
#define FORWARD_WM_MDIMAXIMIZE(hwnd,hwndMaximize,fn)
(void)(fn)((hwnd),WM_MDIMAXIMIZE,(WPARAM)(hwndMaximize),0)
-#define FORWARD_WM_MDINEXT(hwnd,hwndCur,fPrev,fn)
(HWND)(UINT)(DWORD)(fn)((hwnd),WM_MDINEXT,(WPARAM)(hwndCur),(LPARAM)(fPrev))
+#define FORWARD_WM_MDINEXT(hwnd,hwndCur,fPrev,fn)
(HWND)(UINT_PTR)(fn)((hwnd),WM_MDINEXT,(WPARAM)(hwndCur),(LPARAM)(fPrev))
#define FORWARD_WM_MDIRESTORE(hwnd,hwndRestore,fn)
(void)(fn)((hwnd),WM_MDIRESTORE,(WPARAM)(hwndRestore),0)
-#define FORWARD_WM_MDISETMENU(hwnd,fRefresh,hmenuFrame,hmenuWindow,fn)
(HMENU)(UINT)(DWORD)(fn)((hwnd),WM_MDISETMENU,(WPARAM)((fRefresh) ? (hmenuFrame) :
0),(LPARAM)(hmenuWindow))
+#define FORWARD_WM_MDISETMENU(hwnd,fRefresh,hmenuFrame,hmenuWindow,fn)
(HMENU)(UINT_PTR)(fn)((hwnd),WM_MDISETMENU,(WPARAM)((fRefresh) ? (hmenuFrame) :
0),(LPARAM)(hmenuWindow))
#define FORWARD_WM_MDITILE(hwnd,cmd,fn)
(BOOL)(DWORD)(fn)((hwnd),WM_MDITILE,(WPARAM)(cmd),0)
#define FORWARD_WM_MEASUREITEM(hwnd,lpMeasureItem,fn)
(void)(fn)((hwnd),WM_MEASUREITEM,(WPARAM)(((MEASUREITEMSTRUCT*)lpMeasureItem)->CtlID),(LPARAM)(MEASUREITEMSTRUCT*)(lpMeasureItem))
#define FORWARD_WM_MENUCHAR(hwnd,ch,flags,hmenu,fn)
(DWORD)(fn)((hwnd),WM_MENUCHAR,MAKEWPARAM(flags,(WORD)(ch)),(LPARAM)(HMENU)(hmenu))
@@ -172,7 +172,7 @@
#define FORWARD_WM_NCPAINT(hwnd,hrgn,fn)
(void)(fn)((hwnd),WM_NCPAINT,(WPARAM)(HRGN)(hrgn),0)
#define FORWARD_WM_NCRBUTTONDOWN(hwnd,fDoubleClick,x,y,codeHitTest,fn)
(void)(fn)((hwnd),(fDoubleClick) ? WM_NCRBUTTONDBLCLK :
WM_NCRBUTTONDOWN,(WPARAM)(UINT)(codeHitTest),MAKELPARAM((x),(y)) )
#define FORWARD_WM_NCRBUTTONUP(hwnd,x,y,codeHitTest,fn)
(void)(fn)((hwnd),WM_NCRBUTTONUP,(WPARAM)(UINT)(codeHitTest),MAKELPARAM((x),(y)) )
-#define FORWARD_WM_NEXTDLGCTL(hwnd,hwndSetFocus,fNext,fn)
(HWND)(UINT)(DWORD)(fn)((hwnd),WM_NEXTDLGCTL,(WPARAM)(HWND)(hwndSetFocus),(LPARAM)(fNext))
+#define FORWARD_WM_NEXTDLGCTL(hwnd,hwndSetFocus,fNext,fn)
(HWND)(UINT_PTR)(fn)((hwnd),WM_NEXTDLGCTL,(WPARAM)(HWND)(hwndSetFocus),(LPARAM)(fNext))
#define FORWARD_WM_PAINT(hwnd,fn) (void)(fn)((hwnd),WM_PAINT,0,0)
#define FORWARD_WM_PAINTCLIPBOARD(hwnd,hwndCBViewer,lpPaintStruct,fn)
(void)(fn)((hwnd),WM_PAINTCLIPBOARD,(WPARAM)(HWND)(hwndCBViewer),(LPARAM)(LPPAINTSTRUCT)(lpPaintStruct))
#define FORWARD_WM_PALETTECHANGED(hwnd,hwndPaletteChange,fn)
(void)(fn)((hwnd),WM_PALETTECHANGED,(WPARAM)(HWND)(hwndPaletteChange),0)
@@ -180,7 +180,7 @@
#define FORWARD_WM_PARENTNOTIFY(hwnd,msg,hwndChild,idChild,fn)
(void)(fn)((hwnd),WM_PARENTNOTIFY,MAKEWPARAM(msg,idChild),(LPARAM)(hwndChild))
#define FORWARD_WM_PASTE(hwnd,fn) (void)(fn)((hwnd),WM_PASTE,0,0)
#define FORWARD_WM_POWER(hwnd,code,fn) (void)(fn)((hwnd),WM_POWER,(WPARAM)(int)(code),0)
-#define FORWARD_WM_QUERYDRAGICON(hwnd,fn)
(HICON)(UINT)(DWORD)(fn)((hwnd),WM_QUERYDRAGICON,0,0)
+#define FORWARD_WM_QUERYDRAGICON(hwnd,fn)
(HICON)(UINT_PTR)(fn)((hwnd),WM_QUERYDRAGICON,0,0)
#define FORWARD_WM_QUERYENDSESSION(hwnd,fn)
(BOOL)(DWORD)(fn)((hwnd),WM_QUERYENDSESSION,0,0)
#define FORWARD_WM_QUERYNEWPALETTE(hwnd,fn)
(BOOL)(DWORD)(fn)((hwnd),WM_QUERYNEWPALETTE,0,0)
#define FORWARD_WM_QUERYOPEN(hwnd,fn) (BOOL)(DWORD)(fn)((hwnd),WM_QUERYOPEN,0,0)
@@ -189,7 +189,7 @@
#define FORWARD_WM_RBUTTONDOWN(hwnd,fDoubleClick,x,y,keyFlags,fn)
(void)(fn)((hwnd),(fDoubleClick) ? WM_RBUTTONDBLCLK :
WM_RBUTTONDOWN,(WPARAM)(UINT)(keyFlags),MAKELPARAM((x),(y)))
#define FORWARD_WM_RBUTTONUP(hwnd,x,y,keyFlags,fn)
(void)(fn)((hwnd),WM_RBUTTONUP,(WPARAM)(UINT)(keyFlags),MAKELPARAM((x),(y)))
#define FORWARD_WM_RENDERALLFORMATS(hwnd,fn) (void)(fn)((hwnd),WM_RENDERALLFORMATS,0,0)
-#define FORWARD_WM_RENDERFORMAT(hwnd,fmt,fn)
(HANDLE)(UINT)(DWORD)(fn)((hwnd),WM_RENDERFORMAT,(WPARAM)(UINT)(fmt),0)
+#define FORWARD_WM_RENDERFORMAT(hwnd,fmt,fn)
(HANDLE)(UINT_PTR)(fn)((hwnd),WM_RENDERFORMAT,(WPARAM)(UINT)(fmt),0)
#define FORWARD_WM_SETCURSOR(hwnd,hwndCursor,codeHitTest,msg,fn)
(BOOL)(DWORD)(fn)((hwnd),WM_SETCURSOR,(WPARAM)(HWND)(hwndCursor),MAKELPARAM((codeHitTest),(msg)))
#define FORWARD_WM_SETFOCUS(hwnd,hwndOldFocus,fn)
(void)(fn)((hwnd),WM_SETFOCUS,(WPARAM)(HWND)(hwndOldFocus),0)
#define FORWARD_WM_SETFONT(hwnd,hfont,fRedraw,fn)
(void)(fn)((hwnd),WM_SETFONT,(WPARAM)(HFONT)(hfont),(LPARAM)(BOOL)(fRedraw))
@@ -508,10 +508,10 @@
#define SetWindowFont(hwnd,hfont,fRedraw)
FORWARD_WM_SETFONT((hwnd),(hfont),(fRedraw),SendMessage)
#define SetWindowRedraw(hwnd,fRedraw)
((void)SendMessage(hwnd,WM_SETREDRAW,(WPARAM)(BOOL)(fRedraw),0))
#define Static_Enable(hwndCtl,fEnable) EnableWindow((hwndCtl),(fEnable))
-#define Static_GetIcon(hwndCtl,hIcon)
((HICON)(UINT)(DWORD)SendMessage((hwndCtl),STM_GETICON,0,0))
+#define Static_GetIcon(hwndCtl,hIcon)
((HICON)(UINT_PTR)SendMessage((hwndCtl),STM_GETICON,0,0))
#define Static_GetText(hwndCtl,lpch,cchMax) GetWindowText((hwndCtl),(lpch),(cchMax))
#define Static_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl)
-#define Static_SetIcon(hwndCtl,hIcon)
((HICON)(UINT)(DWORD)SendMessage((hwndCtl),STM_SETICON,(WPARAM)(HICON)(hIcon),0))
+#define Static_SetIcon(hwndCtl,hIcon)
((HICON)(UINT_PTR)SendMessage((hwndCtl),STM_SETICON,(WPARAM)(HICON)(hIcon),0))
#define Static_SetText(hwndCtl,lpsz) SetWindowText((hwndCtl),(lpsz))
#define SubclassDialog(hwndDlg,lpfn)
((DLGPROC)SetWindowLongPtr(hwndDlg,DWLP_DLGPROC,(LPARAM)(DLGPROC)(lpfn)))
#define SubclassWindow(hwnd,lpfn)
((WNDPROC)SetWindowLongPtr((hwnd),GWLP_WNDPROC,(LPARAM)(WNDPROC)(lpfn)))