You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.7 KiB
C++
66 lines
1.7 KiB
C++
//////////////////////////////////////////////////////////////////////////////
|
|
//文件: CItem类扩展
|
|
//主要功能:
|
|
// 操作各类元素或完成一定的功能
|
|
//
|
|
//程序编写: 2006-12-07
|
|
//
|
|
//
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#pragma once
|
|
#include "itemBase.h"
|
|
#include "atltypes.h"
|
|
|
|
namespace NDrawView
|
|
{
|
|
|
|
class CItemPrint : public CItemBase
|
|
{
|
|
public:
|
|
CItemPrint(CSigmaDoc * ppDoc);
|
|
virtual ~CItemPrint(void);
|
|
|
|
void OnDraw(CXyDC* pDC) override;
|
|
|
|
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
|
|
|
|
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
|
|
virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
|
|
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
|
|
virtual void AfterEndPrinting(CDC* pDC, CPrintInfo* pInfo);
|
|
|
|
virtual void OnFilePrintPreviewUIUpdate(CCmdUI* pCmdUI);
|
|
virtual void OnFilePrintPreview(void);
|
|
virtual void OnEndPrintPreview(CDC* pDC, CPrintInfo* pInfo, POINT point, CPreviewView* pView);
|
|
virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo);
|
|
|
|
void OnDrawSetDC(CXyDC* pDC); //设置分页打印时的浏览范围
|
|
CRect GetViewRect(CRect oldViewRect);
|
|
BOOL GetRulerBarState(void);
|
|
void SetRulerBarState(BOOL bView);
|
|
|
|
void ClearPreviewDC(void);
|
|
|
|
void EnablePrinting(BOOL bEnable);
|
|
|
|
public:
|
|
CRect GetPrintArea(CDC* pDC);
|
|
CSize GetPartitionNum(CDC* pDC);
|
|
void MarginRect(CRect& rt);
|
|
void PrintPageNumber(CDC *pDC);
|
|
void DrawPageFrame(CDC* pDC, CRect rect);
|
|
CRect GetMarginRect(double sc=1.0);
|
|
CSize GetSuperpositionWidth(void);
|
|
void SetSectionSize(long cx,long cy);
|
|
|
|
protected:
|
|
CSize m_szPageNum; //横纵最大页数(cx=列数,cy=行数)
|
|
BOOL m_bChildRulerBar = FALSE;
|
|
CXyDC* m_pPreviewDC;
|
|
BOOL m_bPrinting;
|
|
BOOL m_bRestorePreviewDC;
|
|
};
|
|
|
|
};
|