home Tech Library Tech Forum
Publisher
 
Custom Controls in MFC       
 
 
Creating the Common Custom Controls
 
 

 

There are two ways to create a common control. You can instantiate the corresponding MFC control class and call the resulting object’s Create() function. Or we can add a control resource line to the dialog resource script directly.

As an example see the code below, which will attach a progress control directly to a window:

#include <afxcmn.h>
. . .
. . .
CProgressCtrl ctrlProgress;
CRect ctrlLoc(12, 20, 48, 18);
ctrlProgress.Create(WS_CHILD | WS_VISIBLE | WS_BORDER, ctrlLocation, this, IDC_PROGRESS);

 
   
   
  RELATED TOPICS  
Custom Controls in MFC
SubClassing a Window
Common Custom Controls in MFC
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