#pragma once #include #pragma pack(1) struct PrintPartition { int bPartitin; int kind; //0 不分幅 1 全部分幅 2 横向分幅 3 纵向分幅 int row; //索引从1开始 int col; //索引从1开始 int supperPosition; //-------------- //这是打印及打印预览所使用的辅助信息 int bPreview; //0 打印预览 1 打印 int currentPage; //索引从1开始 int countOfPage; //总页数 }; #pragma pack() class CSigmaDoc; class CPrintTool { public: CPrintTool(CSigmaDoc * pDoc); void ViewAll(CDC* pDC); bool GetPartitionNum(int &rowOut, int & colOut, int superpositionWidth); bool Part(PrintPartition * partition); private: CRect GetPrintArea(CDC* pDC); private: CSigmaDoc * m_pDoc; };