Commit 1084a8ba authored by Alexandre Julliard's avatar Alexandre Julliard

Moved out of windef.h a few definitions that don't belong there

(reported by Filip Navara).
parent 9d615966
......@@ -2100,8 +2100,9 @@ static LRESULT ComboWndProc_common( HWND hwnd, UINT message,
if (wParam & (MK_SHIFT | MK_CONTROL))
return unicode ? DefWindowProcW(hwnd, message, wParam, lParam) :
DefWindowProcA(hwnd, message, wParam, lParam);
if (SHIWORD(wParam) > 0) return SendMessageW(hwnd, WM_KEYDOWN, VK_UP, 0);
if (SHIWORD(wParam) < 0) return SendMessageW(hwnd, WM_KEYDOWN, VK_DOWN, 0);
if (GET_WHEEL_DELTA_WPARAM(wParam) > 0) return SendMessageW(hwnd, WM_KEYDOWN, VK_UP, 0);
if (GET_WHEEL_DELTA_WPARAM(wParam) < 0) return SendMessageW(hwnd, WM_KEYDOWN, VK_DOWN, 0);
return TRUE;
/* Combo messages */
......
......@@ -1488,7 +1488,7 @@ TRACKBAR_MouseMove (TRACKBAR_INFO *infoPtr, DWORD fwKeys, POINTS pts)
{
DWORD dwStyle = GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE);
INT clickPlace = (dwStyle & TBS_VERT) ? pts.y : pts.x;
DOUBLE dragPos, oldPos = infoPtr->lPos;
LONG dragPos, oldPos = infoPtr->lPos;
TRACE("(x=%d. y=%d)\n", pts.x, pts.y);
......@@ -1503,8 +1503,6 @@ TRACKBAR_MouseMove (TRACKBAR_INFO *infoPtr, DWORD fwKeys, POINTS pts)
dragPos = TRACKBAR_ConvertPlaceToPosition (infoPtr, clickPlace,
dwStyle & TBS_VERT);
if (dragPos > ((INT)dragPos) + 0.5) dragPos++;
if (dragPos == oldPos) return TRUE;
infoPtr->lPos = dragPos;
......
......@@ -48,6 +48,7 @@ PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include <stdlib.h>
#include "windef.h"
#include "winbase.h"
#include "wtypes.h"
/* ----------------------------------------------------------------
* Section 1: bool, true, false, TRUE, FALSE
......
......@@ -176,8 +176,6 @@ typedef long *LPLONG;
typedef unsigned long DWORD, *PDWORD, *LPDWORD;
typedef unsigned long ULONG, *PULONG;
typedef float FLOAT, *PFLOAT;
typedef double DOUBLE;
typedef double DATE;
#include <winnt.h>
......@@ -212,8 +210,6 @@ typedef LONG_PTR LRESULT;
/* Integer types */
typedef WORD ATOM;
typedef WORD CATCHBUF[9];
typedef WORD *LPCATCHBUF;
typedef DWORD COLORREF, *LPCOLORREF;
......@@ -270,17 +266,8 @@ typedef INT (CALLBACK *PROC)();
#define LOWORD(l) ((WORD)(DWORD)(l))
#define HIWORD(l) ((WORD)((DWORD)(l) >> 16))
#define SLOWORD(l) ((SHORT)(LONG)(l))
#define SHIWORD(l) ((SHORT)((LONG)(l) >> 16))
#define MAKEWORD(low,high) ((WORD)(((BYTE)(low)) | ((WORD)((BYTE)(high))) << 8))
#define MAKELONG(low,high) ((LONG)(((WORD)(low)) | (((DWORD)((WORD)(high))) << 16)))
#define MAKELPARAM(low,high) ((LPARAM)MAKELONG(low,high))
#define MAKEWPARAM(low,high) ((WPARAM)MAKELONG(low,high))
#define MAKELRESULT(low,high) ((LRESULT)MAKELONG(low,high))
#define SELECTOROF(ptr) (HIWORD(ptr))
#define OFFSETOF(ptr) (LOWORD(ptr))
/* min and max macros */
#ifndef NOMINMAX
......
......@@ -41,7 +41,12 @@ typedef UINT16 WPARAM16;
typedef INT16 *LPINT16;
typedef UINT16 *LPUINT16;
typedef WORD CATCHBUF[9];
typedef WORD *LPCATCHBUF;
#define MAKESEGPTR(seg,off) ((SEGPTR)MAKELONG(off,seg))
#define SELECTOROF(ptr) (HIWORD(ptr))
#define OFFSETOF(ptr) (LOWORD(ptr))
typedef WORD *VA_LIST16;
......
......@@ -1097,6 +1097,8 @@ BOOL WINAPI SetSysColors(INT,const INT*,const COLORREF*);
#define WHEEL_DELTA 120
#define WHEEL_PAGESCROLL (UINT_MAX)
#define GET_WHEEL_DELTA_WPARAM(wParam) ((short)HIWORD(wParam))
#define WM_PARENTNOTIFY 0x0210
#define WM_ENTERMENULOOP 0x0211
#define WM_EXITMENULOOP 0x0212
......@@ -1785,6 +1787,9 @@ typedef struct tagMSG
#define POINTTOPOINTS(pt) (MAKELONG((short)((pt).x), (short)((pt).y)))
#define MAKELPARAM(low,high) ((LPARAM)MAKELONG(low,high))
#define MAKEWPARAM(low,high) ((WPARAM)MAKELONG(low,high))
#define MAKELRESULT(low,high) ((LRESULT)MAKELONG(low,high))
/* Cursors / Icons */
......
......@@ -34,8 +34,6 @@ typedef unsigned long ULONG;
typedef float FLOAT;
typedef double DOUBLE;
typedef void *PVOID, *LPVOID;
typedef char CHAR;
......@@ -80,8 +78,6 @@ typedef void *HICON;
typedef LONG_PTR LRESULT;
typedef double DATE;
typedef LONG HRESULT;
typedef DWORD LCID;
......@@ -188,6 +184,8 @@ typedef struct tagMSG {
} MSG, *PMSG, *NPMSG, *LPMSG;
#endif /* winnt.h */
typedef double DOUBLE;
#ifndef _PALETTEENTRY_DEFINED
#define _PALETTEENTRY_DEFINED
typedef struct tagPALETTEENTRY {
......@@ -620,6 +618,8 @@ typedef enum tagSTATFLAG {
STATFLAG_NOOPEN = 2
} STATFLAG;
typedef double DATE;
#if 0
typedef struct tagCY {
LONGLONG int64;
......
......@@ -45,7 +45,6 @@ typedef unsigned short USHORT;
typedef long LONG;
typedef unsigned long ULONG;
typedef float FLOAT;
typedef double DOUBLE;
typedef void *PVOID, *LPVOID;
......@@ -79,7 +78,6 @@ DECLARE_HANDLE(HICON);
typedef LONG_PTR LRESULT;
typedef double DATE;
typedef LONG HRESULT;
typedef DWORD LCID;
......@@ -186,6 +184,8 @@ typedef struct tagMSG
cpp_quote("#endif /* winnt.h */")
typedef double DOUBLE;
cpp_quote("#ifndef _PALETTEENTRY_DEFINED")
cpp_quote("#define _PALETTEENTRY_DEFINED")
typedef struct tagPALETTEENTRY {
......@@ -575,6 +575,8 @@ typedef enum tagSTATFLAG {
/******************** OLE Automation ********************/
typedef double DATE;
cpp_quote("#if 0") /* for IDL only */
typedef struct tagCY {
LONGLONG int64;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment