MFC Tutorials

  CFileDialog MFC class can be used to invoke the Windows Open File and File Save As dialogs. This CFileDialog class encapsulates the functionalities required for retrieving file names, setting up filters, flagging over write prompts etc., This CFileDialog can be used in interactive MFC GUI applications wherever we need to browse the Windows File [...]

CFont class encapsulates the functionalities needed to manipulate the Fonts in Windows programming. A font can be created in 4 ways with a CFont class using CreateFont, CreateFontIndirect, CreatePointFont, or CreatePointFontIndirect functions. This CFont Samples page tries to give a piece of sample code for all of the above functions. CFont Sample for using CFont [...]

List Control is one of the useful controls to display data in different formats viz., icon view, report view, simple list etc., This article describes how to use CListCtrl for creating report views. Before using any control resources in MFC, they must be associated with a class. Use the Member Variable tab of the Class [...]

Combo box controls are space savers. Wherever there is no need for a multi-select from a list of items, combo box is a good choice in such places. This article ” CComboBox Example” explains how to use the MFC CComboBox class for manipulation of a list of strings. CComboBox Example – Initializing a Combo Box: [...]

Toolbars are components of windows operating system with functionalities to invoke dialogs or other screens. They are usually used as a quick links in the place of menus. This article explains how to use a toolbar in an MFC Window based application. MFC Tutorial – Adding a Toolbar: Step 1: Create a MFC Window application [...]

MFC Tree controls are one of the useful controls to show a hierarchical view of items. They can show the folders list, any parent – child relationship items etc., CTreeCtrl is the class which handles all the MFC Tree Control related operations. It has all the necessary methods to Add MFC Tree control items, Retrieve [...]

List boxes are used to load a list of items. Users will be able to add, select and delete items with the list boxes. CListBox Examples: The MFC class CListBox is the one which encapsulates all the functionalities and members of the List Box control. It can handle almost all the common requirements that a [...]

Check boxes are used to check binary states. Yes or No answers, Male/Female kind of conditional user interface inputs are easier with a check box. This part of Codersource MFC Tutorial explains how to use a Check box in dialog box applications of MFC. Check box: There are quite a few techniques to be learnt [...]

The next step after learning Dialog box creation in MFC, are the controls. This article deals with the Command Button control. We’ll look at how to use the CButton class in case of the command button controls. This article assumes the user has familiarity with the basic Windows controls. This MFC Tutorial only concentrates on [...]

1 2 3