📄 bitmapbox.h
字号:
//////////////////////////////////////////////////////////////////////
// FileFury
// Copyright (c) 2000 Tenebril Incorporated
// All rights reserved.
//
// This source code is governed by the Tenebril open source
// license (http://www.tenebril.com/developers/opensource/license.html)
//
// For more information on this and other open source applications,
// visit the Tenebril OpenSource page:
// http://www.tenebril.com/developers/opensource
//
//////////////////////////////////////////////////////////////////////
#ifndef CBITMAPBOX_DEFINE
#define CBITMAPBOX_DEFINE
class CBitmapBox : public CButton
{
public:
CBitmapBox();
~CBitmapBox();
BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID,
UINT BitmapID, CSize bmpSize);
void SetBitmap(UINT BitmapID);
void SetBitmap(char *BitmapName, bool IsResource = true, bool Tiling = false);
protected:
virtual void DrawItem(LPDRAWITEMSTRUCT DrawItemStruct);
private:
WORD m_wParseStyle;
CBitmap *BackBitmap;
bool InitBackDC, Tiling;
CDC BackDC;
CSize BitmapSize;
COLORREF BackColor;
bool ShowBitmap;
BOOL LoadBMPImage(LPCTSTR sBMPFile, CBitmap& bitmap, CPalette *pPal,
CSize *BmpSize);
DECLARE_MESSAGE_MAP()
};
class CBackBitmapBox : public CButton
{
public:
CBackBitmapBox();
~CBackBitmapBox();
BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID,
LPCTSTR BmpID, CSize bmpSize, COLORREF BackgroundColor);
BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID,
UINT BmpID, CSize bmpSize, COLORREF BackgroundColor);
protected:
virtual void DrawItem(LPDRAWITEMSTRUCT DrawItemStruct);
private:
WORD m_wParseStyle;
CBitmap BackBitmap;
bool InitBackDC;
CDC BackDC;
CSize BitmapSize;
COLORREF BackColor;
COLORREF OriginalImageBackground;
BOOL LoadBMPImage(LPCTSTR sBMPFile, CBitmap& bitmap, CPalette *pPal,
CSize *BmpSize);
DECLARE_MESSAGE_MAP()
};
class CFontPreviewBox : public CButton
{
public:
CFontPreviewBox();
~CFontPreviewBox();
BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
void SetFont(LOGFONT font);
protected:
virtual void DrawItem(LPDRAWITEMSTRUCT DrawItemStruct);
private:
WORD m_wParseStyle;
LOGFONT LogFont;
DECLARE_MESSAGE_MAP()
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -