new class ...
-
Hi .. i have a problem with vc++ ... i have made a mfc wizard mdi aplication and i've added a new class Info .. now i want to delcare a global instance of this class but i don't know were to put it exactly ... i put it in the app but error ... i have made a bew file adn included it in the project but error of memory or something like that .. please help me ... and excuse my bad english :)
-
Hi .. i have a problem with vc++ ... i have made a mfc wizard mdi aplication and i've added a new class Info .. now i want to delcare a global instance of this class but i don't know were to put it exactly ... i put it in the app but error ... i have made a bew file adn included it in the project but error of memory or something like that .. please help me ... and excuse my bad english :)
You can add a member object of the class to your
CWinApp
derived class. Now you can useAfxGetApp()
to get a pointer to yourCWinApp
derived object. Cast this to your actual derived class and use the member object directly. This way you can avoid using a global. Regards, Nish
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]