I have created an MFC application for drawing poligons,i have a window which is the main window for the program,i use this window to display the image of the poligons. ( i have created a class to handle the routines for the main window) But before to start drawing a polygon, i use 2 Dialog Boxes to get some information from the user.(the class for the dialog boxes are in a different file) I use the first dialog box the get the type of polygon that the user want to draw( regular polygon, star polygon, star figure) after that that i use a second dialog box to get the number of sides that the polygon should have and some other informations. Now,my problem is once i have finished to get the informations that i needed to draw the polygon,i dont know how to get back to main class so that i can draw the polygons on the main window.