Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > BOOK: Beginning Visual C++ 6
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning Visual C++ 6
This is the forum to discuss the Wrox book Beginning Visual C++ 6 by Ivor Horton; ISBN: 9780764543883
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual C++ 6 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
  #1 (permalink)  
Old September 24th, 2006, 04:14 PM
Registered User
Join Date: Nov 2005
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 17 - Displaying the dialog box

I am guessing I will figure this out before a response is posted here, but perhaps this will help someone else.

On page 713, when creating the OnPenwidth menu item handler to display the pen width dialog box, the text says:

There are just two statements in the handler at the moment. The first creates a dialog object which is automatically associated with our dialog resource.

Automatically? How does it know WHICH dialog resource I want to display? Aside from not being able to get the dialog to display I don't see how the code would KNOW what dialog to display in the first place!


  #2 (permalink)  
Old September 24th, 2006, 04:46 PM
Registered User
Join Date: Nov 2005
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts

Sure enough, that didn't take long to figure out!

In the OnPenwidth() handler when the CPenDialog data member is created in

CPenDialog aDlg;

it associates itself with the Dialog that was selected using the class wizard. I selected the wrong dialog originally. Deleting the CPenDialog class that I had made proved to be a bit confusing: I used the Solution Explorer (note I'm using Visual Studio 2003, not V6) to REMOVE the .h and .cpp files but then ended up having to manually delete several lines. I'm expecting more errors from this housekeeping to come up in the future- I need to learn how to properly remove classes from a project.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying modal dialog from server code gp_mk HTML Code Clinic 16 July 1st, 2007 07:55 AM
Chapter 17 First Try It Out paloyme BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 7 August 23rd, 2006 11:14 AM
Chapter 17 first Try It Out paloyme Visual Basic 2005 Basics 0 April 17th, 2006 04:34 AM
Chapter 17 Gaby BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 3 September 8th, 2005 11:50 AM
insert dialog box in a dialog box BurhanKhan Visual C++ 7 June 1st, 2004 07:53 PM

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