The following code illustrates how to cause a video device to transfer an image from the image device element buffer to the display surface.

  MCI_IMAGE_PARMS mciImageParms;
  MCI_RESTORE_PARMS mciRestoreParms;
  USHORT  usUserParm = 0;
  ULONG   ulReturn;

  /* Without a rectangle */
  memset (&mciRestoreParms, 0x00, sizeof (MCI_RESTORE_PARMS));
  mciRestoreParms.hwndCallback = hwndNotify;
  mciRestoreParms.DestRect   = 0;

  ulReturn = mciSendCommand(usDeviceID, MCI_RESTORE,
                 MCI_WAIT,
                 (PVOID)&mciRestoreParms,
                 usUserParm);

  /* With a rectangle */
  memset (&mciRestoreParms, 0x00, sizeof (MCI_RESTORE_PARMS));
  mciRestoreParms.hwndCallback = hwndNotify;
  mciRestoreParms.DestRect.xLeft   = lX1;
  mciRestoreParms.DestRect.yBottom = lY1;
  mciRestoreParms.DestRect.xRight  = lX2;
  mciRestoreParms.DestRect.yTop    = lY2;

  ulReturn = mciSendCommand(usDeviceID, MCI_RESTORE,
                 MCI_WAIT | MCI_RESTORE_DEST_RECT,
                 (PVOID)&mciRestoreParms,
                 usUserParm);


[Back] [Next]