MFC Tutorials


January 30, 2010 // 0 Comments

Tab control managed using CTabCtrl MFC class is a good replacement candidate for Property Sheets. But these Tab Controls are less used and discussed still less. This article explains how to use the CTabCtrl class for manipulating a Tab Control and hold 2 different dialog boxes. The sample given here can be extended to add [...]

Introduction to MFC Printing: It’s common knowledge that printing is one of the hardest things for properly implementing in your Win32 program. You have probably heard or even experienced how hard printing is with Win32 API. The good news is that we are using MFC which greatly simplifies this task. You get print preview, standartized [...]

This project illustrates an owner-draw combo box which can show different fonts using CFont. The class uses an abstract object to draw the items. In this case a class derived from the abstract object is created to make the control list of fonts using CFont. The abstract class contains methods that are called from the [...]

MFC regular Dll usage has decreased now a days to a large extent. People are now moving towards COM dlls. Though the COM Dlls’ have a lot of advantages over regular Dlls’ in MFC, the regular dlls are still being used by many developers. MFC DLL wizard provides options to create 3 kinds of DLLs. [...]

A Progress control is something that an application can use to indicate the progress of an ongoing operation. It consists of a rectangle that is gradually filled, from left to right, with the system highlight color as an operation progresses. This control is can be manipulated by using the class CProgressCtrl. This article is a [...]


January 30, 2010 // 0 Comments

The CEdit class provides the functionality of an edit control in Microsoft Windows based systems. It is a rectangular child window which can be used to enter text in GUI Programs. This article explains how to use the CEdit class for some of the important operations to be performed in a dialog based program. This [...]

MessageBoxes are simple and effective way of showing errors on input/processing or outputs. They can be used intuitively to communicate the messages in a very clear cut fashion. They can be used to provide 3 kinds of messages. The message can be either an Information, Question or a Warning. Messagebox es’ can be useful in [...]

CToolTipCtrl can be used to attach tool tips for controls. The tool tips can be placed on any controls using AddTool(), a member function of CToolTipCtrl. This article explains how to show Tool Tips for a command button which is placed on a dialog box. Tool tips are shown in a round rectangle adjacent to [...]


January 30, 2010 // 0 Comments

CString is a boon to all C++ converts of MFC. Good God! it is so much of a pain to use char* in c++. A small mistake could lead to big mishaps, to any programmer’s nightmare. CString in MFC gives lot many features to handle strings, weaning away all such bad memories of char *. [...]


January 30, 2010 // 0 Comments

CArray is a collection template which can store all data types. Unlike a normal C++ Array this MFC Collection template can grow and shrink depending on the needs. This allows memory to be utilized efficiently in MFC programs. This template is declared in afxtempl.h. This class can be used wherever there is a need to [...]

1 2 3