REVIEW - Getting Started with Microsoft Visual C++ 6 : an Introduction to MFC.


Getting Started with Microsoft Visual C++ 6 : an Introduction to MFC.


Harvey M. Deitel




Prentice Hall (2000)




Christopher Hill


February 2002



On a first glance this is a very attractive book. The typeface is clean and easy to read with a clear use of colour. Physically the book is manageable being 163 pages long, with a prose style that is dense but is easy to read.

The book's full title sets very high expectations 'Getting Started with Microsoft Visual C++ 6 with an Introduction to MFC companion to C++ How to Program' (which is a chapter in its own right).

A feature is made of not using the Visual Studio wizards, so that the reader may gain a 'solid understanding of MFC fundamentals'. Fundamental is the keyword here. The IDE is reduced to an editor/compiler/debugger. Thus the class browsers, tools, various wizards, component library, dialogue designer and other productivity features that Microsoft include with the IDE do not get a mention. So that minimises the Visual Studio part of the title.

The reader is faced with a very strange flavour of C++, with each C++ feature used being cited in the companion book, which gets a little tedious after the first few times. C examples have been coerced into a C++ book. I was very surprised to see

class CLoginDialog: public CDialog {
char m_szUserId[17];
afx_msg void CLoginDialog::OnLogin() {
CEdit *pUserid;
pUserid =(CEdit)GetDlgItem (IDC_USERID);
pUserid-GetWindowText (m_szUserId, 16);

While I accept that the focus of the book in the Visual Studio and MFC, I do feel that the author ought to be setting a good example through the use of sound sample code; using string classes;

keyword; error checking; correct casting; handling of 'magic' numbers. So the book is unhelpful in the C++ part of the title.

The book introduces the low-level Win32 calls (

GetDlgItem,  Get/SetWindowText
), leaving the impression that this is all MFC provides. Three of five chapters describe how to use controls on dialogue boxes without a sniff of
. A fourth chapter deals with 'MFC Graphics' without a mention of Document/View or
. The only MFC described are the simple wrappers around SDK calls. This book misses the mark. Not Recommended.

Book cover image courtesy of Open Library.