Compartilhar via


CAnimateCtrl::Create

Creates an animation control and attaches it to a CAnimateCtrl object.

virtual BOOL Create( 
   DWORD dwStyle, 
   const RECT& rect, 
   CWnd* pParentWnd, 
   UINT nID  
);

Parameters

  • dwStyle
    Specifies the animation control's style. Apply any combination of the windows styles described in the Remarks section below and the animation control styles described in Animation Control Styles in the Windows SDK.

  • rect
    Specifies the animation control's position and size. It can be either a CRect object or a RECT structure.

  • pParentWnd
    Specifies the animation control's parent window, usually a CDialog. It must not be NULL.

  • nID
    Specifies the animation control's ID.

Return Value

Nonzero if successful; otherwise zero.

Remarks

You construct a CAnimateCtrl in two steps. First, call the constructor, and then call Create, which creates the animation control and attaches it to the CAnimateCtrl object.

Apply the following window styles to an animation control.

  • WS_CHILD   Always

  • WS_VISIBLE   Usually

  • WS_DISABLED   Rarely

If you want to use extended windows styles with your animation control, call CreateEx instead of Create.

In addition to the window styles listed above, you may want to apply one or more of the animation control styles to an animation control. See the Windows SDK for more information on animation control styles.

Example

See the example for CAnimateCtrl::CAnimateCtrl.

Requirements

Header: afxcmn.h

See Also

Reference

CAnimateCtrl Class

Hierarchy Chart

CAnimateCtrl::CAnimateCtrl

CAnimateCtrl::Open

CAnimateCtrl::Play

CAnimateCtrl::Seek