Visual C++ 6 in 21 days

I'm working through this book and am stuck on chapter 12, Listing 12.7.
I am supposed to create a pointer
CToolbarDoc* pDoc
but there is no such thing as a class named CToolbarDoc.
I looked all over and cannot find any information on this class.
Has anyone ran into this problem?

Really stuck here and appreciate any help,
Thanks.
Looks like it might be MFC, but MSDN isn't showing anything so I doubt it's an existing class.

My guess is it's a class given to you in the book in a previous chapter or something.
That is such a misleading name, "Visual C++ 6 in 21 days".

First, although I won't claim for a moment to be an expert at WinAPI programming, I don't recall there being such a class as CToolbarDoc. Maybe it was defined in a source file on a CD included with the book?

Second, I would suggest getting a newer book that'll be more up to date on what C++ offers. Visual C++ 6 was released in 1998, and since then there have been at least two updates to the C++ standard... (C++03, and more recently C++11)

-Albatross
Last edited on
Disch,
I am doing the book from chapter 1 and there was no classes created with that name. I checked all the classes associated with the CToolBar and nothing. Possibly it came on a CD but I don't see any CD slip where a disk might have been. I'll have to check the publishers website and see if there is anything there.
Albatross
I have this old book and the compiler is one they gave me from work. It seems everytime I get the programming going life gets in the way and it gets dropped. If I can get through this book then I'll fire up the .net compiler and you guys may be hearing a lot more from me.

This is the second time this book has seriously messed me up but it's not going to win.

Thanks for the feedback.
I don't know if this helps, but I found this: (seems to be about some code started in chapter 10)
""
NOTE: Although the sample application you are working with today is an extension to the application you built on Day 10, all file and class names have been changed from Day10 to Toolbar. If you are making the changes in the Day 10 project, then when the following text specifies that you make changes to the CToolbarDoc class, you should make the changes to the CDay10Doc class. Likewise, when you are asked to edit the Toolbar.rc file, you can edit the Day10.rc file.
""
ixuta,
I downloaded a soft copy of the book and searched it finding the paragraph you found.
I changed the function names and it almost worked.
I had to remove m_wndColorBar from the following function and I got it to work.
void CMainFrame::UpdateWidthCB(int nIndex)
{
//Set the new selection in the combo box called from CDay10Doc
m_wndColorBar.m_ctlWidth.SetCurSel(nIndex);
}

Thanks for your input.

Topic archived. No new replies allowed.