hOW TO ACCESS A CLASS EXTERNAL TO A dIALOG FRON INSIDE THE dIALOG
I raiase this question here as it pertains to code from the book. If this is the wrong forum please direct me to a more apporiate one.
I am tryinbg to rewrite an existing program into a thread based form. In this process I wanted to look at communicating with threads. I found the Logger class interesting and decided to convert it for use with a GUI based program.
I used Visual Studio 2015 community to greate a C++ MFC Dialoge based skeliton program. I added 3 button a and tyhree edit controls to the Dialog.
I copied the Logger.h and Logger.ccp files into the project and added the header files to the main ccp file. I instanciated the class outside the Dialog DoModal function and it works fine.
My problem is that I cannot figure out how to reach the logger.log("Message") function from the dialog with out the resort to a global variable. Since globals are said tobe a source of bugs could you poing out the method I need to access the member function of the class instanciated outside the Dialopg box?