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

📄 scemfinspectdlg.h

📁 Source code for EMFexplorer 1.0
💻 H
字号:
/*
*	This file is part of the EMFexplorer projet.
*	Copyright (C) 2004 Smith Charles.
*
*	This library is free software; you can redistribute it and/or
*	modify it under the terms of the GNU Lesser General Public
*	License as published by the Free Software Foundation; either
*	version 2.1 of the License, or (at your option) any later version.
*
*   This library is distributed in the hope that it will be useful,
*   but WITHOUT ANY WARRANTY; without even the implied warranty of
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
*   Lesser General Public License for more details.
*
*   You should have received a copy of the GNU Lesser General Public
*   License along with this library; if not, write to the Free Software
*   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
*
*	Extension: for commercial use, apply the Equity Public License, which
*	adds to the normal terms of the GLPL a condition of donation to the author.
*   If you are interested in support for this source code,
*   contact Smith Charles <smith.charles@free.fr> for more information.
*/
#ifndef _SCEMFINSPECTDLG_H_
#define _SCEMFINSPECTDLG_H_

#include "SCGenInclude.h"
#include SC_INC_EMFLIB(SCEMF2Text.h)
#include SC_INC_WINLIB(SCWinGUI.h)
#include SC_INC_WINLIB(SCRichEdit.h)
#include "resource.h"
/////////////////////////////////////////////////////////////////////////////
// CSCEMFInspectDlg dialog

class CSCEMFInspectDlg : public CDialog,
					  public I_SCBrkCallBack
{
// Construction
public:
	CSCEMFInspectDlg(CWnd* pParent = NULL);   // standard constructor
	BOOL SCInitDialog();
	virtual ~CSCEMFInspectDlg();

// Dialog Data
	//{{AFX_DATA(CSCEMFInspectDlg)
	enum { IDD = IDD_SCEMFINSPECT_DIALOG };
	CProgressCtrl	m_Progress;
	CString	m_EdBrkCount;
	CString	m_strDPI;
	CString	m_strSize;
	//}}AFX_DATA

//I_BrkCallBack
	virtual long OnSCBrkPos(long lCurPos);
	virtual long OnSCBrkMaxPos(long lMaxPos);
	virtual long OnSCBrkRecStr(long lCurPos, TCHAR *szRecStr);
	
// Operation
	void SCSetEMF(HENHMETAFILE hEmf)
	{
		m_hEmf = hEmf;
		if (IsWindow(m_hWnd))
			SCBeginCracking();
	}
	BOOL SCIsCracking() { return m_bCracking; }
	void SCStopCracking() { OnBtnStopbrk(); }
	void SCBeginCracking();
	BOOL SCSaveDocument(LPCTSTR lpszPathname, BOOL bRTF=FALSE);
	void SCCopy(BOOL bCopyAll=FALSE);
	void SCSelectAll();
	void SCPrint(CDC* pDC, CPrintInfo* pInfo);
	UINT SCCountPages(CDC* pDC, CPrintInfo* pInfo);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSCEMFInspectDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	void SCRelocateControls();
	void SCUpdateAllControls();
	void SCUpdateControl(UINT uCtl);
	void SCShowControl(UINT uCtl, int nShow);
	void SCCheckBtnControl(UINT uCtl, BOOL bCheck);

	// Generated message map functions
	//{{AFX_MSG(CSCEMFInspectDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnClose();
	virtual void OnCancel();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnBtnStopbrk();
	afx_msg void OnDestroy();
	afx_msg void OnBtnSaveRTF();
	afx_msg void OnBtnCopyAll();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
	SC_DECLARE_ENABLE_CONTROL()

	void SCMarkText(CString sText, COLORREF color);
	void SCCheckTextContent(); 
	void SCEnableGUI(BOOL bStop=TRUE);

protected:
	//data
	CSCRichEdit	m_EdEMFContent;
	CFont		m_Edfont;
	BOOL		m_bStopBrk;
	int			m_nMaxBrkPos;
	BOOL		m_bCracking;
	BOOL		m_bDestroyed;
	HENHMETAFILE m_hEmf;
};

#endif //_SCEMFINSPECTDLG_H_
//  ------------------------------------------------------------

⌨️ 快捷键说明

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