AnyBook4Less.com
Find the Best Price on the Web
Order from a Major Online Bookstore
Developed by Fintix
Home  |  Store List  |  FAQ  |  Contact Us  |  
 
Ultimate Book Price Comparison Engine
Save Your Time And Money

Beginning Mfc Programming

Please fill out form in order to compare prices
Title: Beginning Mfc Programming
by Ivor Horton
ISBN: 1-86100-085-5
Publisher: Wrox Press Inc
Pub. Date: August, 1997
Format: Paperback
Volumes: 1
List Price(USD): $34.95
Your Country
Currency
Delivery
Include Used Books
Are you a club member of: Barnes and Noble
Books A Million Chapters.Indigo.ca

Average Customer Rating: 4.18 (11 reviews)

Customer Reviews

Rating: 4
Summary: Good Beginning MFC book
Comment: I wouldn't rate it as high as Ivor's book on Java but it is very good. Good examples and easy reading. Although MFC will be going by the wayside in the next couple of years I would like to see Ivor do an intermediate/advanced MFC 6 or 7 book. I like his style that much. I can't think of any typos in the example code, if there were they were small and / or obvious. This book helped greatly in getting through a difficult 1st term MFC course. The only thing missing in this book (no books on this subject are to be found anywhere) is MFC and ODBC, DAO, ADO, OLE DB. Maybe everyone wants to do DB stuff the easy way... in VB. Well worth the $...I spent on it used.

Rating: 4
Summary: Consist of book Beginning Visual C++ 5/6 from chapter 12-etc
Comment: Consist of book Beginning Visual C++ 5/6 from chapter 12 and on.

This the seconf book that I have encountered that has such a comprehensive example on how to use basic windows programming C++ skills. However, from chapter 5 on, which beginning a multi chapter spanning Sketcher project, skills being used in it were not clarified enough. To help other readers who also read this excellent C++ book, I will try to supplement these skills that I have extracted from the coding based on what there are presented in the corresponding chapter related to use of pointers.

Beginning MFC Programming Ivor Horton

Skills: 1. Object calling another object's function through a pointer. (Ex. pDoc-function( ), m_pTempElement->Draw( ) function.) 2. Object can create another object based on a conditional ID_"event" nested inside the conditional move function. (Ex. switch(pDoc->GetElement( )) {...} 3. Get a pointer to a currently present object and use it to call the object's function. (Ex. CSketcherDoc* pDoc = GetDocument( ) // a function inherited from CView class.) 4. How one object can communicate or pass object or variable to another via a pointer. (Ex. m_pTempElement = CreateElement( ) // a function inside the CSketcherView object.)

Page 569

In CsketcherView Object

Call OnMouseMove( ) funtion { //Created m_pTempElement pointer to be pointed to selected CElement subclass object base on option selected from CSketcherDoc object's menu ID_event. CreateElement( ) is a function inside CsketcherView objectt hat return a new CElement sublcass pointer and create a new CElement sublcass object based on subclass in the class CElement being selected from CSketcherDoc event passed.

{ m_pTempElement = CreateElement( ); //This executes. Call CreateElement ( ) function in //CsketcherView object/class. m_pTempElement->Draw(&aDC); } }

CElement* CsketcherView::CreateElement( )

{ CSketcherDoc* pDoc = GetDocument(); // make call to GetDocument() Function which //return pointer pointing to the current CSketcherDoc //object. This executes. A function inherited from CView //class.

switch(pDoc->GetElementType( )) // Then, CSketcherDoc object's GetElementType() //function executes through the pDoc pointer. { case LINE: { //content of LINE block goes here. ;}

//The rest of the conditional code here execute based on the return value from GetElementType( ) //function ;}

In CSketcherDoc object, the GetElementType( ) funtion executes.

Class Csketcher: public Cdocument {

... // some content in page 572.

// Operations

WORD GetElementType( )//Then the GetElementType( ) Function executes, { return m_Element; }// thus return the value of m_Element being selected on the //menu bar.

Now get back to the CSketcherView object. The CreateElement( ) function receive the value inside the switch( ) function

CElement* CsketcherView::CreateElement( )

{ CSketcherDoc* pDoc = Getdocument(); // make call to GetDocument() Function which return //pointer pointing to the current CSketcherDoc object. switch(pDoc->GetElementType( )) // The switch ( ) function then executes based on return //from CSketcherDoc object's GetElementType( ) function //from the pDoc pointer. Now executes... { //The rest of the conditional code here execute based on the return value from GetElementType( ) //function

case LINE: //***This case executes if returned m_Element is LINE. { return new CLine (m_FirstPoint, m_SecondPoint, pDoc->GetElementColor( )); // This executes. The code returns and creates a new CLine object. To be //passed back to the to CSketcherView object's OnMouseMove( ) function //based on the ID_mouse_move event. }

case OTHERS: {... ;} ;}

Now, return to the CSketcherView object. Execute the OnMouseMove( ) function.

CsketcherView::OnMouseMove( ) //Just received the newly created CLine object { Created m_pTempElement pointer to be pointed to object CElement selected from CSketcherDoc object, CreateElement( ) is a function inside CsketcherView. CreateElement( ) is a function to return a pointer and create a new object based on subclass in the class CElement being selected from CSketcherDoc event passed.

{ codes before...

m_pTempElement = CreateElement( ); //This has executed. CreateElement ( ) function //created the Cline object based on the new CLine object //pointer returned.

m_pTempElement->Draw(&aDC); //Now call the new CLine object's Draw( ) function.

delete m_pTempElement; //Delete the used CLine object through the CLine object pointer.

m_pTempElement = 0; //Reset the pointer to address 0. } }

Rating: 4
Summary: Good for getting your feet wet in MFC
Comment: It does give a good introduction to MFC. Plus as another review said, it shows how to make a *real* application. with functionality even.. not just code snippets. and you can keep on adding to it. so it's pretty cool. the stuff on database... I dunno.. database isn't my bag. and it's not a good way to learn database programming at all. but other than that it's pretty good.

I recommend getting a book on programming windows that uses *only* the win32 api. such as the charles petzold classic...

Similar Books:

Title: Beginning Mfc Com Programming
by Julian Templeman
ISBN: 1874416877
Publisher: Wrox Press Inc
Pub. Date: August, 1997
List Price(USD): $39.95
Title: Beginning Atl Com Programming
by George Reilly
ISBN: 1861000111
Publisher: Wrox Press Inc
Pub. Date: 01 September, 1997
List Price(USD): $39.95
Title: Professional MFC With Visual C++ 6
by Mike Blaszczak
ISBN: 1861000154
Publisher: Wrox Press Inc
Pub. Date: December, 1999
List Price(USD): $64.99
Title: Ivor Horton's Beginning C++ : The Complete Language ANSI/ISO Compliant (Wrox Beginning Series)
by Ivor Horton
ISBN: 186100012X
Publisher: APress
Pub. Date: 08 December, 1997
List Price(USD): $39.99
Title:Beginning Visual C++ Components
by Matt Telles
ASIN: B00007KSJ9
Publisher: Wrox
Pub. Date: 21 November, 2002
List Price(USD): $33.59
Comparison N/A, buy it from Amazon for $33.59

Thank you for visiting www.AnyBook4Less.com and enjoy your savings!

Copyright� 2001-2021 Send your comments

Powered by Apache