MCI_RESTORE command

The MCI_RESTORE command copies a bitmap from a file to the frame buffer. Digital-video devices recognize this command. This command performs the opposite action of the MCI_CAPTURE command.

To send this command, call the mciSendCommand function with the following parameters.

MCIERROR mciSendCommand(
  MCIDEVICEID wDeviceID, 
  MCI_RESTORE, 
  DWORD dwFlags, 
  (DWORD) (LPMCI_DGV_RESTORE_PARMS) lpRestore
);

Parameters

wDeviceID

Device identifier of the MCI device that is to receive the command message.

dwFlags

MCI_NOTIFY, MCI_WAIT, or MCI_TEST. For information about these flags, see The Wait, Notify, and Test Flags.

lpRestore

Pointer to an MCI_DGV_RESTORE_PARMS structure.

Return Value

Returns zero if successful or an error otherwise.

Remarks

The implementation can recognize a variety of image formats, but a Windows device-independent bitmap (DIB) is always accepted.

The following additional flags apply to digital-video devices:

MCI_DGV_RESTORE_FROM

The lpstrFileName member of the structure identified by lpRestore contains an address of a buffer containing the source filename. The filename is required.

MCI_DGV_RESTORE_AT

The rc member of the structure identified by lpRestore contains a valid rectangle. The rectangle specifies a region of the frame buffer relative to its origin. The first pair of coordinates specifies the upper left corner of the rectangle; the second pair specifies the width and height. If this flag is not specified, the image is copied to the upper left corner of the frame buffer.

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Mmsystem.h (include Windows.h)

See also

MCI

MCI Commands