| How to Create Controls w/ a 3D Border at Run Time Using MFCID: Q132243 
 | 
Controls placed in a dialog box under Windows 95 have a 3D border. If you want to create a control at run time that has a 3D border, specify the WS_EX_CLIENTEDGE extended style.
The new extended-window style WS_EX_CLIENTEDGE specifies that a window is
to have a 3D border. All controls created by the dialog manager are created
with that style automatically added. To create a control at run time that
has a 3D border, you have to add that style yourself.
Because WS_EX_CLIENTEDGE is an extended style, you cannot use the Create()
member function to create a control. You must call CreateEx(), and pass the
appropriate Windows class name as well. For example, to create an edit
control at run time, you could use this code:
   m_Edit.Create(WS_CHILD | WS_BORDER | WS_VISIBLE,
                 CRect(10,10,100,100),pParent,nID); 
   m_Edit.CreateEx(WS_EX_CLIENTEDGE,"EDIT","",
                   WS_CHILD | WS_BORDER | WS_VISIBLE,
                   10,10,100,100,pParent->GetSafeHwnd(),(HMENU)nID); 
   #define WS_EX_CLIENTEDGE        0x00000200L 
For more information about Create and CreateEx, please see the Class
Library Reference in Books Online.
For more information about the new Windows styles, please see the Win32
Software Development Kit (SDK) documentation.
Additional query words: kbinf 3D border sunken 2.10 2.20 4.00 runtime run-time
Keywords          : kbMFC KbUIDesign kbVC 
Version           : 4.00 | 2.10 2.20 4.00
Platform          : NT WINDOWS 
Issue type        : Last Reviewed: August 3, 1999