mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 16:36:07 +00:00
[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:
parent
6cdd1357d6
commit
0182dcd71b
35 changed files with 142 additions and 131 deletions
|
@ -485,7 +485,21 @@
|
|||
#define SelectBrush(hdc,hbr) ((HBRUSH)SelectObject((hdc),(HGDIOBJ)(HBRUSH)(hbr)))
|
||||
#define SelectFont(hdc,hfont) ((HFONT)SelectObject((hdc),(HGDIOBJ)(HFONT)(hfont)))
|
||||
#define SelectPen(hdc,hpen) ((HPEN)SelectObject((hdc),(HGDIOBJ)(HPEN)(hpen)))
|
||||
#define SetDlgMsgResult(hwnd,msg,result) (( (msg) == WM_CTLCOLORMSGBOX || (msg) == WM_CTLCOLOREDIT || (msg) == WM_CTLCOLORLISTBOX || (msg) == WM_CTLCOLORBTN || (msg) == WM_CTLCOLORDLG || (msg) == WM_CTLCOLORSCROLLBAR || (msg) == WM_CTLCOLORSTATIC || (msg) == WM_COMPAREITEM || (msg) == WM_VKEYTOITEM || (msg) == WM_CHARTOITEM || (msg) == WM_QUERYDRAGICON || (msg) == WM_INITDIALOG ) ? (BOOL)(result) : (SetWindowLong((hwnd),DWL_MSGRESULT,(LPARAM)(LRESULT)(result)),TRUE))
|
||||
#define SetDlgMsgResult(hwnd,msg,result) \
|
||||
(( ((msg) == WM_CTLCOLORMSGBOX) || \
|
||||
((msg) == WM_CTLCOLOREDIT) || \
|
||||
((msg) == WM_CTLCOLORLISTBOX) || \
|
||||
((msg) == WM_CTLCOLORBTN) || \
|
||||
((msg) == WM_CTLCOLORDLG) || \
|
||||
((msg) == WM_CTLCOLORSCROLLBAR) || \
|
||||
((msg) == WM_CTLCOLORSTATIC) || \
|
||||
((msg) == WM_COMPAREITEM) || \
|
||||
((msg) == WM_VKEYTOITEM) || \
|
||||
((msg) == WM_CHARTOITEM) || \
|
||||
((msg) == WM_QUERYDRAGICON) || \
|
||||
((msg) == WM_INITDIALOG) ) ? \
|
||||
(BOOL)(result) : \
|
||||
(SetWindowLongPtr((hwnd), DWLP_MSGRESULT, (LPARAM)(LRESULT)(result)), TRUE) )
|
||||
#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))
|
||||
|
|
|
@ -849,12 +849,17 @@ extern "C" {
|
|||
#define GWLP_ID (-12)
|
||||
#define GWL_USERDATA (-21)
|
||||
#define GWLP_USERDATA (-21)
|
||||
#define DWL_DLGPROC 4
|
||||
#define DWLP_DLGPROC 4
|
||||
|
||||
#ifndef __REACTOS__ // NEVER USE THESE!
|
||||
#define DWL_MSGRESULT 0
|
||||
#define DWLP_MSGRESULT 0
|
||||
#define DWL_DLGPROC 4
|
||||
#define DWL_USER 8
|
||||
#define DWLP_USER 8
|
||||
#endif
|
||||
|
||||
#define DWLP_MSGRESULT 0
|
||||
#define DWLP_DLGPROC (DWLP_MSGRESULT + sizeof(LRESULT))
|
||||
#define DWLP_USER (DWLP_DLGPROC + sizeof(DLGPROC))
|
||||
|
||||
#if (_WIN32_WINNT >= 0x0501)
|
||||
#define QS_ALLEVENTS 1215
|
||||
#define QS_ALLINPUT 1279
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue