- printerframework_src.zip
- Devp
- Bin
- Printer.dll
- Test.exe
- Include
- Lib
- Sources
- Printer
- Doc
- AccentCesure.sty
- html
- Image
- ArchitectureMFC.png
- MFC.png
- PreviewRefactor.png
- PrinterPath.png
- PrintMfc.png
- PrintRefactor.png
- UMLPrinter.png
- IntroPrinter.doc
- Licence
- MAKEDOC.BAT
- MAKEPDF.BAT
- MAKEPS.BAT
- manual.pdf
- printer.dox
- printer.log
- printer.tag
- Readme.txt
- Sources
- Test
|
// TextData.cpp: implementation of the CTextData class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "TextData.h"
#include "DataPrint.h"
namespace printer {
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CTextData::CTextData(LPCTSTR lpszLib, LPCTSTR lpszVal)
: m_itemLib(lpszLib), m_itemVal(lpszVal)
{
}
CTextData::~CTextData()
{
}
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
int
CTextData::GetNbLignes()
{
return max( m_itemLib.GetNbLignes(), m_itemVal.GetNbLignes() );
}
void
CTextData::Initialize(CDC* pDC, SDataPrint* pData)
{
pDC -> SelectObject (&pData->fontNormal);
m_itemLib.Initialize(pDC, pData->cxLIBELLE);
pDC -> SelectObject (&pData->fontBold);
m_itemVal.Initialize(pDC, pData->cxVALUE);
}
void
CTextData::Output(int nSubElt, int nLine, CDC* pDC, SDataPrint* pData)
{
pDC -> SelectObject (&pData->fontNormal);
// Afficher le libelle
if (nSubElt<m_itemLib.GetNbLignes()) {
// pDC->SetTextJustification(0,4);
SDataPrint::LineOutput(pDC, pData->nLibelle, nLine, m_itemLib.GetSubLigne(nSubElt));
}
// Initialiser le contexte
pDC -> SelectObject ( &pData->fontBold );
// Afficher la valeur
if (nSubElt<m_itemVal.GetNbLignes()) {
SDataPrint::LineOutput(pDC, pData->nValue, nLine,m_itemVal.GetSubLigne(nSubElt));
}
// Restaurer le contexte
pDC -> SelectObject (&pData->fontNormal );
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.