ReactOS  0.4.13-dev-73-gcfe54aa
bitmaps.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

INT APIENTRY BITMAP_GetObject (SURFACE *bmp, INT count, LPVOID buffer)
 
HBITMAP FASTCALL BITMAP_CopyBitmap (HBITMAP hBitmap)
 
BOOL NTAPI GreSetBitmapOwner (_In_ HBITMAP hbmp, _In_ ULONG ulOwner)
 
HBITMAP NTAPI GreCreateBitmap (_In_ ULONG nWidth, _In_ ULONG nHeight, _In_ ULONG cPlanes, _In_ ULONG cBitsPixel, _In_opt_ PVOID pvBits)
 
HBITMAP NTAPI GreCreateBitmapEx (_In_ ULONG nWidth, _In_ ULONG nHeight, _In_ ULONG cjWidthBytes, _In_ ULONG iFormat, _In_ USHORT fjBitmap, _In_ ULONG cjSizeImage, _In_opt_ PVOID pvBits, _In_ FLONG flags)
 
HBITMAP NTAPI GreCreateDIBitmapInternal (IN HDC hDc, IN INT cx, IN INT cy, IN DWORD fInit, IN OPTIONAL LPBYTE pjInit, IN OPTIONAL PBITMAPINFO pbmi, IN DWORD iUsage, IN FLONG fl, IN UINT cjMaxBits, IN HANDLE hcmXform)
 
BOOL NTAPI GreGetBitmapDimension (_In_ HBITMAP hBitmap, _Out_ LPSIZE psizDim)
 

Function Documentation

◆ BITMAP_CopyBitmap()

HBITMAP FASTCALL BITMAP_CopyBitmap ( HBITMAP  hBitmap)

Definition at line 709 of file bitmaps.c.

710 {
711  HBITMAP hbmNew;
712  SURFACE *psurfSrc, *psurfNew;
713 
714  /* Fail, if no source bitmap is given */
715  if (hBitmap == NULL) return 0;
716 
717  /* Lock the source bitmap */
718  psurfSrc = SURFACE_ShareLockSurface(hBitmap);
719  if (psurfSrc == NULL)
720  {
721  return 0;
722  }
723 
724  /* Allocate a new bitmap with the same dimensions as the source bmp */
725  hbmNew = GreCreateBitmapEx(psurfSrc->SurfObj.sizlBitmap.cx,
726  psurfSrc->SurfObj.sizlBitmap.cy,
727  abs(psurfSrc->SurfObj.lDelta),
728  psurfSrc->SurfObj.iBitmapFormat,
729  psurfSrc->SurfObj.fjBitmap & BMF_TOPDOWN,
730  psurfSrc->SurfObj.cjBits,
731  NULL,
732  psurfSrc->flags);
733 
734  if (hbmNew)
735  {
736  /* Lock the new bitmap */
737  psurfNew = SURFACE_ShareLockSurface(hbmNew);
738  if (psurfNew)
739  {
740  /* Copy the bitmap bits to the new bitmap buffer */
741  RtlCopyMemory(psurfNew->SurfObj.pvBits,
742  psurfSrc->SurfObj.pvBits,
743  psurfNew->SurfObj.cjBits);
744 
745 
746  /* Reference the palette of the source bitmap and use it */
747  SURFACE_vSetPalette(psurfNew, psurfSrc->ppal);
748 
749  /* Unlock the new surface */
750  SURFACE_ShareUnlockSurface(psurfNew);
751  }
752  else
753  {
754  /* Failed to lock the bitmap, shouldn't happen */
755  GreDeleteObject(hbmNew);
756  hbmNew = NULL;
757  }
758  }
759 
760  /* Unlock the source bitmap and return the handle of the new bitmap */
761  SURFACE_ShareUnlockSurface(psurfSrc);
762  return hbmNew;
763 }
#define abs(i)
Definition: fconv.c:206
BOOL NTAPI GreDeleteObject(HGDIOBJ hobj)
Definition: gdiobj.c:1153
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
SIZEL sizlBitmap
Definition: winddi.h:1209
LONG lDelta
Definition: winddi.h:1213
#define SURFACE_ShareUnlockSurface(pBMObj)
Definition: surface.h:102
struct _PALETTE *const ppal
Definition: surface.h:11
#define BMF_TOPDOWN
Definition: winddi.h:1180
ULONG iBitmapFormat
Definition: winddi.h:1215
#define SURFACE_ShareLockSurface(hBMObj)
Definition: surface.h:91
ULONG cjBits
Definition: winddi.h:1210
SURFOBJ SurfObj
Definition: surface.h:8
smooth NULL
Definition: ftsmooth.c:416
LONG cx
Definition: windef.h:319
FORCEINLINE VOID SURFACE_vSetPalette(_Inout_ PSURFACE psurf, _In_ PPALETTE ppal)
Definition: surface.h:136
USHORT fjBitmap
Definition: winddi.h:1217
FLONG flags
Definition: surface.h:10
HBITMAP NTAPI GreCreateBitmapEx(_In_ ULONG nWidth, _In_ ULONG nHeight, _In_ ULONG cjWidthBytes, _In_ ULONG iFormat, _In_ USHORT fjBitmap, _In_ ULONG cjSizeImage, _In_opt_ PVOID pvBits, _In_ FLONG flags)
Definition: bitmaps.c:101
PVOID pvBits
Definition: winddi.h:1211
static HBITMAP
Definition: button.c:44
LONG cy
Definition: windef.h:320
static HBITMAP hBitmap
Definition: timezone.c:35

Referenced by _Success_(), and NtGdiCreatePatternBrushInternal().

◆ BITMAP_GetObject()

INT APIENTRY BITMAP_GetObject ( SURFACE bmp,
INT  count,
LPVOID  buffer 
)

Definition at line 766 of file bitmaps.c.

767 {
768  PBITMAP pBitmap;
769 
770  if (!buffer) return sizeof(BITMAP);
771  if ((UINT)Count < sizeof(BITMAP)) return 0;
772 
773  /* Always fill a basic BITMAP structure */
774  pBitmap = buffer;
775  pBitmap->bmType = 0;
776  pBitmap->bmWidth = psurf->SurfObj.sizlBitmap.cx;
777  pBitmap->bmHeight = psurf->SurfObj.sizlBitmap.cy;
778  pBitmap->bmPlanes = 1;
779  pBitmap->bmBitsPixel = BitsPerFormat(psurf->SurfObj.iBitmapFormat);
780  pBitmap->bmWidthBytes = WIDTH_BYTES_ALIGN16(pBitmap->bmWidth, pBitmap->bmBitsPixel);
781 
782  /* Check for DIB section */
783  if (psurf->hSecure)
784  {
785  /* Set bmBits in this case */
786  pBitmap->bmBits = psurf->SurfObj.pvBits;
787  /* DIBs data are 32 bits aligned */
788  pBitmap->bmWidthBytes = WIDTH_BYTES_ALIGN32(pBitmap->bmWidth, pBitmap->bmBitsPixel);
789 
790  if (Count >= sizeof(DIBSECTION))
791  {
792  /* Fill rest of DIBSECTION */
793  PDIBSECTION pds = buffer;
794 
795  pds->dsBmih.biSize = sizeof(BITMAPINFOHEADER);
796  pds->dsBmih.biWidth = pds->dsBm.bmWidth;
797  pds->dsBmih.biHeight = pds->dsBm.bmHeight;
798  pds->dsBmih.biPlanes = pds->dsBm.bmPlanes;
799  pds->dsBmih.biBitCount = pds->dsBm.bmBitsPixel;
800 
801  switch (psurf->SurfObj.iBitmapFormat)
802  {
803  case BMF_1BPP:
804  case BMF_4BPP:
805  case BMF_8BPP:
806  pds->dsBmih.biCompression = BI_RGB;
807  break;
808 
809  case BMF_16BPP:
810  if (psurf->ppal->flFlags & PAL_RGB16_555)
811  pds->dsBmih.biCompression = BI_RGB;
812  else
814  break;
815 
816  case BMF_24BPP:
817  case BMF_32BPP:
818  /* 24/32bpp BI_RGB is actually BGR format */
819  if (psurf->ppal->flFlags & PAL_BGR)
820  pds->dsBmih.biCompression = BI_RGB;
821  else
823  break;
824 
825  case BMF_4RLE:
827  break;
828  case BMF_8RLE:
830  break;
831  case BMF_JPEG:
833  break;
834  case BMF_PNG:
835  pds->dsBmih.biCompression = BI_PNG;
836  break;
837  default:
838  ASSERT(FALSE); /* This shouldn't happen */
839  }
840 
841  pds->dsBmih.biSizeImage = psurf->SurfObj.cjBits;
842  pds->dsBmih.biXPelsPerMeter = 0;
843  pds->dsBmih.biYPelsPerMeter = 0;
844  pds->dsBmih.biClrUsed = psurf->ppal->NumColors;
845  pds->dsBmih.biClrImportant = psurf->biClrImportant;
846  pds->dsBitfields[0] = psurf->ppal->RedMask;
847  pds->dsBitfields[1] = psurf->ppal->GreenMask;
848  pds->dsBitfields[2] = psurf->ppal->BlueMask;
849  pds->dshSection = psurf->hDIBSection;
850  pds->dsOffset = psurf->dwOffset;
851 
852  return sizeof(DIBSECTION);
853  }
854  }
855  else
856  {
857  /* Not set according to wine test, confirmed in win2k */
858  pBitmap->bmBits = NULL;
859  }
860 
861  return sizeof(BITMAP);
862 }
#define BMF_24BPP
Definition: winddi.h:359
BITMAPINFOHEADER dsBmih
Definition: wingdi.h:1648
#define BMF_32BPP
Definition: winddi.h:360
#define WIDTH_BYTES_ALIGN32(cx, bpp)
Definition: swimpl.c:16
DWORD biClrImportant
Definition: amvideo.idl:40
#define BitsPerFormat(Format)
Definition: surface.h:109
LONG biXPelsPerMeter
Definition: amvideo.idl:37
struct tagBITMAPINFOHEADER BITMAPINFOHEADER
#define BI_JPEG
Definition: wingdi.h:38
#define BMF_8RLE
Definition: winddi.h:362
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
GLuint buffer
Definition: glext.h:5915
Definition: xlate.c:10
LONG biYPelsPerMeter
Definition: amvideo.idl:38
#define BI_BITFIELDS
Definition: mmreg.h:507
#define BMF_PNG
Definition: winddi.h:364
DWORD biCompression
Definition: amvideo.idl:35
#define BMF_4RLE
Definition: winddi.h:361
smooth NULL
Definition: ftsmooth.c:416
DWORD dsBitfields[3]
Definition: wingdi.h:1649
#define BMF_16BPP
Definition: winddi.h:358
#define WIDTH_BYTES_ALIGN16(cx, bpp)
Definition: swimpl.c:17
DWORD dsOffset
Definition: wingdi.h:1651
DWORD biSizeImage
Definition: amvideo.idl:36
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
HANDLE dshSection
Definition: wingdi.h:1650
#define BI_PNG
Definition: wingdi.h:39
Definition: bl.h:1331
Definition: xlate.c:8
BITMAP dsBm
Definition: wingdi.h:1647
unsigned int UINT
Definition: ndis.h:50
#define BI_RLE4
Definition: precomp.h:36
Definition: xlate.c:9
struct tagDIBSECTION DIBSECTION
#define BI_RLE8
Definition: wingdi.h:35
#define BI_RGB
Definition: precomp.h:35
#define BITMAP
Definition: pedump.c:503
#define BMF_JPEG
Definition: winddi.h:363

Referenced by GreGetObject(), and IntCreateCompatibleBitmap().

◆ GreCreateBitmap()

HBITMAP NTAPI GreCreateBitmap ( _In_ ULONG  nWidth,
_In_ ULONG  nHeight,
_In_ ULONG  cPlanes,
_In_ ULONG  cBitsPixel,
_In_opt_ PVOID  pvBits 
)

Definition at line 172 of file bitmaps.c.

178 {
179  /* Call the extended function */
180  return GreCreateBitmapEx(nWidth,
181  nHeight,
182  0, /* Auto width */
183  BitmapFormat(cBitsPixel * cPlanes, BI_RGB),
184  0, /* No bitmap flags */
185  0, /* Auto size */
186  pvBits,
187  DDB_SURFACE /* DDB */);
188 }
ULONG FASTCALL BitmapFormat(ULONG cBits, ULONG iCompression)
Definition: surface.c:39
HBITMAP NTAPI GreCreateBitmapEx(_In_ ULONG nWidth, _In_ ULONG nHeight, _In_ ULONG cjWidthBytes, _In_ ULONG iFormat, _In_ USHORT fjBitmap, _In_ ULONG cjSizeImage, _In_opt_ PVOID pvBits, _In_ FLONG flags)
Definition: bitmaps.c:101
#define BI_RGB
Definition: precomp.h:35

Referenced by CreateStockObjects(), IntCreateCompatibleBitmap(), IntCreateDIBitmap(), NtGdiCreateCompatibleBitmap(), and UserInitialize().

◆ GreCreateBitmapEx()

HBITMAP NTAPI GreCreateBitmapEx ( _In_ ULONG  nWidth,
_In_ ULONG  nHeight,
_In_ ULONG  cjWidthBytes,
_In_ ULONG  iFormat,
_In_ USHORT  fjBitmap,
_In_ ULONG  cjSizeImage,
_In_opt_ PVOID  pvBits,
_In_ FLONG  flags 
)

Definition at line 101 of file bitmaps.c.

110 {
111  PSURFACE psurf;
112  HBITMAP hbmp;
113  PVOID pvCompressedBits = NULL;
114 
115  /* Verify format */
117 
118  /* The infamous RLE hack */
119  if ((iFormat == BMF_4RLE) || (iFormat == BMF_8RLE))
120  {
121  pvCompressedBits = pvBits;
122  pvBits = NULL;
124  }
125 
126  /* Allocate a surface */
128  nWidth,
129  nHeight,
130  iFormat,
131  fjBitmap,
132  cjWidthBytes,
133  pvCompressedBits ? 0 : cjSizeImage,
134  pvBits);
135  if (!psurf)
136  {
137  DPRINT1("SURFACE_AllocSurface failed.\n");
138  return NULL;
139  }
140 
141  /* The infamous RLE hack */
142  if (pvCompressedBits)
143  {
144  SIZEL sizl;
145  LONG lDelta;
146 
147  sizl.cx = nWidth;
148  sizl.cy = nHeight;
149  lDelta = WIDTH_BYTES_ALIGN32(nWidth, gajBitsPerFormat[iFormat]);
150 
151  pvBits = psurf->SurfObj.pvBits;
152  DecompressBitmap(sizl, pvCompressedBits, pvBits, lDelta, iFormat, cjSizeImage);
153  }
154 
155  /* Get the handle for the bitmap */
156  hbmp = (HBITMAP)psurf->SurfObj.hsurf;
157 
158  /* Mark as API bitmap */
159  psurf->flags |= (flags | API_BITMAP);
160 
161  /* Unlock the surface and return */
162  SURFACE_UnlockSurface(psurf);
163  return hbmp;
164 }
#define WIDTH_BYTES_ALIGN32(cx, bpp)
Definition: swimpl.c:16
#define STYPE_BITMAP
Definition: winddi.h:1175
#define BMF_8RLE
Definition: winddi.h:362
Definition: xlate.c:10
_In_ SIZEL sizl
Definition: winddi.h:3467
#define BMF_PNG
Definition: winddi.h:364
long LONG
Definition: pedump.c:60
SURFOBJ SurfObj
Definition: surface.h:8
#define BMF_4RLE
Definition: winddi.h:361
HSURF hsurf
Definition: winddi.h:1206
smooth NULL
Definition: ftsmooth.c:416
LONG cx
Definition: windef.h:319
HBITMAP hbmp
PSURFACE NTAPI SURFACE_AllocSurface(_In_ USHORT iType, _In_ ULONG cx, _In_ ULONG cy, _In_ ULONG iFormat, _In_ ULONG fjBitmap, _In_opt_ ULONG cjWidth, _In_opt_ ULONG cjBufSize, _In_opt_ PVOID pvBits)
Definition: surface.c:116
GLbitfield flags
Definition: glext.h:7161
VOID DecompressBitmap(SIZEL Size, BYTE *CompressedBits, BYTE *UncompressedBits, LONG Delta, ULONG iFormat, ULONG cjSizeImage)
Definition: rlecomp.c:21
_In_ SIZEL _In_ ULONG iFormat
Definition: winddi.h:3467
#define SURFACE_UnlockSurface(pBMObj)
Definition: surface.h:100
FLONG flags
Definition: surface.h:10
#define DPRINT1
Definition: precomp.h:8
Definition: xlate.c:9
PVOID pvBits
Definition: winddi.h:1211
static HBITMAP
Definition: button.c:44
UCHAR gajBitsPerFormat[11]
Definition: surface.c:21

Referenced by BITMAP_CopyBitmap(), DIB_CreateDIBSection(), GreCreateBitmap(), IntGdiCreateMaskFromRLE(), IntSetDIBits(), NtGdiSetDIBitsToDeviceInternal(), and NtGdiStretchDIBitsInternal().

◆ GreCreateDIBitmapInternal()

HBITMAP NTAPI GreCreateDIBitmapInternal ( IN HDC  hDc,
IN INT  cx,
IN INT  cy,
IN DWORD  fInit,
IN OPTIONAL LPBYTE  pjInit,
IN OPTIONAL PBITMAPINFO  pbmi,
IN DWORD  iUsage,
IN FLONG  fl,
IN UINT  cjMaxBits,
IN HANDLE  hcmXform 
)

Definition at line 1531 of file dibobj.c.

1542 {
1543  PDC Dc;
1544  HBITMAP Bmp;
1545  USHORT bpp, planes;
1547  HDC hdcDest;
1548 
1549  if (!hDc) /* 1bpp monochrome bitmap */
1550  {
1551  // Should use System Bitmap DC hSystemBM, with CreateCompatibleDC for this.
1552  hdcDest = NtGdiCreateCompatibleDC(0);
1553  if(!hdcDest)
1554  {
1555  DPRINT1("NtGdiCreateCompatibleDC failed\n");
1556  return NULL;
1557  }
1558  }
1559  else
1560  {
1561  hdcDest = hDc;
1562  }
1563 
1564  Dc = DC_LockDc(hdcDest);
1565  if (!Dc)
1566  {
1567  DPRINT1("Failed to lock hdcDest %p\n", hdcDest);
1569  return NULL;
1570  }
1571  /* It's OK to set bpp=0 here, as IntCreateDIBitmap will create a compatible Bitmap
1572  * if bpp != 1 and ignore the real value that was passed */
1573  if (pbmi)
1574  {
1575  if (pbmi->bmiHeader.biSize == sizeof(BITMAPCOREHEADER))
1576  {
1577  BITMAPCOREHEADER* CoreHeader = (BITMAPCOREHEADER*)&pbmi->bmiHeader;
1578  bpp = CoreHeader->bcBitCount;
1579  planes = CoreHeader->bcPlanes ? CoreHeader->bcPlanes : 1;
1580  compression = BI_RGB;
1581  }
1582  else
1583  {
1585  planes = pbmi->bmiHeader.biPlanes ? pbmi->bmiHeader.biPlanes : 1;
1587  }
1588  }
1589  else
1590  {
1591  bpp = 0;
1592  planes = 0;
1593  compression = 0;
1594  }
1595  Bmp = IntCreateDIBitmap(Dc, cx, cy, planes, bpp, compression, fInit, pjInit, cjMaxBits, pbmi, iUsage);
1596  DC_UnlockDc(Dc);
1597 
1598  if(!hDc)
1599  {
1600  NtGdiDeleteObjectApp(hdcDest);
1601  }
1602  return Bmp;
1603 }
FORCEINLINE PDC DC_LockDc(HDC hdc)
Definition: dc.h:219
BITMAPINFOHEADER bmiHeader
Definition: wingdi.h:1454
_In_ HBITMAP _In_ UINT _In_ UINT _Inout_ LPBITMAPINFO pbmi
Definition: ntgdi.h:2780
#define ERROR_INVALID_HANDLE
Definition: compat.h:88
static HDC
Definition: imagelist.c:92
DWORD biCompression
Definition: amvideo.idl:35
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
smooth NULL
Definition: ftsmooth.c:416
_In_ HBITMAP _In_ UINT _In_ UINT _Inout_ LPBITMAPINFO _In_ UINT _In_ UINT cjMaxBits
Definition: ntgdi.h:2780
Definition: polytest.cpp:40
HBITMAP FASTCALL IntCreateDIBitmap(PDC Dc, INT width, INT height, UINT planes, UINT bpp, ULONG compression, DWORD init, LPBYTE bits, ULONG cjMaxBits, PBITMAPINFO data, DWORD coloruse)
Definition: dibobj.c:1359
unsigned long DWORD
Definition: ntddk_ex.h:95
_In_ fcb _In_ chunk _In_ UINT64 _In_ UINT64 _In_ BOOL _In_opt_ void _In_opt_ PIRP _In_ LIST_ENTRY _In_ UINT8 compression
Definition: btrfs_drv.h:1321
__kernel_entry W32KAPI HDC APIENTRY NtGdiCreateCompatibleDC(_In_opt_ HDC hdc)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDeleteObjectApp(_In_ HANDLE hobj)
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
Definition: dc.h:237
unsigned short USHORT
Definition: pedump.c:61
_In_ HBITMAP _In_ UINT _In_ UINT _Inout_ LPBITMAPINFO _In_ UINT iUsage
Definition: ntgdi.h:2780
#define DPRINT1
Definition: precomp.h:8
_Out_opt_ int * cx
Definition: commctrl.h:570
DWORD bpp
Definition: surface.c:181
static HBITMAP
Definition: button.c:44
#define BI_RGB
Definition: precomp.h:35
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:27

Referenced by GreCreateDIBitmapFromPackedDIB(), IntSynthesizeBitmap(), NtGdiCreateDIBitmapInternal(), and UserLoadImage().

◆ GreGetBitmapDimension()

BOOL NTAPI GreGetBitmapDimension ( _In_ HBITMAP  hBitmap,
_Out_ LPSIZE  psizDim 
)

Definition at line 448 of file bitmaps.c.

451 {
452  PSURFACE psurfBmp;
453 
454  if (hBitmap == NULL)
455  return FALSE;
456 
457  /* Lock the bitmap */
458  psurfBmp = SURFACE_ShareLockSurface(hBitmap);
459  if (psurfBmp == NULL)
460  {
462  return FALSE;
463  }
464 
465  *psizDim = psurfBmp->sizlDim;
466 
467  /* Unlock the bitmap */
468  SURFACE_ShareUnlockSurface(psurfBmp);
469 
470  return TRUE;
471 }
#define TRUE
Definition: types.h:120
#define SURFACE_ShareUnlockSurface(pBMObj)
Definition: surface.h:102
#define ERROR_INVALID_HANDLE
Definition: compat.h:88
#define SURFACE_ShareLockSurface(hBMObj)
Definition: surface.h:91
smooth NULL
Definition: ftsmooth.c:416
SIZEL sizlDim
Definition: surface.h:21
static HBITMAP hBitmap
Definition: timezone.c:35
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:27

Referenced by co_IntDrawCaret(), and NtGdiGetBitmapDimension().

◆ GreSetBitmapOwner()

BOOL NTAPI GreSetBitmapOwner ( _In_ HBITMAP  hbmp,
_In_ ULONG  ulOwner 
)

FIXME: this is a hack and doesn't handle a race condition properly. It needs to be done in GDIOBJ_vSetObjectOwner atomically.

Definition at line 17 of file bitmaps.c.

20 {
21  /* Check if we have the correct object type */
23  {
24  DPRINT1("Incorrect type for hbmp: %p\n", hbmp);
25  return FALSE;
26  }
27 
30 
31  /* Check if we set public or none */
32  if ((ulOwner == GDI_OBJ_HMGR_PUBLIC) ||
33  (ulOwner == GDI_OBJ_HMGR_NONE))
34  {
35  /* Only allow this for owned objects */
37  {
38  DPRINT1("Cannot change owner for non-powned hbmp\n");
39  return FALSE;
40  }
41  }
42 
43  return GreSetObjectOwner(hbmp, ulOwner);
44 }
BOOL NTAPI GreSetObjectOwner(HGDIOBJ hobj, ULONG ulOwner)
Definition: gdiobj.c:1250
ULONG NTAPI GreGetObjectOwner(HGDIOBJ hobj)
Definition: gdiobj.c:1187
#define GDI_HANDLE_GET_TYPE(h)
Definition: gdi.h:31
HBITMAP hbmp
#define GDI_OBJ_HMGR_POWNED
Definition: ntgdihdl.h:117
#define GDI_OBJ_HMGR_PUBLIC
Definition: ntgdihdl.h:116
#define DPRINT1
Definition: precomp.h:8
#define GDI_OBJ_HMGR_NONE
Definition: ntgdihdl.h:118

Referenced by CreateBrushInternal(), IntGdiCreatePatternBrush(), IntSetCursorData(), and BRUSH::~BRUSH().