Share via


ATLMovie Sample: Uses Compiler COM Support and Active Movie Interfaces in an ATL Control

The ATLMovie sample is an ATL control that demonstrates how to use compiler COM support and the Active Movie interfaces to play a movie. It implements several COM properties and methods on its IMovieCtl interface.

The ATLMovie attributes sample is the attributed version of this sample.

Building and Running the Sample

To build and run this sample

  1. Open the solution file ATLMovie.sln.

  2. From the Build menu, click Build.

  3. After the sample builds, open MovieCtl.htm in your Web browser. This will play the clock.avi file, which ships with Windows.

    You may need to edit MovieCtl.htm and update the line:

    MovieCtl.FileName = "C:\Winnt\Clock.AVI"
    to point to the location of the Clock.AVI file on your particular system.

Properties and Methods

Properties

Name Description
FileName The file name of the movie to play.

Methods

Name Description
Pause Pause the currently playing movie.
Play Play the movie pointed to by the FileName property.
Reset Reset the playing position to the beginning of the movie.
Stop Stop the movie.

Keywords

This sample uses the following keywords:

BEGIN_COM_MAP; BEGIN_MSG_MAP; BEGIN_OBJECT_MAP; BEGIN_PROPERTY_MAP; CComCoClass; CComControl; CComModule::GetClassObject; CComModule::GetLockCount; CComModule::Init; CComModule::RegisterServer; CComModule::Term; CComModule::UnregisterServer; CComObjectRootEx; COM_INTERFACE_ENTRY; COM_INTERFACE_ENTRY_IMPL; COM_INTERFACE_ENTRY_IMPL_IID; CreateBrushIndirect; CreateFilterGraph; CWindow::GetDC; DECLARE_REGISTRY_RESOURCEID; DeleteObject; DisableThreadLibraryCalls; END_COM_MAP; END_MSG_MAP; END_OBJECT_MAP; END_PROPERTY_MAP; FillRect; GetProperty; IDispatchImpl; IMediaControlPtr::Pause; IMediaControlPtr::Release; IMediaControlPtr::RenderFile; IMediaControlPtr::Run; IMediaControlPtr::Stop; IMediaPositionPtr::CurrentPosition; IMediaPositionPtr::Duration; IObjectSafetyImpl; IOleControlImpl; IOleInPlaceActiveObjectImpl; IOleInPlaceObjectWindowlessImpl; IOleInPlaceObjectWindowlessImpl::SetObjectRects; IOleObjectImpl; IPersistStorageImpl; IPersistStreamInitImpl; IProvideClassInfo2Impl; IVideoWindowPtr ::Owner IVideoWindowPtr::.CreateInstance; IVideoWindowPtr::Owner ; IVideoWindowPtr::SetWindowPosition; IVideoWindowPtr::Visible ; IVideoWindowPtr::WindowStyle ; IViewObjectExImpl; MESSAGE_HANDLER; OBJECT_ENTRY; OffsetRect; OleTranslateColor; Reset; SetWindowPosition; SysFreeString

See Also

ATL Samples