The following figure illustrates the interaction between the Movie Sample program and the Media Device Manager (MDM). Source code for the Movie Sample is located in the \TOOLKIT\SAMPLES\MM\MOVIE subdirectory.
┌─────────────────┐ ┌─────────────────┐ │ Movie ├───│ Initialize │ │ Sample │(1) │ Open │ │ │ │ Device │ └──┬───────────┬──┘ └─────────────────┘ Application (2) (3) Default Window Window ┌─────────────────┐ │ Media │ │ Device │ │ Manager │ └───────┬─────────┘ (4) ┌─────────────────┐ │ Digital │ │ Video │ │ MCD │ └─────────────────┘
window
Note: When a window handle is selected with the window command, the digital video MCD queries the size and position of the window. If the window is visible, the digital video MCD alters the size and position of the video accordingly. However, if the window size and position is changed while the window is hidden, the digital video MCD does not note the new size and position.
If you select Edit, processing is passed to the EditTheMovie procedure which loads the movie, and sets the data format to frames. It copies the first 25 frames to the clipboard. The 25 frames are pasted four times to the end of the movie file (duplicating the first 25 frames four times). Next, the EditTheMovie procedure cuts the first 10 frames from the movie, seeks to the end of the movie, and pastes the 10 frames to the end. The cut command deletes the specified number of frames from the position the application specifies to start the cut. Once the movie is edited, selecting Play causes the edited version of the movie to play. To play the original "unedited" movie file, exit the Movie Sample program, restart it, and select Play.