mirror of
https://github.com/reactos/reactos.git
synced 2024-12-30 11:02:49 +00:00
rewrote the gdi handle table that behaves similar 2k/XP and works without global locks
svn path=/trunk/; revision=10829
This commit is contained in:
parent
04ccf93084
commit
eed6b713aa
13 changed files with 189 additions and 219 deletions
|
@ -34,8 +34,8 @@ typedef struct _W32PROCESS
|
||||||
struct _WINSTATION_OBJECT* WindowStation;
|
struct _WINSTATION_OBJECT* WindowStation;
|
||||||
HANDLE hWindowStation;
|
HANDLE hWindowStation;
|
||||||
ULONG Flags;
|
ULONG Flags;
|
||||||
WORD GDIObjects;
|
LONG GDIObjects;
|
||||||
WORD UserObjects;
|
LONG UserObjects;
|
||||||
} W32PROCESS, *PW32PROCESS;
|
} W32PROCESS, *PW32PROCESS;
|
||||||
|
|
||||||
PW32THREAD STDCALL
|
PW32THREAD STDCALL
|
||||||
|
|
|
@ -26,11 +26,12 @@ typedef struct _BITMAPOBJ
|
||||||
/* Internal interface */
|
/* Internal interface */
|
||||||
|
|
||||||
#define BITMAPOBJ_AllocBitmap() \
|
#define BITMAPOBJ_AllocBitmap() \
|
||||||
((HBITMAP) GDIOBJ_AllocObj (sizeof (BITMAPOBJ), GDI_OBJECT_TYPE_BITMAP, (GDICLEANUPPROC) Bitmap_InternalDelete))
|
((HBITMAP) GDIOBJ_AllocObj (GDI_OBJECT_TYPE_BITMAP))
|
||||||
#define BITMAPOBJ_FreeBitmap(hBMObj) \
|
#define BITMAPOBJ_FreeBitmap(hBMObj) \
|
||||||
GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_BITMAP, GDIOBJFLAG_DEFAULT)
|
GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_BITMAP)
|
||||||
#define BITMAPOBJ_LockBitmap(hBMObj) GDIOBJ_LockObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_BITMAP)
|
#define BITMAPOBJ_LockBitmap(hBMObj) GDIOBJ_LockObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_BITMAP)
|
||||||
#define BITMAPOBJ_UnlockBitmap(hBMObj) GDIOBJ_UnlockObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_BITMAP)
|
#define BITMAPOBJ_UnlockBitmap(BMObj) GDIOBJ_UnlockObj((PGDIOBJ) BMObj)
|
||||||
|
BOOL FASTCALL BITMAP_Cleanup(PBITMAPOBJ pBmp);
|
||||||
|
|
||||||
INT FASTCALL BITMAPOBJ_GetWidthBytes (INT bmWidth, INT bpp);
|
INT FASTCALL BITMAPOBJ_GetWidthBytes (INT bmWidth, INT bpp);
|
||||||
HBITMAP FASTCALL BITMAPOBJ_CopyBitmap (HBITMAP hBitmap);
|
HBITMAP FASTCALL BITMAPOBJ_CopyBitmap (HBITMAP hBitmap);
|
||||||
|
@ -38,7 +39,6 @@ INT FASTCALL DIB_GetDIBWidthBytes (INT width, INT depth);
|
||||||
int STDCALL DIB_GetDIBImageBytes (INT width, INT height, INT depth);
|
int STDCALL DIB_GetDIBImageBytes (INT width, INT height, INT depth);
|
||||||
INT FASTCALL DIB_BitmapInfoSize (const BITMAPINFO * info, WORD coloruse);
|
INT FASTCALL DIB_BitmapInfoSize (const BITMAPINFO * info, WORD coloruse);
|
||||||
INT STDCALL BITMAP_GetObject(BITMAPOBJ * bmp, INT count, LPVOID buffer);
|
INT STDCALL BITMAP_GetObject(BITMAPOBJ * bmp, INT count, LPVOID buffer);
|
||||||
BOOL FASTCALL Bitmap_InternalDelete( PBITMAPOBJ pBmp );
|
|
||||||
HBITMAP FASTCALL BitmapToSurf(PBITMAPOBJ BitmapObj, HDEV GDIDevice);
|
HBITMAP FASTCALL BitmapToSurf(PBITMAPOBJ BitmapObj, HDEV GDIDevice);
|
||||||
|
|
||||||
HBITMAP FASTCALL IntCreateCompatibleBitmap(PDC Dc, INT Width, INT Height);
|
HBITMAP FASTCALL IntCreateCompatibleBitmap(PDC Dc, INT Width, INT Height);
|
||||||
|
|
|
@ -68,10 +68,11 @@ typedef struct
|
||||||
#define GDIBRUSH_IS_MASKING 0x8000 /* Pattern bitmap is used as transparent mask (?) */
|
#define GDIBRUSH_IS_MASKING 0x8000 /* Pattern bitmap is used as transparent mask (?) */
|
||||||
#define GDIBRUSH_CACHED_IS_SOLID 0x80000000
|
#define GDIBRUSH_CACHED_IS_SOLID 0x80000000
|
||||||
|
|
||||||
#define BRUSHOBJ_AllocBrush() ((HBRUSH) GDIOBJ_AllocObj (sizeof(GDIBRUSHOBJ), GDI_OBJECT_TYPE_BRUSH, (GDICLEANUPPROC) Brush_InternalDelete))
|
#define BRUSHOBJ_AllocBrush() ((HBRUSH) GDIOBJ_AllocObj (GDI_OBJECT_TYPE_BRUSH))
|
||||||
#define BRUSHOBJ_FreeBrush(hBrush) GDIOBJ_FreeObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH, GDIOBJFLAG_DEFAULT)
|
#define BRUSHOBJ_FreeBrush(hBrush) GDIOBJ_FreeObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH)
|
||||||
#define BRUSHOBJ_LockBrush(hBrush) ((PGDIBRUSHOBJ)GDIOBJ_LockObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH))
|
#define BRUSHOBJ_LockBrush(hBrush) ((PGDIBRUSHOBJ)GDIOBJ_LockObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH))
|
||||||
#define BRUSHOBJ_UnlockBrush(hBrush) GDIOBJ_UnlockObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH)
|
#define BRUSHOBJ_UnlockBrush(BrushObj) GDIOBJ_UnlockObj((PGDIOBJ)BrushObj)
|
||||||
|
BOOL FASTCALL BRUSH_Cleanup(PGDIBRUSHOBJ pBrush);
|
||||||
|
|
||||||
#ifdef __USE_W32API
|
#ifdef __USE_W32API
|
||||||
typedef struct _PATRECT {
|
typedef struct _PATRECT {
|
||||||
|
|
|
@ -140,17 +140,17 @@ typedef struct
|
||||||
|
|
||||||
#define DC_LockDc(hDC) \
|
#define DC_LockDc(hDC) \
|
||||||
((PDC) GDIOBJ_LockObj ((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC))
|
((PDC) GDIOBJ_LockObj ((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC))
|
||||||
#define DC_UnlockDc(hDC) \
|
#define DC_UnlockDc(DC) \
|
||||||
GDIOBJ_UnlockObj ((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC)
|
GDIOBJ_UnlockObj ((PGDIOBJ) DC)
|
||||||
|
|
||||||
HDC FASTCALL RetrieveDisplayHDC(VOID);
|
HDC FASTCALL RetrieveDisplayHDC(VOID);
|
||||||
HDC FASTCALL DC_AllocDC(PUNICODE_STRING Driver);
|
HDC FASTCALL DC_AllocDC(PUNICODE_STRING Driver);
|
||||||
VOID FASTCALL DC_InitDC(HDC DCToInit);
|
VOID FASTCALL DC_InitDC(HDC DCToInit);
|
||||||
HDC FASTCALL DC_FindOpenDC(PUNICODE_STRING Driver);
|
HDC FASTCALL DC_FindOpenDC(PUNICODE_STRING Driver);
|
||||||
VOID FASTCALL DC_FreeDC(HDC DCToFree);
|
VOID FASTCALL DC_FreeDC(HDC DCToFree);
|
||||||
|
BOOL FASTCALL DC_Cleanup(PDC pDc);
|
||||||
HDC FASTCALL DC_GetNextDC (PDC pDC);
|
HDC FASTCALL DC_GetNextDC (PDC pDC);
|
||||||
VOID FASTCALL DC_SetNextDC (PDC pDC, HDC hNextDC);
|
VOID FASTCALL DC_SetNextDC (PDC pDC, HDC hNextDC);
|
||||||
BOOL FASTCALL DC_InternalDeleteDC( PDC DCToDelete );
|
|
||||||
VOID FASTCALL DC_SetOwnership(HDC DC, PEPROCESS Owner);
|
VOID FASTCALL DC_SetOwnership(HDC DC, PEPROCESS Owner);
|
||||||
|
|
||||||
VOID FASTCALL DC_UpdateXforms(PDC dc);
|
VOID FASTCALL DC_UpdateXforms(PDC dc);
|
||||||
|
|
|
@ -8,6 +8,25 @@
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
|
|
||||||
|
/* base address where the handle table is mapped to */
|
||||||
|
#define GDI_HANDLE_TABLE_BASE_ADDRESS (0x400000)
|
||||||
|
|
||||||
|
/* gdi handle table can hold 0x4000 handles */
|
||||||
|
#define GDI_HANDLE_COUNT 0x4000
|
||||||
|
|
||||||
|
#define GDI_GLOBAL_PROCESS (0x0)
|
||||||
|
|
||||||
|
#define GDI_HANDLE_INDEX_MASK (GDI_HANDLE_COUNT - 1)
|
||||||
|
#define GDI_HANDLE_TYPE_MASK 0x007f0000
|
||||||
|
#define GDI_HANDLE_STOCK_MASK 0x00800000
|
||||||
|
|
||||||
|
#define GDI_HANDLE_CREATE(i, t) ((HANDLE)(((i) & GDI_HANDLE_INDEX_MASK) | ((t) & GDI_HANDLE_TYPE_MASK)))
|
||||||
|
#define GDI_HANDLE_GET_INDEX(h) (((DWORD)(h)) & GDI_HANDLE_INDEX_MASK)
|
||||||
|
#define GDI_HANDLE_GET_TYPE(h) (((DWORD)(h)) & GDI_HANDLE_TYPE_MASK)
|
||||||
|
#define GDI_HANDLE_IS_TYPE(h, t) ((t) == (((DWORD)(h)) & GDI_HANDLE_TYPE_MASK))
|
||||||
|
#define GDI_HANDLE_IS_STOCKOBJ(h) (0 != (((DWORD)(h)) & GDI_HANDLE_STOCK_MASK))
|
||||||
|
#define GDI_HANDLE_SET_STOCKOBJ(h) ((h) = (HANDLE)(((DWORD)(h)) | GDI_HANDLE_STOCK_MASK))
|
||||||
|
|
||||||
/*! \defgroup GDI object types
|
/*! \defgroup GDI object types
|
||||||
*
|
*
|
||||||
* GDI object types
|
* GDI object types
|
||||||
|
@ -37,26 +56,18 @@ typedef PVOID PGDIOBJ;
|
||||||
|
|
||||||
typedef BOOL (FASTCALL *GDICLEANUPPROC)(PGDIOBJ Obj);
|
typedef BOOL (FASTCALL *GDICLEANUPPROC)(PGDIOBJ Obj);
|
||||||
|
|
||||||
#define GDIOBJ_USE_FASTMUTEX
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* GDI object header. This is a part of any GDI object
|
* GDI object header. This is a part of any GDI object
|
||||||
*/
|
*/
|
||||||
typedef struct _GDIOBJHDR
|
typedef struct _GDIOBJHDR
|
||||||
{
|
{
|
||||||
DWORD dwCount; /* reference count for the object */
|
LONG RefCount; /* reference count for the object */
|
||||||
HANDLE hProcessId;
|
struct _W32THREAD *LockingThread; /* only assigned if a thread is holding the lock! */
|
||||||
GDICLEANUPPROC CleanupProc;
|
ULONG Type;
|
||||||
WORD wTableIndex;
|
PPAGED_LOOKASIDE_LIST LookasideList; /* FIXME - remove this */
|
||||||
WORD Magic;
|
#ifdef GDI_DEBUG
|
||||||
const char* lockfile;
|
const char* lockfile;
|
||||||
int lockline;
|
int lockline;
|
||||||
#ifdef GDIOBJ_USE_FASTMUTEX
|
|
||||||
FAST_MUTEX Lock;
|
|
||||||
DWORD RecursiveLockCount;
|
|
||||||
#else
|
|
||||||
DWORD LockTid;
|
|
||||||
DWORD LockCount;
|
|
||||||
#endif
|
#endif
|
||||||
} GDIOBJHDR, *PGDIOBJHDR;
|
} GDIOBJHDR, *PGDIOBJHDR;
|
||||||
|
|
||||||
|
@ -67,32 +78,39 @@ typedef struct _GDIMULTILOCK
|
||||||
DWORD ObjectType;
|
DWORD ObjectType;
|
||||||
} GDIMULTILOCK, *PGDIMULTILOCK;
|
} GDIMULTILOCK, *PGDIMULTILOCK;
|
||||||
|
|
||||||
HGDIOBJ FASTCALL GDIOBJ_AllocObj(WORD Size, DWORD ObjectType, GDICLEANUPPROC CleanupProcPtr);
|
HGDIOBJ FASTCALL GDIOBJ_AllocObj(ULONG ObjectType);
|
||||||
BOOL STDCALL GDIOBJ_FreeObj (HGDIOBJ Obj, DWORD ObjectType, DWORD Flag);
|
BOOL FASTCALL GDIOBJ_FreeObj (HGDIOBJ Obj, DWORD ObjectType);
|
||||||
PGDIOBJ FASTCALL GDIOBJ_LockObj (HGDIOBJ Obj, DWORD ObjectType);
|
|
||||||
BOOL FASTCALL GDIOBJ_LockMultipleObj(PGDIMULTILOCK pList, INT nObj);
|
BOOL FASTCALL GDIOBJ_LockMultipleObj(PGDIMULTILOCK pList, INT nObj);
|
||||||
BOOL FASTCALL GDIOBJ_UnlockObj (HGDIOBJ Obj, DWORD ObjectType);
|
|
||||||
BOOL FASTCALL GDIOBJ_UnlockMultipleObj(PGDIMULTILOCK pList, INT nObj);
|
BOOL FASTCALL GDIOBJ_UnlockMultipleObj(PGDIMULTILOCK pList, INT nObj);
|
||||||
DWORD FASTCALL GDIOBJ_GetObjectType(HGDIOBJ ObjectHandle);
|
|
||||||
BOOL FASTCALL GDIOBJ_OwnedByCurrentProcess(HGDIOBJ ObjectHandle);
|
BOOL FASTCALL GDIOBJ_OwnedByCurrentProcess(HGDIOBJ ObjectHandle);
|
||||||
void FASTCALL GDIOBJ_SetOwnership(HGDIOBJ ObjectHandle, PEPROCESS Owner);
|
void FASTCALL GDIOBJ_SetOwnership(HGDIOBJ ObjectHandle, PEPROCESS Owner);
|
||||||
void FASTCALL GDIOBJ_CopyOwnership(HGDIOBJ CopyFrom, HGDIOBJ CopyTo);
|
void FASTCALL GDIOBJ_CopyOwnership(HGDIOBJ CopyFrom, HGDIOBJ CopyTo);
|
||||||
|
BOOL FASTCALL GDIOBJ_ConvertToStockObj(HGDIOBJ *hObj);
|
||||||
BOOL FASTCALL GDIOBJ_LockMultipleObj(PGDIMULTILOCK pList, INT nObj);
|
BOOL FASTCALL GDIOBJ_LockMultipleObj(PGDIMULTILOCK pList, INT nObj);
|
||||||
|
|
||||||
|
#define GDIOBJ_GetObjectType(Handle) \
|
||||||
|
GDI_HANDLE_GET_TYPE(Handle)
|
||||||
|
|
||||||
|
#ifdef GDI_DEBUG
|
||||||
|
|
||||||
/* a couple macros for debugging GDIOBJ locking */
|
/* a couple macros for debugging GDIOBJ locking */
|
||||||
#define GDIOBJ_LockObj(obj,ty) GDIOBJ_LockObjDbg(__FILE__,__LINE__,obj,ty)
|
#define GDIOBJ_LockObj(obj,ty) GDIOBJ_LockObjDbg(__FILE__,__LINE__,obj,ty)
|
||||||
#define GDIOBJ_UnlockObj(obj,ty) GDIOBJ_UnlockObjDbg(__FILE__,__LINE__,obj,ty)
|
#define GDIOBJ_UnlockObj(obj) GDIOBJ_UnlockObjDbg(__FILE__,__LINE__,obj)
|
||||||
|
|
||||||
#ifdef GDIOBJ_LockObj
|
|
||||||
PGDIOBJ FASTCALL GDIOBJ_LockObjDbg (const char* file, int line, HGDIOBJ Obj, DWORD ObjectType);
|
PGDIOBJ FASTCALL GDIOBJ_LockObjDbg (const char* file, int line, HGDIOBJ Obj, DWORD ObjectType);
|
||||||
#endif /* GDIOBJ_LockObj */
|
BOOL FASTCALL GDIOBJ_UnlockObjDbg (const char* file, int line, PGDIOBJ Object);
|
||||||
|
|
||||||
#ifdef GDIOBJ_UnlockObj
|
#else /* !GDI_DEBUG */
|
||||||
BOOL FASTCALL GDIOBJ_UnlockObjDbg (const char* file, int line, HGDIOBJ Obj, DWORD ObjectType);
|
|
||||||
#endif /* GDIOBJ_UnlockObj */
|
PGDIOBJ FASTCALL GDIOBJ_LockObj (HGDIOBJ Obj, DWORD ObjectType);
|
||||||
|
BOOL FASTCALL GDIOBJ_UnlockObj (PGDIOBJ Object);
|
||||||
|
|
||||||
|
#endif /* GDI_DEBUG */
|
||||||
|
|
||||||
#define GDIOBJFLAG_DEFAULT (0x0)
|
#define GDIOBJFLAG_DEFAULT (0x0)
|
||||||
#define GDIOBJFLAG_IGNOREPID (0x1)
|
#define GDIOBJFLAG_IGNOREPID (0x1)
|
||||||
#define GDIOBJFLAG_IGNORELOCK (0x2)
|
#define GDIOBJFLAG_IGNORELOCK (0x2)
|
||||||
|
|
||||||
|
PVOID FASTCALL GDI_MapHandleTable(HANDLE hProcess);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
|
|
||||||
/* Internal interface */
|
/* Internal interface */
|
||||||
|
|
||||||
#define PENOBJ_AllocPen() ((HPEN)GDIOBJ_AllocObj(sizeof(GDIBRUSHOBJ), GDI_OBJECT_TYPE_PEN, NULL))
|
#define PENOBJ_AllocPen() ((HPEN)GDIOBJ_AllocObj(GDI_OBJECT_TYPE_PEN))
|
||||||
#define PENOBJ_FreePen(hBMObj) GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_PEN, GDIOBJFLAG_DEFAULT)
|
#define PENOBJ_FreePen(hBMObj) GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_PEN)
|
||||||
#define PENOBJ_LockPen(hBMObj) ((PGDIBRUSHOBJ)GDIOBJ_LockObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_PEN))
|
#define PENOBJ_LockPen(hBMObj) ((PGDIBRUSHOBJ)GDIOBJ_LockObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_PEN))
|
||||||
#define PENOBJ_UnlockPen(hBMObj) GDIOBJ_UnlockObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_PEN)
|
#define PENOBJ_UnlockPen(BMObj) GDIOBJ_UnlockObj((PGDIOBJ) BMObj)
|
||||||
|
|
||||||
HPEN STDCALL
|
HPEN STDCALL
|
||||||
NtGdiCreatePen(
|
NtGdiCreatePen(
|
||||||
|
|
|
@ -11,12 +11,11 @@ typedef struct _ROSRGNDATA {
|
||||||
} ROSRGNDATA, *PROSRGNDATA, *LPROSRGNDATA;
|
} ROSRGNDATA, *PROSRGNDATA, *LPROSRGNDATA;
|
||||||
|
|
||||||
|
|
||||||
#define RGNDATA_FreeRgn(hRgn) GDIOBJ_FreeObj((HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION, GDIOBJFLAG_DEFAULT)
|
#define RGNDATA_FreeRgn(hRgn) GDIOBJ_FreeObj((HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION)
|
||||||
#define RGNDATA_LockRgn(hRgn) ((PROSRGNDATA)GDIOBJ_LockObj((HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION))
|
#define RGNDATA_LockRgn(hRgn) ((PROSRGNDATA)GDIOBJ_LockObj((HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION))
|
||||||
#define RGNDATA_UnlockRgn(hRgn) GDIOBJ_UnlockObj((HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION)
|
#define RGNDATA_UnlockRgn(Rgn) GDIOBJ_UnlockObj((PGDIOBJ)Rgn)
|
||||||
HRGN FASTCALL RGNDATA_AllocRgn(INT n);
|
HRGN FASTCALL RGNDATA_AllocRgn(INT n);
|
||||||
|
BOOL FASTCALL RGNDATA_Cleanup(PROSRGNDATA pRgn);
|
||||||
BOOL FASTCALL RGNDATA_InternalDelete( PROSRGNDATA Obj );
|
|
||||||
|
|
||||||
/* User entry points */
|
/* User entry points */
|
||||||
HRGN STDCALL
|
HRGN STDCALL
|
||||||
|
|
|
@ -6,16 +6,16 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
LOGFONTW logfont;
|
LOGFONTW logfont;
|
||||||
HFONT GDIFontHandle;
|
FONTOBJ *Font;
|
||||||
} TEXTOBJ, *PTEXTOBJ;
|
} TEXTOBJ, *PTEXTOBJ;
|
||||||
|
|
||||||
/* Internal interface */
|
/* Internal interface */
|
||||||
|
|
||||||
#define TEXTOBJ_AllocText() \
|
#define TEXTOBJ_AllocText() \
|
||||||
((HFONT) GDIOBJ_AllocObj (sizeof (TEXTOBJ), GDI_OBJECT_TYPE_FONT, NULL))
|
((HFONT) GDIOBJ_AllocObj (GDI_OBJECT_TYPE_FONT))
|
||||||
#define TEXTOBJ_FreeText(hBMObj) GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_FONT, GDIOBJFLAG_DEFAULT)
|
#define TEXTOBJ_FreeText(hBMObj) GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_FONT)
|
||||||
#define TEXTOBJ_LockText(hBMObj) ((PTEXTOBJ) GDIOBJ_LockObj ((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_FONT))
|
#define TEXTOBJ_LockText(hBMObj) ((PTEXTOBJ) GDIOBJ_LockObj ((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_FONT))
|
||||||
#define TEXTOBJ_UnlockText(hBMObj) GDIOBJ_UnlockObj ((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_FONT)
|
#define TEXTOBJ_UnlockText(BMObj) GDIOBJ_UnlockObj ((PGDIOBJ) BMObj)
|
||||||
|
|
||||||
NTSTATUS FASTCALL TextIntRealizeFont(HFONT FontHandle);
|
NTSTATUS FASTCALL TextIntRealizeFont(HFONT FontHandle);
|
||||||
NTSTATUS FASTCALL TextIntCreateFontIndirect(CONST LPLOGFONTW lf, HFONT *NewFont);
|
NTSTATUS FASTCALL TextIntCreateFontIndirect(CONST LPLOGFONTW lf, HFONT *NewFont);
|
||||||
|
|
|
@ -30,10 +30,21 @@ typedef struct _THRDCARETINFO
|
||||||
BYTE Showing;
|
BYTE Showing;
|
||||||
} THRDCARETINFO, *PTHRDCARETINFO;
|
} THRDCARETINFO, *PTHRDCARETINFO;
|
||||||
|
|
||||||
|
void InitStockObjects(void);
|
||||||
VOID CreateFrameBrushes(VOID);
|
VOID CreateFrameBrushes(VOID);
|
||||||
VOID DeleteFrameBrushes(VOID);
|
VOID DeleteFrameBrushes(VOID);
|
||||||
void DrawCaret(HWND hWnd, PTHRDCARETINFO CaretInfo);
|
void DrawCaret(HWND hWnd, PTHRDCARETINFO CaretInfo);
|
||||||
|
|
||||||
|
LONG WINAPI RegCloseKey(HKEY);
|
||||||
|
LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
|
||||||
|
LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
|
||||||
|
|
||||||
|
#ifdef __USE_W32API
|
||||||
|
NTSTATUS STDCALL ZwCallbackReturn(PVOID Result,
|
||||||
|
ULONG ResultLength,
|
||||||
|
NTSTATUS Status);
|
||||||
|
#endif
|
||||||
|
|
||||||
#define NtUserAnyPopup() \
|
#define NtUserAnyPopup() \
|
||||||
(BOOL)NtUserCallNoParam(NOPARAM_ROUTINE_ANYPOPUP)
|
(BOOL)NtUserCallNoParam(NOPARAM_ROUTINE_ANYPOPUP)
|
||||||
|
|
||||||
|
@ -61,6 +72,18 @@ void DrawCaret(HWND hWnd, PTHRDCARETINFO CaretInfo);
|
||||||
#define NtUserRegisterLogonProcess(hproc, x) \
|
#define NtUserRegisterLogonProcess(hproc, x) \
|
||||||
(BOOL)NtUserCallTwoParam((DWORD)hproc, (DWORD)x, TWOPARAM_ROUTINE_REGISTERLOGONPROC)
|
(BOOL)NtUserCallTwoParam((DWORD)hproc, (DWORD)x, TWOPARAM_ROUTINE_REGISTERLOGONPROC)
|
||||||
|
|
||||||
|
#define NtUserGetSysColorBrushes(HBrushes, count) \
|
||||||
|
(BOOL)NtUserCallTwoParam((DWORD)(HBrushes), (DWORD)(count), TWOPARAM_ROUTINE_GETSYSCOLORBRUSHES)
|
||||||
|
|
||||||
|
#define NtUserGetSysColorPens(HPens, count) \
|
||||||
|
(BOOL)NtUserCallTwoParam((DWORD)(HPens), (DWORD)(count), TWOPARAM_ROUTINE_GETSYSCOLORPENS)
|
||||||
|
|
||||||
|
#define NtUserGetSysColors(ColorRefs, count) \
|
||||||
|
(BOOL)NtUserCallTwoParam((DWORD)(ColorRefs), (DWORD)(count), TWOPARAM_ROUTINE_GETSYSCOLORS)
|
||||||
|
|
||||||
|
#define NtUserSetSysColors(ColorRefs, count) \
|
||||||
|
(BOOL)NtUserCallTwoParam((DWORD)(ColorRefs), (DWORD)(count), TWOPARAM_ROUTINE_SETSYSCOLORS)
|
||||||
|
|
||||||
#define NtUserSetCaretBlinkTime(uMSeconds) \
|
#define NtUserSetCaretBlinkTime(uMSeconds) \
|
||||||
(BOOL)NtUserCallOneParam((DWORD)uMSeconds, ONEPARAM_ROUTINE_SETCARETBLINKTIME)
|
(BOOL)NtUserCallOneParam((DWORD)uMSeconds, ONEPARAM_ROUTINE_SETCARETBLINKTIME)
|
||||||
|
|
||||||
|
@ -100,12 +123,3 @@ void DrawCaret(HWND hWnd, PTHRDCARETINFO CaretInfo);
|
||||||
#define NtUserEnableProcessWindowGhosting(bEnable) \
|
#define NtUserEnableProcessWindowGhosting(bEnable) \
|
||||||
NtUserCallOneParam((DWORD)bEnable, ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING)
|
NtUserCallOneParam((DWORD)bEnable, ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING)
|
||||||
|
|
||||||
LONG WINAPI RegCloseKey(HKEY);
|
|
||||||
LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
|
|
||||||
LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
|
|
||||||
|
|
||||||
#ifdef __USE_W32API
|
|
||||||
NTSTATUS STDCALL ZwCallbackReturn(PVOID Result,
|
|
||||||
ULONG ResultLength,
|
|
||||||
NTSTATUS Status);
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -7,14 +7,37 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <user32/wininternal.h>
|
#include <user32/wininternal.h>
|
||||||
|
|
||||||
|
extern COLORREF SysColors[];
|
||||||
|
extern HPEN SysPens[];
|
||||||
|
extern HBRUSH SysBrushes[];
|
||||||
|
|
||||||
|
#define NUM_SYSCOLORS 31
|
||||||
|
|
||||||
#define IS_ATOM(x) \
|
#define IS_ATOM(x) \
|
||||||
(((ULONG_PTR)(x) > 0x0) && ((ULONG_PTR)(x) < 0x10000))
|
(((ULONG_PTR)(x) > 0x0) && ((ULONG_PTR)(x) < 0x10000))
|
||||||
|
|
||||||
|
#define UserHasAnyFrameStyle(Style, ExStyle) \
|
||||||
|
(((Style) & (WS_THICKFRAME | WS_DLGFRAME | WS_BORDER)) || \
|
||||||
|
((ExStyle) & WS_EX_DLGMODALFRAME) || \
|
||||||
|
(!((Style) & (WS_CHILD | WS_POPUP))))
|
||||||
|
|
||||||
|
#define UserHasDlgFrameStyle(Style, ExStyle) \
|
||||||
|
(((ExStyle) & WS_EX_DLGMODALFRAME) || \
|
||||||
|
(((Style) & WS_DLGFRAME) && (!((Style) & WS_THICKFRAME))))
|
||||||
|
|
||||||
|
#define UserHasThickFrameStyle(Style, ExStyle) \
|
||||||
|
(((Style) & WS_THICKFRAME) && \
|
||||||
|
(!(((Style) & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME)))
|
||||||
|
|
||||||
|
#define UserHasThinFrameStyle(Style, ExStyle) \
|
||||||
|
(((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP))))
|
||||||
|
|
||||||
|
#define UserHasBigFrameStyle(Style, ExStyle) \
|
||||||
|
(((Style) & (WS_THICKFRAME | WS_DLGFRAME)) || \
|
||||||
|
((ExStyle) & WS_EX_DLGMODALFRAME))
|
||||||
|
|
||||||
|
|
||||||
BOOL UserDrawSysMenuButton( HWND hWnd, HDC hDC, LPRECT, BOOL down );
|
BOOL UserDrawSysMenuButton( HWND hWnd, HDC hDC, LPRECT, BOOL down );
|
||||||
ULONG
|
|
||||||
UserHasDlgFrameStyle(ULONG Style, ULONG ExStyle);
|
|
||||||
ULONG
|
|
||||||
UserHasThickFrameStyle(ULONG Style, ULONG ExStyle);
|
|
||||||
void
|
void
|
||||||
UserGetFrameSize(ULONG Style, ULONG ExStyle, SIZE *Size);
|
UserGetFrameSize(ULONG Style, ULONG ExStyle, SIZE *Size);
|
||||||
void
|
void
|
||||||
|
|
|
@ -76,6 +76,7 @@ Init(VOID)
|
||||||
InitializeCriticalSection(&gcsMPH);
|
InitializeCriticalSection(&gcsMPH);
|
||||||
|
|
||||||
GdiDllInitialize(NULL, DLL_PROCESS_ATTACH, NULL);
|
GdiDllInitialize(NULL, DLL_PROCESS_ATTACH, NULL);
|
||||||
|
InitStockObjects();
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: stubs.c,v 1.65 2004/08/15 21:36:28 chorns Exp $
|
/* $Id: stubs.c,v 1.66 2004/09/12 19:21:05 weiden Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS user32.dll
|
* PROJECT: ReactOS user32.dll
|
||||||
|
@ -185,21 +185,6 @@ RealMsgWaitForMultipleObjectsEx(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
BOOL
|
|
||||||
STDCALL
|
|
||||||
SetSysColors(
|
|
||||||
int cElements,
|
|
||||||
CONST INT *lpaElements,
|
|
||||||
CONST COLORREF *lpaRgbValues)
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED;
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: defwnd.c,v 1.144 2004/08/15 21:36:29 chorns Exp $
|
/* $Id: defwnd.c,v 1.145 2004/09/12 19:21:06 weiden Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS user32.dll
|
* PROJECT: ReactOS user32.dll
|
||||||
|
@ -41,70 +41,46 @@ void FASTCALL MenuInitSysMenuPopup(HMENU Menu, DWORD Style, DWORD ClsStyle, LONG
|
||||||
|
|
||||||
/* GLOBALS *******************************************************************/
|
/* GLOBALS *******************************************************************/
|
||||||
|
|
||||||
/* TODO: widgets will be cached here.
|
static COLORREF SysColors[NUM_SYSCOLORS] = {0};
|
||||||
static HBITMAP hbClose;
|
static HPEN SysPens[NUM_SYSCOLORS] = {0};
|
||||||
static HBITMAP hbCloseD;
|
static HBRUSH SysBrushes[NUM_SYSCOLORS] = {0};
|
||||||
static HBITMAP hbMinimize;
|
|
||||||
static HBITMAP hbMinimizeD;
|
|
||||||
static HBITMAP hbRestore;
|
|
||||||
static HBITMAP hbRestoreD;
|
|
||||||
static HBITMAP hbMaximize;
|
|
||||||
static HBITMAP hbScrUp;
|
|
||||||
static HBITMAP hbScrDwn;
|
|
||||||
static HBITMAP hbScrLeft;
|
|
||||||
static HBITMAP hbScrRight;
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
static COLORREF SysColors[] =
|
|
||||||
{
|
|
||||||
RGB(212, 208, 200), /* COLOR_SCROLLBAR */
|
|
||||||
RGB(58, 110, 165), /* COLOR_BACKGROUND */
|
|
||||||
RGB(10, 36, 106), /* COLOR_ACTIVECAPTION */
|
|
||||||
RGB(128, 128, 128), /* COLOR_INACTIVECAPTION */
|
|
||||||
RGB(212, 208, 200), /* COLOR_MENU */
|
|
||||||
RGB(255, 255, 255), /* COLOR_WINDOW */
|
|
||||||
RGB(0, 0, 0), /* COLOR_WINDOWFRAME */
|
|
||||||
RGB(0, 0, 0), /* COLOR_MENUTEXT */
|
|
||||||
RGB(0, 0, 0), /* COLOR_WINDOWTEXT */
|
|
||||||
RGB(255, 255, 255), /* COLOR_CAPTIONTEXT */
|
|
||||||
RGB(212, 208, 200), /* COLOR_ACTIVEBORDER */
|
|
||||||
RGB(212, 208, 200), /* COLOR_INACTIVEBORDER */
|
|
||||||
RGB(128, 128, 128), /* COLOR_APPWORKSPACE */
|
|
||||||
RGB(10, 36, 106), /* COLOR_HIGHLIGHT */
|
|
||||||
RGB(255, 255, 255), /* COLOR_HIGHLIGHTTEXT */
|
|
||||||
RGB(212, 208, 200), /* COLOR_BTNFACE */
|
|
||||||
RGB(128, 128, 128), /* COLOR_BTNSHADOW */
|
|
||||||
RGB(128, 128, 128), /* COLOR_GRAYTEXT */
|
|
||||||
RGB(0, 0, 0), /* COLOR_BTNTEXT */
|
|
||||||
RGB(212, 208, 200), /* COLOR_INACTIVECAPTIONTEXT */
|
|
||||||
RGB(255, 255, 255), /* COLOR_BTNHIGHLIGHT */
|
|
||||||
RGB(64, 64, 64), /* COLOR_3DDKSHADOW */
|
|
||||||
RGB(212, 208, 200), /* COLOR_3DLIGHT */
|
|
||||||
RGB(0, 0, 0), /* COLOR_INFOTEXT */
|
|
||||||
RGB(255, 255, 225), /* COLOR_INFOBK */
|
|
||||||
RGB(181, 181, 181), /* COLOR_UNKNOWN */
|
|
||||||
RGB(0, 0, 128), /* COLOR_HOTLIGHT */
|
|
||||||
RGB(166, 202, 240), /* COLOR_GRADIENTACTIVECAPTION */
|
|
||||||
RGB(192, 192, 192), /* COLOR_GRADIENTINACTIVECAPTION */
|
|
||||||
RGB(49, 106, 197), /* COLOR_MENUHILIGHT */
|
|
||||||
RGB(236, 233, 216) /* COLOR_MENUBAR */
|
|
||||||
};
|
|
||||||
|
|
||||||
#define NUM_SYSCOLORS (sizeof(SysColors) / sizeof(SysColors[0]))
|
|
||||||
|
|
||||||
/* Bits in the dwKeyData */
|
/* Bits in the dwKeyData */
|
||||||
#define KEYDATA_ALT 0x2000
|
#define KEYDATA_ALT 0x2000
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
|
void
|
||||||
|
InitStockObjects(void)
|
||||||
|
{
|
||||||
|
/* FIXME - Instead of copying the stuff to usermode we should map the tables to
|
||||||
|
userland. The current implementation has one big flaw: the system color
|
||||||
|
table doesn't get updated when another process changes them. That's why
|
||||||
|
we should rather map the table into usermode. But it only affects the
|
||||||
|
SysColors table - the pens, brushes and stock objects are not affected
|
||||||
|
as their handles never change. But it'd be faster to map them, too. */
|
||||||
|
if(SysBrushes[0] == NULL)
|
||||||
|
{
|
||||||
|
/* only initialize once */
|
||||||
|
NtUserGetSysColors(SysColors, NUM_SYSCOLORS);
|
||||||
|
NtUserGetSysColorPens(SysPens, NUM_SYSCOLORS);
|
||||||
|
NtUserGetSysColorBrushes(SysBrushes, NUM_SYSCOLORS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
DWORD STDCALL
|
DWORD STDCALL
|
||||||
GetSysColor(int nIndex)
|
GetSysColor(int nIndex)
|
||||||
{
|
{
|
||||||
|
if(nIndex >= 0 && nIndex <= NUM_SYSCOLORS)
|
||||||
|
{
|
||||||
return SysColors[nIndex];
|
return SysColors[nIndex];
|
||||||
|
}
|
||||||
|
|
||||||
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -113,22 +89,13 @@ GetSysColor(int nIndex)
|
||||||
HPEN STDCALL
|
HPEN STDCALL
|
||||||
GetSysColorPen(int nIndex)
|
GetSysColorPen(int nIndex)
|
||||||
{
|
{
|
||||||
static HPEN SysPens[NUM_SYSCOLORS];
|
if(nIndex >= 0 && nIndex <= NUM_SYSCOLORS)
|
||||||
|
{
|
||||||
|
return SysPens[nIndex];
|
||||||
|
}
|
||||||
|
|
||||||
if (nIndex < 0 || NUM_SYSCOLORS < nIndex)
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
{
|
return NULL;
|
||||||
SetLastError(ERROR_INVALID_PARAMETER);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FIXME should register this object with DeleteObject() so it
|
|
||||||
can't be deleted */
|
|
||||||
if (NULL == SysPens[nIndex])
|
|
||||||
{
|
|
||||||
SysPens[nIndex] = CreatePen(PS_SOLID, 1, SysColors[nIndex]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return SysPens[nIndex];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -137,89 +104,51 @@ GetSysColorPen(int nIndex)
|
||||||
HBRUSH STDCALL
|
HBRUSH STDCALL
|
||||||
GetSysColorBrush(int nIndex)
|
GetSysColorBrush(int nIndex)
|
||||||
{
|
{
|
||||||
static HBRUSH SysBrushes[NUM_SYSCOLORS];
|
if(nIndex >= 0 && nIndex <= NUM_SYSCOLORS)
|
||||||
|
{
|
||||||
|
return SysBrushes[nIndex];
|
||||||
|
}
|
||||||
|
|
||||||
if (nIndex < 0 || NUM_SYSCOLORS < nIndex)
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
{
|
return NULL;
|
||||||
SetLastError(ERROR_INVALID_PARAMETER);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FIXME should register this object with DeleteObject() so it
|
|
||||||
can't be deleted */
|
|
||||||
if (NULL == SysBrushes[nIndex])
|
|
||||||
{
|
|
||||||
SysBrushes[nIndex] = (HBRUSH) ((DWORD) CreateSolidBrush(SysColors[nIndex]) | 0x00800000);
|
|
||||||
}
|
|
||||||
|
|
||||||
return SysBrushes[nIndex];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
/*
|
BOOL
|
||||||
LRESULT STDCALL
|
STDCALL
|
||||||
DefFrameProcA( HWND hWnd,
|
SetSysColors(
|
||||||
HWND hWndMDIClient,
|
int cElements,
|
||||||
UINT uMsg,
|
CONST INT *lpaElements,
|
||||||
WPARAM wParam,
|
CONST COLORREF *lpaRgbValues)
|
||||||
LPARAM lParam )
|
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
BOOL Ret;
|
||||||
return ((LRESULT)0);
|
struct
|
||||||
}
|
{
|
||||||
*/
|
INT *Elements;
|
||||||
|
COLORREF *Colors;
|
||||||
|
} ChangeSysColors;
|
||||||
|
|
||||||
/*
|
ChangeSysColors.Elements = (INT*)lpaElements;
|
||||||
* @unimplemented
|
ChangeSysColors.Colors = (COLORREF*)lpaRgbValues;
|
||||||
*/
|
|
||||||
/*
|
if(cElements > 0)
|
||||||
LRESULT STDCALL
|
{
|
||||||
DefFrameProcW(HWND hWnd,
|
Ret = NtUserSetSysColors(&ChangeSysColors, cElements);
|
||||||
HWND hWndMDIClient,
|
if(Ret)
|
||||||
UINT uMsg,
|
{
|
||||||
WPARAM wParam,
|
/* FIXME - just change it in the usermode structure, too, instead of asking win32k again */
|
||||||
LPARAM lParam)
|
NtUserGetSysColors(SysColors, NUM_SYSCOLORS);
|
||||||
{
|
}
|
||||||
UNIMPLEMENTED;
|
}
|
||||||
return ((LRESULT)0);
|
else
|
||||||
}
|
{
|
||||||
*/
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
|
Ret = FALSE;
|
||||||
ULONG
|
}
|
||||||
UserHasAnyFrameStyle(ULONG Style, ULONG ExStyle)
|
|
||||||
{
|
return Ret;
|
||||||
return ((Style & (WS_THICKFRAME | WS_DLGFRAME | WS_BORDER)) ||
|
|
||||||
(ExStyle & WS_EX_DLGMODALFRAME) ||
|
|
||||||
(!(Style & (WS_CHILD | WS_POPUP))));
|
|
||||||
}
|
|
||||||
|
|
||||||
ULONG
|
|
||||||
UserHasDlgFrameStyle(ULONG Style, ULONG ExStyle)
|
|
||||||
{
|
|
||||||
return ((ExStyle & WS_EX_DLGMODALFRAME) ||
|
|
||||||
((Style & WS_DLGFRAME) && (!(Style & WS_THICKFRAME))));
|
|
||||||
}
|
|
||||||
|
|
||||||
ULONG
|
|
||||||
UserHasThickFrameStyle(ULONG Style, ULONG ExStyle)
|
|
||||||
{
|
|
||||||
return ((Style & WS_THICKFRAME) &&
|
|
||||||
(!((Style & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME)));
|
|
||||||
}
|
|
||||||
|
|
||||||
ULONG
|
|
||||||
UserHasThinFrameStyle(ULONG Style, ULONG ExStyle)
|
|
||||||
{
|
|
||||||
return ((Style & WS_BORDER) || (!(Style & (WS_CHILD | WS_POPUP))));
|
|
||||||
}
|
|
||||||
|
|
||||||
ULONG
|
|
||||||
UserHasBigFrameStyle(ULONG Style, ULONG ExStyle)
|
|
||||||
{
|
|
||||||
return ((Style & (WS_THICKFRAME | WS_DLGFRAME)) ||
|
|
||||||
(ExStyle & WS_EX_DLGMODALFRAME));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue