⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dibapi.h

📁 用内存设备上下文实现图像选中区域 的判断
💻 H
字号:
// dibapi.h
//
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 Microsoft Corporation
// All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Foundation Classes Reference and related
// electronic 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, HDIB, LPRECT, HPALETTE hPal);
BOOL      WINAPI  CreateDIBPalette(HDIB hDIB, HPALETTE* pPal);
LPSTR     WINAPI  FindDIBBits (LPSTR lpbi);
DWORD     WINAPI  DIBWidth (LPSTR lpDIB);
DWORD     WINAPI  DIBHeight (LPSTR lpDIB);
WORD      WINAPI  PaletteSize (LPSTR lpbi);
WORD      WINAPI  DIBNumColors (LPSTR);
HGLOBAL   WINAPI  CopyHandle (HGLOBAL);

HDIB      WINAPI  ReadDIBFile(LPCTSTR);


//TONG ADDED
DWORD     WINAPI  BytesPerLine(LPBYTE);
DWORD	  WINAPI  BytesPerLine(LPBITMAPINFOHEADER);
DWORD     WINAPI  DIBlockSize(LPBYTE);
HDIB      WINAPI  ConvertDIBFormat( LPBYTE,UINT,HPALETTE);
BOOL              CopyColorTable( LPBITMAPINFO, LPBITMAPINFO,HPALETTE);
HDIB      WINAPI  ColorQuantizeDIB(HDIB,UINT,UINT);
BOOL      WINAPI  SaveDIBToFile(HDIB, LPCTSTR);
HBITMAP   WINAPI  DIBToDIBSection(LPBYTE lpDIB);
HDIB      WINAPI  DIBSectionToDIB(HBITMAP hBitmap);
#endif //!_INC_DIBAPI

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -