The mmpSetStage function specifies the stage window for the Movie Player instance. It also specifies the size and placement of the playback area in the stage window. This function returns TRUE if it successfully sets the new stage window. Note that the Movie Player instance must have a movie file loaded at the time mmpSetStage is called; otherwise, the function fails and returns FALSE, reporting error code MMPERR_STAGE_ERROR.
The mmpSetStage function has the following syntax:
BOOL mmpSetStage(idMovie, hWndStage, lprectStage, wOptions)
The idMovie parameter identifies the Movie Player instance. The hWndStage parameter identifies the new stage window. When you call mmpSetStage, the new stage window is brought to the foreground.
The lprectStage parameter points to a RECT structure defining the placement of the image in the window. The top and left fields of the structure define the offset's playback area; the bottom and right fields define the playback-area extents. The rectangle figures are not used unless you pass the MMP_STAGE_OFFSET flag in wOptions. The wOptions parameter takes the following flags:
Flag | Description |
MMP_DRAW_FRAME | Draws the next frame to the stage window. |
MMP_STAGE_OFFSET | Places the playback-area origin at the offset specified by the top and left fields of the RECT structure pointed to by lprectStage. |
MMP_STAGE_CENTER | Centers the playback area in the stage-window client area. |
MMP_STAGE_BORDER | Draws a border around the playback area, if there is room for a border. To set the playback area away from the client-area border, use the MMP_STAGE_CENTER flag, or use the MMP_STAGE_OFFSET flag with an appropriate lprectStage value. |
MMP_STAGE_FIXED | Fixes the size and position of the movie-playback area. When the window is resized, or when a new movie is loaded, the playback area remains fixed at either the size of the client area at the time mmpSetStage was called or, if the MMP_STAGE_OFFSET flag was specified, the location and size specified by the RECT values. |
Summary: Getting Window Information
The mmpGetStage function returns stage-window information. This function has the following syntax:
BOOL mmpGetStage(idMovie, lphWndStage, lprectStage, lpwOptions)
Specify the Movie Player instance using idMovie. This function returns the handle of the current stage window in the address pointed to by lphWndStage. It returns the playback-area origin and extents in the RECT structure pointed to by lprectStage. It also returns the current stage options (for example, MMP_STAGE_OFFSET or MMP_STAGE_CENTER) in the WORD value pointed to by lpwOptions.
If the function retrieves the stage information successfully, it returns TRUE.