Jump to content

MCI_UNFREEZE

From EDM2

This message restores motion to an area of the display that was previously frozen using MCI_FREEZE or MCI_RESTORE.

Syntax

param1
ULONG ulParam1; /* Message flags. */

param2
PMCI_OVLY_RECT_PARMS pParam2; /* Pointer to rectangle structure. */

Parameters

ulParam1 (ULONG) - input
This parameter can contain any of the following flags:
* MCI_NOTIFY — Posts a notification message when the action completes.
* MCI_WAIT — Does not return control until the action is completed.
* MCI_OVLY_FREEZE_RECT — The `rect` field of the MCI_OVLY_RECT_PARMS structure contains a valid rectangle to unfreeze. If this flag is not specified, the entire video destination rectangle is unfrozen.
* MCI_OVLY_FREEZE_RECT_OUTSIDE — Indicates that the area outside the specified rectangle should be unfrozen.
pParam2 (PMCI_OVLY_RECT_PARMS) - input
A pointer to the MCI_OVLY_RECT_PARMS data structure.

Return Value

rc (ULONG)
Return codes indicating success or type of failure:
* MCIERR_SUCCESS — Command completed successfully.
* MCIERR_OUT_OF_MEMORY — System out of memory.
* MCIERR_INVALID_DEVICE_ID — Invalid device ID given.
* MCIERR_MISSING_PARAMETER — Missing parameter for this command.
* MCIERR_DRIVER — Internal MMPM/2 driver error.
* MCIERR_INVALID_FLAG — Invalid flag specified for this command.
* MCIERR_INSTANCE_INACTIVE — Instance inactive.
* MCIERR_OVLY_INVALID_RECT — An invalid rectangle parameter was specified.
* MCIERR_OVLY_NOT_AVAILABLE — The requested action is not available (e.g., video has been set off).

Remarks

  • Areas outside the current video destination region remain unaffected.
  • You can issue multiple MCI_FREEZE and MCI_UNFREEZE messages sequentially to create complex regions of frozen and motion video.

Related Messages

Example Code

The following code illustrates how to restore motion to a specific sub-rectangle of the display.

    MCI_VID_RECT_PARMS mciUnFreezeParms;
    USHORT  usUserParm = 0;
    ULONG   ulReturn;

    /* Initialize structure and set the callback window */
    memset (&mciUnFreezeParms, 0x00, sizeof (MCI_VID_RECT_PARMS));
    mciUnFreezeParms.hwndCallback = hwndNotify;

    /* Define the specific rectangle coordinates */
    mciUnFreezeParms.rc.xLeft   = lX1;
    mciUnFreezeParms.rc.yBottom = lY1;
    mciUnFreezeParms.rc.xRight  = lX2;
    mciUnFreezeParms.rc.yTop    = lY2;

    /* Issue the unfreeze command for the specified rectangle */
    ulReturn = mciSendCommand(usDeviceID, MCI_UNFREEZE,
                   MCI_WAIT | MCI_OVLY_FREEZE_RECT,
                   (PVOID)&mciUnFreezeParms,
                   usUserParm);