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: Beginning Visual C++ 6
Password Reminder
Register
| FAQ | Members List | Calendar | 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 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
 
 
Thread Tools Search this Thread Display Modes
  #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!

Dave


  #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
Default

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.


 


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
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



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


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