Click to See Complete Forum and Search --> : calling OCX drawing code


Sukumar
03-13-2000, 07:46 AM
Hi,
I have an ActiveX control built using VC++ - MFC ActiveX control wizard.
It's basic functionality is to draw an array of x,y points as line graph
showing the trend. Now, I am using the same control in a VC++ exe built using
MFC Appwizard. Now, when the user wants to print the graph, is there any
way to call the same drawing code of the ocx, so that i need not write the
same code again in the exe which is using the ocx?
Can anybody suggest me some solution for this?
Thank you,
Sukumar

Senthu
03-16-2000, 01:42 AM
Hi,

You can move the drawing code to a function, and call the function inside
the paint code.
then in the EXE you can call the drawing function again.
To do this you may need to deal with function arguments.
Good luck
P Senthu


"Sukumar" <ksuku@mailcity.com> wrote:
>
>Hi,
>I have an ActiveX control built using VC++ - MFC ActiveX control wizard.
>It's basic functionality is to draw an array of x,y points as line graph
>showing the trend. Now, I am using the same control in a VC++ exe built
using
>MFC Appwizard. Now, when the user wants to print the graph, is there any
>way to call the same drawing code of the ocx, so that i need not write the
>same code again in the exe which is using the ocx?
>Can anybody suggest me some solution for this?
>Thank you,
>Sukumar