Jump to content

MCI_PUT

From EDM2

This message sets the source and destination rectangles for the transformation of the video image and the position of the default video window.

Syntax

param1
ULONG ulParam1; /* Message flags. */

param2
PMCI_VID_RECT_PARMS pParam2; /* Pointer to a rectangle parameter structure. */

Parameters

ulParam1 (ULONG) - input
Common flags:
  • MCI_NOTIFY Posts a notification message when the action completes.
  • MCI_WAIT Does not return control until the operation completes.
Digital Video Extensions
  • MCI_DGV_PUT_RECT Indicates the `rc` field in `pParam2` contains a valid rectangle. (Required).
  • MCI_DGV_PUT_SOURCE Defines the capture rectangle relative to the source origin. Valid only with `MCI_DGV_RECORD`.
  • MCI_DGV_PUT_DESTINATION Defines the clipping rectangle relative to the window's lower-left corner.
  • MCI_DGV_PUT_WINDOW_MOVE Moves the video window to the specified X1, Y1 coordinates.
  • MCI_DGV_PUT_WINDOW_SIZE Resizes the video window.
  • MCI_DGV_RECORD Required for source/destination flags during video capture.
  • MCI_DGV_MONITOR Configures the monitor window size and position.
Video Overlay Extensions
  • MCI_OVLY_PUT_RECT, MCI_OVLY_PUT_DESTINATION, MCI_OVLY_PUT_SOURCE, MCI_OVLY_PUT_WINDOW_MOVE, MCI_OVLY_PUT_WINDOW_SIZE.
pParam2 (PMCI_VID_RECT_PARMS) - input
Points to a rectangle structure (e.g., MCI_DGV_RECT_PARMS).

Returns

rc (ULONG) - returns
  • MCIERR_SUCCESS Command successful.
  • MCIERR_MISSING_FLAG A required flag was not provided.
  • MCIERR_INVALID_DEVICE_ID Invalid device ID.

Example Code

  MCI_DGV_RECT_PARMS mciRectParms;
  
  memset (&mciRectParms, 0x00, sizeof (MCI_DGV_RECT_PARMS));
  mciRectParms.rc.xLeft   = 10;
  mciRectParms.rc.yBottom = 10;
  mciRectParms.rc.xRight  = 320;
  mciRectParms.rc.yTop    = 240;

  mciSendCommand(usDeviceID, MCI_PUT,
                 MCI_WAIT | MCI_DGV_PUT_RECT |
                 MCI_DGV_RECORD | MCI_DGV_PUT_SOURCE,
                 (PVOID)&mciRectParms, 0);