The following code illustrates how to return the video destination rectangle with MCI_WHERE.

    MCI_DGV_RECT_PARMS  mciRectParms;
    USHORT  usUserParm = 0;
    ULONG   ulReturn;
    CHAR    szText[255];
    CHAR    szValue[20];
    LONG    lX1, lX2, lY1, lY2;

    /* A sample to query the current destination   */
    /* video sub-rectangle within the video window */
    memset (&mciRectParms, 0x00, sizeof (MCI_DGV_RECT_PARMS));
    mciRectParms.hwndCallback = hwndNotify;

    ulReturn = mciSendCommand(usDeviceID, MCI_WHERE,
                   MCI_WAIT | MCI_DGV_WHERE_DESTINATION,
                   (PVOID)&mciRectParms,
                   usUserParm);

    lX1 = mciRectParms.rc.xLeft;
    lY1 = mciRectParms.rc.yBottom;
    lX2 = mciRectParms.rc.xRight;
    lY2 = mciRectParms.rc.yTop;


[Back] [Next]