-
Notifications
You must be signed in to change notification settings - Fork 0
/
DIBAPI.H
49 lines (37 loc) · 1.57 KB
/
DIBAPI.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// dibapi.h
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992 Microsoft Corporation
// All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Foundation Classes Reference and Microsoft
// QuickHelp and/or WinHelp documentation provided with the library.
// See these sources for detailed information regarding the
// Microsoft Foundation Classes product.
#ifndef _INC_DIBAPI
#define _INC_DIBAPI
/* Handle to a DIB */
DECLARE_HANDLE(HDIB);
/* DIB constants */
#define PALVERSION 0x300
/* DIB Macros*/
#define IS_WIN30_DIB(lpbi) ((*(LPDWORD)(lpbi)) == sizeof(BITMAPINFOHEADER))
#define RECTWIDTH(lpRect) ((lpRect)->right - (lpRect)->left)
#define RECTHEIGHT(lpRect) ((lpRect)->bottom - (lpRect)->top)
// WIDTHBYTES performs DWORD-aligning of DIB scanlines. The "bits"
// parameter is the bit count for the scanline (biWidth * biBitCount),
// and this macro returns the number of DWORD-aligned bytes needed
// to hold those bits.
#define WIDTHBYTES(bits) (((bits) + 31) / 32 * 4)
/* Function prototypes */
BOOL WINAPI PaintDIB (HDC, LPRECT,char *, LPRECT, CPalette* pPal);
BOOL WINAPI CreateDIBPalette(char *, CPalette* cPal);
LPSTR WINAPI FindDIBBits (LPSTR lpbi);
DWORD WINAPI DIBWidth (LPSTR lpDIB);
DWORD WINAPI DIBHeight (LPSTR lpDIB);
WORD WINAPI PaletteSize (LPSTR lpbi);
WORD WINAPI DIBNumColors (LPSTR lpbi);
HGLOBAL WINAPI CopyHandle (HGLOBAL h);
BOOL WINAPI SaveDIB (HDIB hDib, CFile& file);
int ReadDIBFile(CFile& file);
#endif //!_INC_DIBAPI