Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > BOOK: Professional C++, 3rd Edition
BOOK: Professional C++, 3rd Edition
This is the forum to discuss the Wrox book Professional C++, 3rd Edition by Marc Gregoire,; ISBN: 978-1-118-85805-9
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional C++, 3rd Edition section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 28th, 2016, 07:58 PM
Registered User
Join Date: Jan 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

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?

Nill Lea

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 2 Dialog Super Class Override Lance47 BOOK: Beginning Android Application Development 0 October 30th, 2012 07:58 PM
replace Word dialog with my designing dialog doublelucky Visual C++ 0 March 19th, 2007 02:27 AM
Scale Dialog Class; Pages 838/9; Ch16 Nick Y BOOK: Ivor Horton's Beginning Visual C++ 2005 0 July 25th, 2006 05:02 AM
Capturing toolbar events inside a dialog class pazzuzu Visual C++ 0 October 13th, 2004 01:35 AM
Dialog Class pic_az Java GUI 4 June 5th, 2003 03:34 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.