[REACTOS] Fix a number of Get/SetWindowsLong*Ptr* issues and use GWLP_* instead of GWL_* where appropriate.

This commit is contained in:
Timo Kreuzer 2018-02-05 02:42:14 +01:00
parent 173971d947
commit d281d14fd1
25 changed files with 118 additions and 118 deletions

View file

@ -285,7 +285,7 @@
#define GetWindowExStyle(hwnd) ((DWORD)GetWindowLong(hwnd,GWL_EXSTYLE))
#define GetWindowFont(hwnd) FORWARD_WM_GETFONT((hwnd),SendMessage)
#define GetWindowID(hwnd) GetDlgCtrlID(hwnd)
#define GetWindowInstance(hwnd) ((HMODULE)GetWindowLong(hwnd,GWL_HINSTANCE))
#define GetWindowInstance(hwnd) ((HMODULE)GetWindowLongPtr(hwnd,GWLP_HINSTANCE))
#define GetWindowOwner(hwnd) GetWindow(hwnd,GW_OWNER)
#define GetWindowStyle(hwnd) ((DWORD)GetWindowLong(hwnd,GWL_STYLE))
#define GlobalAllocPtr(flags,cb) (GlobalLock(GlobalAlloc((flags),(cb))))
@ -494,8 +494,8 @@
#define Static_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl)
#define Static_SetIcon(hwndCtl,hIcon) ((HICON)(UINT)(DWORD)SendMessage((hwndCtl),STM_SETICON,(WPARAM)(HICON)(hIcon),0))
#define Static_SetText(hwndCtl,lpsz) SetWindowText((hwndCtl),(lpsz))
#define SubclassDialog(hwndDlg,lpfn) ((DLGPROC)SetWindowLong(hwndDlg,DWL_DLGPROC,(LPARAM)(DLGPROC)(lpfn)))
#define SubclassWindow(hwnd,lpfn) ((WNDPROC)SetWindowLong((hwnd),GWL_WNDPROC,(LPARAM)(WNDPROC)(lpfn)))
#define SubclassDialog(hwndDlg,lpfn) ((DLGPROC)SetWindowLongPtr(hwndDlg,DWLP_DLGPROC,(LPARAM)(DLGPROC)(lpfn)))
#define SubclassWindow(hwnd,lpfn) ((WNDPROC)SetWindowLongPtr((hwnd),GWLP_WNDPROC,(LPARAM)(WNDPROC)(lpfn)))
#define SubtractRgn(hrgnResult,hrgnA,hrgnB) CombineRgn(hrgnResult,hrgnA,hrgnB,RGN_DIFF)
#define UnionRgn(hrgnResult,hrgnA,hrgnB) CombineRgn(hrgnResult,hrgnA,hrgnB,RGN_OR)
#define XorRgn(hrgnResult,hrgnA,hrgnB) CombineRgn(hrgnResult,hrgnA,hrgnB,RGN_XOR)