Page 1 of 1

printing problems

Posted: Wed Nov 26, 2003 6:16 pm
by 6922118
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

Posted: Thu Nov 27, 2003 10:26 am
by Pep
Hi Wayne,

could you please post a link so I can download an example with which I can reproduce the problem "as is" here. Or could you please send me it directly to [email protected] ?

Josep Lluis Jorge
http://support.steema.com