Commit e8ffab62 authored by Peter Hunnisett's avatar Peter Hunnisett Committed by Alexandre Julliard

Added macro definitions for memory allocation.

parent e6ab9d30
/* Copyright (C) 1999 Corel Corporation (Paul Quinn) */ /* Copyright (C) 1999 Corel Corporation (Paul Quinn) */
#ifndef __WINE_WINDOWSX_H #ifndef _INC_WINDOWSX
#define __WINE_WINDOWSX_H #define _INC_WINDOWSX
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#define _INC_WINDOWSX
#define GET_WM_VSCROLL_CODE(wp, lp) LOWORD(wp) #define GET_WM_VSCROLL_CODE(wp, lp) LOWORD(wp)
#define GET_WM_VSCROLL_POS(wp, lp) HIWORD(wp) #define GET_WM_VSCROLL_POS(wp, lp) HIWORD(wp)
#define GET_WM_VSCROLL_HWND(wp, lp) (HWND)(lp) #define GET_WM_VSCROLL_HWND(wp, lp) (HWND)(lp)
...@@ -33,6 +31,17 @@ extern "C" { ...@@ -33,6 +31,17 @@ extern "C" {
#define GET_WM_VKEYTOITEM_HWND(wp, lp) (HWND)(lp) #define GET_WM_VKEYTOITEM_HWND(wp, lp) (HWND)(lp)
#define GET_WM_VKEYTOITEM_MPS(code, item, hwnd) (WPARAM)MAKELONG(item, code), (LONG)(hwnd) #define GET_WM_VKEYTOITEM_MPS(code, item, hwnd) (WPARAM)MAKELONG(item, code), (LONG)(hwnd)
/****** KERNEL Macro APIs ******************************************************/
#define GetInstanceModule(hInst) (GetModuleHandle((LPCSTR)MAKELP(0, hInst)))
#define GlobalPtrHandle(lp) ((HGLOBAL)LOWORD(GlobalHandle(SELECTOROF(lp))))
#define GlobalLockPtr(lp) ((BOOL)SELECTOROF(GlobalLock(GlobalPtrHandle(lp))))
#define GlobalUnlockPtr(lp) (GlobalUnlock(GlobalPtrHandle(lp)))
#define GlobalAllocPtr(flags,cb) (GlobalLock(GlobalAlloc((flags), (cb))))
#define GlobalReAllocPtr(lp, cbNew, flags) (GlobalUnlockPtr(lp), \
GlobalLock(GlobalReAlloc(GlobalPtrHandle(lp) , (cbNew), (flags))))
#define GlobalFreePtr(lp) (GlobalUnlockPtr(lp), (BOOL)GlobalFree(GlobalPtrHandle(lp)))
/****** USER Macro APIs ******************************************************/ /****** USER Macro APIs ******************************************************/
#define GetWindowInstance(hwnd) ((HMODULE)GetWindowLong(hwnd, GWL_HINSTANCE)) #define GetWindowInstance(hwnd) ((HMODULE)GetWindowLong(hwnd, GWL_HINSTANCE))
......
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