Hi,
Im having problems intermitent problems with CTChart::Draw, in Tchart 5.0.6.0 VC++ 6. Heres the code im using
chart->Draw(long(pDC->m_hDC),chartRect.TopLeft().x,chartRect.TopLeft().y,
chartRect.BottomRight().x,chartRect.BottomRight().y);
The problem is caused by the cast long(pDC->m_hDC), which Im forced to do because the interface has to take a long. Now, pDC->m_hDC is a pointer to a HDC struct, so its an address and is unsigned. Casting to a long, can result in a -ve integer if the address's integer value is really an unsigned int (32 bit is 1). In this situation an exception is fired, presumably by TChart and problably because it thinks the DC handle is invalid.
What can I do about this. At the moment I have to create multiple DC handles in a loop until i get a handle that has 0 as the most significant bit (32 bit for a 32 bit int) and is suitable for steema.
Thanks
-Andrzej
problems with chart->Draw
Hi Andrzej,
I’m having difficulty reproducing this. Could you send us an example (you can post it in the steema.public.attachments newsgroup) that reproduces the problem or let me know how to recreate the problem with the Printing example shipped with TeeChart. In my tests I don’t seem to be able to generate handles that cause the method to fail.
With thanks.
I’m having difficulty reproducing this. Could you send us an example (you can post it in the steema.public.attachments newsgroup) that reproduces the problem or let me know how to recreate the problem with the Printing example shipped with TeeChart. In my tests I don’t seem to be able to generate handles that cause the method to fail.
With thanks.
Pep Jorge
http://support.steema.com
http://support.steema.com