SECProgressCtrl::Create

BOOLSECProgressCtrl::Create(DWORDdwStyle, const RECT&rect, UINTnID, DWORDdwExStyle= SEC_EX_PROGRESS_DEFAULTS)

Use this method to dynamically create a new extended progress control.

Defined in: progress.cpp

Return Value

Nonzero if successful, otherwise 0.

Parameters

dwStyle

WS_* window stlyes to be passed to CWnd::Create call

rect

Rectangle of new progress control

nID

id for this new control

Comments

Available extended progress styles:

SEC_EX_PROGRESS_VERTVertical progress control
SEC_EX_PROGRESS_RIGHT_TO_LEFTHorizontal displays right to left
SEC_EX_PROGRESS_TOP_TO_BOTTOMVertical displays top to bottom
SEC_EX_PROGRESS_SHOWPERCENTShow percentage complete text
SEC_EX_PROGRESS_SHOWTEXTShow custom text inside bar
SEC_EX_PROGRESS_TEXT_ALIGN_LEFTLeft justify shown text/percent
SEC_EX_PROGRESS_TEXT_ALIGN_RIGHTRight justify shown text/percent
SEC_EX_PROGRESS_TEXT_ALIGN_CENTERCenter shown text/percent SEC_EX_PROGRESS_COMMCTRL32Has look and feel of CProgressCtrl SEC_EX_PROGRESS_DEFAULTSSEC_EX_PROGRESS_SHOWPERCENT |
SEC_EX_PROGRESS_TEXT_ALIGN_CENTER

In absence of SEC_EX_PROGRESS_VERT, horizontal mode is assumed.

If horizontal, left to right is assumed unless SEC_EX_PROGRESS_RIGHT_TO_LEFT is specified.

If vertical, bottom to top is assumed unless SEC_EX_PROGRESS_TOP_TO_BOTTOM is specified.

You can either have no text, text, or percentages, but not a combination of the two.

The SEC_EX_PROGRESS_COMMCTRL32 style is provided for backward compatibility. This will produce a progress bar with the same appearance as a CProgressCtrl. In fact, when this flag is set, the CProgressCtrl::OnPaint is called instead of the virtual paint routines normally invoked. This style can be toggled using the  SetExStyle. Once the current progress value exceeds 100% of the range, the behavior of CProgressCtrl is to recycle starting again at 0, whereas the default behavior for SECProgressCtrl without the SEC_EX_PROGRESS_COMMCTRL32 style flag is to remain at 100% until reset using the  ResetProgress method.

dwExStyle

Progress control extended styles from SEC_EX_PROGRESS_*. See  SetExStyle for more information.

See Also

SECProgressCtrl  SetExStyle  AttachProgress