xbitmap.h

来自「制作漂亮界面的方便有用的类」· C头文件 代码 · 共 42 行

H
42
字号
// CXBitmap.h: interface for the CXBitmap class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_XBITMAP_H__08BA6EB3_DB4C_11D1_8A82_0040052E2D91__INCLUDED_)
#define AFX_XBITMAP_H__08BA6EB3_DB4C_11D1_8A82_0040052E2D91__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

class CXBitmap : public CBitmap  
{
public:
	CXBitmap();
	virtual ~CXBitmap();

	// Get the height of the bitmap
	int Height();

	// Get the width of the bitmap
	int Width();

	// Draw the bitmap
	void Draw(CDC* pDC, int x, int y);

	// Draw the bitmap in a rectangle
	void DrawStretch(CDC* pDC, int x, int y, int w, int h);

	// Draw the bitmap with a transparent color (Paul Reynolds method fast)
	void DrawTransparent(CDC* pDC, int x, int y, COLORREF crColor);

	// Draw the bitmap with a transparent color (Jeff Prosise method 2x slower)
	void DrawTransparent2(CDC* pDC, int x, int y, COLORREF crColor);	
	
private:
	COLORREF	m_crBlack;
	COLORREF	m_crWhite;
};

#endif // !defined(AFX_XBITMAP_H__08BA6EB3_DB4C_11D1_8A82_0040052E2D91__INCLUDED_)

⌨️ 快捷键说明

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