MCI_RESTORE

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 Values

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

**  Windows NT/2000/XP:** Included in Windows NT 3.1 and later.
**  Windows 95/98/Me:** Included in Windows 95 and later.
**  Header:** Declared in Mmsystem.h; include Windows.h.

See Also

MCI, MCI Commands, MCI_CAPTURE, MCI_DGV_RESTORE_PARMS