I'm trying to draw a line on a form through a function which is in a class that I created inside another .h and .cpp file. But I cannot give it access to the main form or it's controls. Is there any way that I can pass the form into the functions of the class or a way that I can access the main form or maybe just a picturebox on the form in which I can draw too. And if so, how can I declare a temporary form / picturebox inside the class which I can then assign to the form / picturebox of the main form to?

PJ