| | | | Browse by category |
Article ID: 342
Last updated: 07 Jun, 2018
Problem
I want to print information around the grid (e.g. text above, below and to the left/right). Is it possible to specify where on the printed page Objective Grid will print?
Cause
Action
Sure, just override these two virtual functions:
void CGXGridCore::OnAdjustPrintRectangle(CDC* /*pDC*/, CPrintInfo* pInfo) { |
||
CGXGridParam* pParam = GetParam(); CGXProperties* pProp = pParam->GetProperties(); // subtract left, right, bottom and top Frame pProp->GetMargins(nTop, nLeft, nBottom, nRight); |
||
} |
Or simply set the margins by calling:
GetProperties()->SetMargins(nTop, nLeft, nBottom, nRight); |
The next member function is responsible for drawing the outside area:
void CGXGridCore::OnPrintHeaderAndFooter(CDC* pDC, CPrintInfo* pInfo) { |
|||
CGXGridParam* pParam = GetParam(); CGXProperties* pProp = pParam->GetProperties(); CDocument* pDoc = NULL; if (m_pGridWnd->IsKindOf(RUNTIME_CLASS(CView))) |
|||
pDoc = ((CView*) m_pGridWnd)->GetDocument(); | |||
pProp->OnPrintHeaderAndFooter(pDC, pInfo, pDoc, pParam); | |||
} |
So you could override this and add your own code instead of calling:
pProp->OnPrintHeaderAndFooter(); |
This article was:
Helpful |
Not helpful
Report an issue
Article ID: 342
Last updated: 07 Jun, 2018
Revision: 3
Views: 1946
Posted: 12 Jan, 2001 by
Meltreger B.
Updated: 07 Jun, 2018 by
Meltreger B.
Others in this category
Powered by KBPublisher (Knowledge base software)