EasyPrinterV2.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /************************************************************************/
  2. /* Copyright (C), 2016-2020, [Jeff], 保留所有权利;
  3. /* 模 块 名:;
  4. /* 描 述:;
  5. /*
  6. /* 版 本:[V];
  7. /* 作 者:[Jeff];
  8. /* 日 期:[3/17/2017];
  9. /*
  10. /*
  11. /* 注 意:;
  12. /*
  13. /* 修改记录:[Jeff];
  14. /* 修改日期:;
  15. /* 修改版本:;
  16. /* 修改内容:;
  17. /************************************************************************/
  18. #pragma once
  19. #include "EasyPrinter.h"
  20. class CEasyPrinterV2:public CEasyPrinter
  21. {
  22. public:
  23. CEasyPrinterV2();
  24. ~CEasyPrinterV2();
  25. void Set72DPITextFont(IN INT nTextFontSize, IN BOOL bBold, IN BOOL bItalic, IN TString strTextFontName);
  26. SIZE GetFontSize();
  27. void TextDownwards(IN TString strText, IN const INT& nRectWide, OUT vector<TString>& vtSubText);
  28. INT DrawRectange(IN CRect rc, IN INT nLineWide, IN INT leftLineType, IN INT topLineType, IN INT rightLineType, IN INT bottomLineType);
  29. void DrawText(IN TString strText, IN CRect rcText, IN INT nTextWide, IN INT nAlignType = 0);
  30. void CalcPrinterCell(IN STPrintCell &PrintCell);
  31. void CellTBTypesetting();// TB=Top & Bottom;
  32. void CellBBTypesetting();// BB=Bottom & Bottom;
  33. INT DrawCell(IN STPrintCell& PrtCell);
  34. void AutoChangePage();
  35. void PrintChangePage();
  36. CDC &GetPrinterDC() { return m_dcPrinter; }
  37. public:
  38. BOOL PrintByJson();
  39. };