SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Create a SftButton control as a child window of an existing CWnd parent. Used to add a button programmatically rather than through a dialog template.
C++
BOOL CSftButton::Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID); BOOL CSftButton::Create(LPCTSTR lpszCaption, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
lpszCaption
Initial button caption. Available on the second overload only - sent to the control as the WM_CREATE window text. Equivalent to creating without a caption and then calling SetWindowText. Use a single ampersand (&) to mark an accelerator key; use && to render a literal ampersand.
dwStyle
Window styles. WS_CHILD is required. WS_VISIBLE shows the button immediately; WS_TABSTOP makes it part of the tab order. SftButton does not define any custom window styles - all control-specific configuration goes through SFTBUTTON_CONTROL.
rect
Initial position and size of the button in the parent's client coordinates.
pParentWnd
Pointer to the parent CWnd. Must be non-NULL.
nID
Control identifier. Used as the wParam of WM_COMMAND notifications and to find the control with GetDlgItem.
TRUE if the window was created, FALSE on failure (typically because RegisterApp has not been called).
Both overloads are thin wrappers around CWnd::Create with the SFTBUTTON_CLASS window class. CSftButton::RegisterApp must have been called for the calling process before the first Create.
Most applications create buttons through dialog resources rather than Create - see Creating a Dialog Resource. Programmatic Create is most useful when the button count or layout is computed at run time.
See Also RegisterApp | SFTBUTTON_CLASS | Creating a Dialog Resource | Using C++/MFC
