6 #ifndef _INC_cWndBitmap_H
7 #define _INC_cWndBitmap_H
13 #include "../System/cAppRes.h"
26 class cSurfaceBitmapInfo;
32 :
public cWndGDIT<HBITMAP>
40 typedef CBitmap SUPER_t;
42 typedef cWndGDIT<HBITMAP> SUPER_t;
49 cWndBitmap(HBITMAP hBitmap)
57 cWndBitmap(cImageBMP* pDIB)
70 HBITMAP get_HBitmap()
const
73 return((HBITMAP)m_hObject);
77 static HBITMAP
GRAYCALL Bitmap_MakeCopy(HBITMAP hBitmap);
80 operator HBITMAP()
const
82 return(get_HBitmap());
98 size_t get_DIBSize()
const;
99 int GetDIB(cWndDC& dc, HPALETTE hPal, cSurfaceBitmapInfo* pBMI,
void* pvBits)
const;
100 bool GetBITMAPINFO(cSurfaceBitmapInfo& bmi)
const;
102 bool Attach(HBITMAP hBitmap);
105 bool CreateBitmap(tagBITMAPINFO* pDIB,
const void FAR* pBits);
106 bool CreateBitmap(cImageBMP* pDIB);
108 HBITMAP CreateCompatibleBitmap(HDC hDC,
int cx,
int cy)
111 Attach(::CreateCompatibleBitmap(hDC, cx, cy));
112 return get_HBitmap();
115 void Copy(HBITMAP hBitmap);
116 HBITMAP MakeCopy()
const;
123 return ReadBMP(strIn,
true);
127 return WriteBMP(pOutput,
true);
139 void BltCopy(HDC hDC,
int x = 0,
int y = 0)
const;
140 void BltStretch(HDC hDC,
int cx,
int cy,
int x = 0,
int y = 0)
const;
142 HBITMAP CreateAnd(
void)
const;
144 HDC hDC, HBITMAP hbmpAnd,
int xDst = 0,
int yDst = 0,
145 int cxDst = -1,
int cyDst = -1,
146 int xSrc = 0,
int ySrc = 0)
const;
152 typedef cWndBitmap CBitmap;
#define GRAYCALL
declare calling convention for static functions so everyone knows the arg passing scheme....
Definition: GrayCore.h:36
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
#define _GTN(c)
_WIN32 name has a A or W for UTF8 or UNICODE (like _FNF)
Definition: StrConst.h:28
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
#define WINHANDLE_NULL
HWND, HPEN, etc are NOT OS Handles. like HWND_DESKTOP. like HANDLEPTR_NULL. This is a WINAPI void* ha...
Definition: cOSHandle.h:23
static constexpr const GChar_t * MakeIntResource(RESOURCEID_t id) noexcept
Definition: cWinResource.h:45
UNITTEST2_PREDEF(cQuadtree)
class __DECL_IMPORT cStreamOutput
Definition: cString.h:27
char FILECHAR_t
a UTF8 char in a file name. like TCHAR
Definition: FileName.h:22
WORD RESOURCEID_t
A resource in .RC attached to a file/module. like MAKEINTRESOURCE(). https://docs....
Definition: cResourceBase.h:19
class __DECL_IMPORT cStreamInput
Definition: cString.h:26