printing problems
Posted: Wed Nov 26, 2003 6:16 pm
Hi,
I am trying to print charts I created from TeeChart C++ ActiveX object within my application. I ran into some odd printouts. For example with one instance where I have 12 pages of charts (9 charts per page). I print them out. Page 1-7 is fine. Page 8-11 prints only the upper left corner of each chart with huge display. Page 12 is normal.
This happens all the time when I print multiple pages. Is this a bug in the object? What can I do to fix this problem? Below is my code within OnPrint().
k = 0;
for (i=0; i<iDivider; i++)
{ // row
for (j=0; j<iDivider; j++)
// column
// go through each one and line them up accordingly
iIndex = ((pInfo->m_nCurPage-1)*iChartsPerPage)+k;
if(iIndex < m_iNumOfMultiStockCharts)
{
m_tMultiStockChart[iIndex]->GetPrinter().PrintPartialHandle(COleVariant(LONG(pDC->m_hDC)),
j * (lWidth / iDivider),
i * (lHeight / iDivider),
(j + 1) * (lWidth / iDivider),
(i + 1) * (lHeight / iDivider));
}
k++;
-Wayne
I am trying to print charts I created from TeeChart C++ ActiveX object within my application. I ran into some odd printouts. For example with one instance where I have 12 pages of charts (9 charts per page). I print them out. Page 1-7 is fine. Page 8-11 prints only the upper left corner of each chart with huge display. Page 12 is normal.
This happens all the time when I print multiple pages. Is this a bug in the object? What can I do to fix this problem? Below is my code within OnPrint().
k = 0;
for (i=0; i<iDivider; i++)
{ // row
for (j=0; j<iDivider; j++)
// column
// go through each one and line them up accordingly
iIndex = ((pInfo->m_nCurPage-1)*iChartsPerPage)+k;
if(iIndex < m_iNumOfMultiStockCharts)
{
m_tMultiStockChart[iIndex]->GetPrinter().PrintPartialHandle(COleVariant(LONG(pDC->m_hDC)),
j * (lWidth / iDivider),
i * (lHeight / iDivider),
(j + 1) * (lWidth / iDivider),
(i + 1) * (lHeight / iDivider));
}
k++;
-Wayne