Link to home
Start Free TrialLog in
Avatar of nitinkale
nitinkale

asked on

Exporting class from a DLL

I have a CGraph class, which is use in a MDI application  to draw line graph on given device context. I use this class by keeping its object in a Document class and taking its pointer in View class and calling CGraph class's functions.
Now I want to make DLL of this CGraph class say CGraphDll, which I will be using to draw graphs. So can I export the CGraph class which is in CGraphDll and get its object in document class, so that can get new object of it whenever i create new document? Or I have to make a new class in the CGraphDll which should handle the multiple instances of the CGraph class?
If my explaination is not clear please ask. I am not able to start with how do I go about this as I am doing DLL part for the first time.

Thanks in advance,
Nitin
ASKER CERTIFIED SOLUTION
Avatar of twalgrave
twalgrave

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Recommendation: Delete

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
DominicCronin
EE Cleanup Volunteer
Avatar of twalgrave
twalgrave

I disagree.  This is the technique one would use.  A VB example was provided and is easy enough to modify into whatever language you desire.
I won't argue - that was a bit of a judgement call anyway - the guy seemed to be using MFC, but advice expressed in VB for a self-confessed first timer is probably also useful.
Thanks PashaMod and thanks to DominicCronin also for the cleanup work!