Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > BOOK: Professional C++, 3rd Edition
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 28th, 2016, 07:58 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2016
Location: Tulsa Oklahoma
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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?


Thanks
Nill Lea
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 10:43 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.