home Tech Library Tech Forum
Publisher
 
Custom Controls in MFC       
 
The Common Custom Controls in MFC
 
 

 

The new common custom controls were introduced from MFC 4.0 onwards. The code for these new controls is implemented in the Windows COMCTL32.DLL file. When your program initializes a dialog, it uses a symbolic class name in the dialog resource to connect to the window procedure in the DLL.
 
Control MFC Class WNDCLASS
Progress CProgressCtrl “msctls_progress32”
Slider CSliderCtrl “msctls_trackbar32”
Spin Button CSpinButtonCtrl “msctls_updown32”
Image list CImageList  
List view CListCtrl “SysListView32”
Tree view CTreeCtrl “SysTreeView32”
Tab CTabCtrl “SysTabControl32”
Status bar CStatusBarCtrl “msctls_statusbar32”
Toolbar CToolBarCtrl “ToolbarWindow32”
Tooltip CToolTipCtrl “tooltips_class32”
Rich edit CRichEditCtrl “RICHEDIT”
Animation CAnimateCtrl “SysAnimate32”
Header CHeaderCtrl “SysHeader32”
Hotkey CHotKeyCtrl “msctls_hotkey32”

A progress control bar is a window that an application uses to indicate the progress of a lengthy operation. It consists of a rectangle that is gradually filled from left to right with the system highlight color as an operation is in progresses.

A slider control, also known as a trackbar, contains a slider that the user moves with either the mouse or the direction keys. The control sends notification messages indicating the change. Slider controls can be used to select a discrete value or a set of consecutive values in a range.

A spin button control is a pair of arrow buttons that the user can click to increment or decrement a value; it is also referred to as an “up-down” control. The current position value can be displayed in a companion window. A spin button control is most often used with a companion control, called a buddy window.

A list view control displays a collection of items each consisting of an icon and a label.

A tree view control is a window that displays a hierarchical list of items. Each item consists of a label and an optional bitmapped image, and each item can have a list of subitems associated with it. By clicking an item, the user can expand and collapse the associated list of subitems.
 

   
   
  RELATED TOPICS  
Custom Controls in MFC
SubClassing a Window
Creating the Common Controls
Slider Control and Styles
Spin Control and Styles
List View Control and Styles
Tree View Control and Styles
Notification Messages by Common Controls
Property Sheets
How to create a Modal Property Sheet
 


 
           
Home | Profile | Users | Library | Publisher | Tech Forum | News | Contact Us