dwgpreviewbutton.h

来自「DWG 文件 预览图片 格式及显示预览图片 格式及显示」· C头文件 代码 · 共 60 行

H
60
字号
#if !defined(AFX_DWGPREVIEWBUTTON_H__CFD4226F_0AA7_11D5_963F_F430B3333170__INCLUDED_)
#define AFX_DWGPREVIEWBUTTON_H__CFD4226F_0AA7_11D5_963F_F430B3333170__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DWGPreviewButton.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CDWGPreviewButton window

class CDWGPreviewButton : public CButton
{
// Construction
public:
	CDWGPreviewButton();

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDWGPreviewButton)
	public:
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
	//}}AFX_VIRTUAL

// Implementation
public:
	void DisplayPreviewFromDwg(CString szFileName);//主调函数
	virtual ~CDWGPreviewButton();

	// Generated message map functions
	//{{AFX_MSG(CDWGPreviewButton)

	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
private:
	void DrawButton();//自画按钮
	void FreeDCMem();	//释放资源
	void ReadDWGPreviewImageData(CDC *);//读取DWG预览图片数据
	CRect reButton;		//按钮的矩形大小
	CBitmap MyBmp;		//内存位图
	CString m_FileName;	//文件名
	CDC cdMem;			//内存设备描述表
	bool bDisplayFlag;	//显示标识
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DWGPREVIEWBUTTON_H__CFD4226F_0AA7_11D5_963F_F430B3333170__INCLUDED_)

⌨️ 快捷键说明

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