CAnimateCtrl::Create
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

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 Platform 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.

Nonzero if successful; otherwise zero.

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 Platform SDK for more information on animation control styles.

See the example for CAnimateCtrl::CAnimateCtrl.

Show:
© 2016 Microsoft