MCI_WINDOW

This MCI command message specifies the window and the window characteristics for graphic devices. Graphic devices should create a default window when a device is opened but should not display it until they receive a command that causes data to be displayed. The window command is used to supply an application-created window to the device and to change the display characteristics of an application-supplied or default display window. If the application supplies the display window, it should be prepared to update an invalid rectangle on the window.

Support of this message by a device is optional. The parameters and flags for this message vary according to the selected device.

Parameters

DWORD lParam1

The following flags apply to all devices supporting MCI_WINDOW:

MCI_NOTIFY

Specifies that MCI should post the MM_MCINOTIFY message when this command completes. The window to receive this message is specified in the dwCallback field of the data structure identified by lpWindow.

MCI_WAIT

Specifies that the operation should finish before MCI returns control to the application.

DWORD lpWindow

Specifies a far pointer to a device specific data structure. For a description of this parameter, see the lpWindow description included with the device extensions.

Animation Extensions

DWORD lParam1

The following additional flags apply to animation devices supporting MCI_WINDOW:

MCI_ANIM_WINDOW_HWND

Indicates the handle of the window to use for the destination is included in the hWnd field of the data structure identified by lpWindow. Set this to MCI_ANIM_WINDOW_DEFAULT to return to the default window.

MCI_ANIM_WINDOW_STATE

Indicates the nCmdShow field of the MCI_ANIM_WINDOW_PARMS data structure contains parameters for setting the window state. This flag is equivalent to calling ShowWindow with the state parameter. The constants are the same as those in WINDOWS.H (such as SW_HIDE, SW_MINIMIZE, or SW_SHOWNORMAL).

MCI_ANIM_WINDOW_TEXT

Indicates the lpstrText field of the MCI_ANIM_WINDOW_PARMS data structure contains a pointer to a buffer containing the caption used for the window.

LPMCI_ANIM_WINDOW_PARMS lParam2

Specifies a far pointer to a MCI_ANIM_WINDOW_PARMS data structure. (Devices with additional parameters might replace this data structure with a device-specific data structure.)

Video Overlay Extensions

DWORD lParam1

The following additional flags apply to video overlay devices supporting MCI_WINDOW:

MCI_OVLY_WINDOW_HWND

Indicates the handle of the window used for the destination is included in the hWnd field of the MCI_OVLY_WINDOW_PARMS data structure. Set this to MCI_OVLY_WINDOW_DEFAULT to return to the default window.

MCI_OVLY_WINDOW_STATE

Indicates the nCmdShow field of the lParam2 data structure contains parameters for setting the window state. This flag It is equivalent to calling showwindow with the state parameter. The constants are the same as those defined in WINDOWS.H (such as SW_HIDE, SW_MINIMIZE, or SW_SHOWNORMAL.)

MCI_OVLY_WINDOW_TEXT

Indicates the lpstrText field of the MCI_OVLY_WINDOWS_PARMS data structure contains a pointer to buffer containing the caption used for the window.

LPMCI_OVLY_WINDOW_PARMS lParam2

Specifies a far pointer to a MCI_OVLY_WINDOW_PARMS data structure. (Devices with additional parameters might replace this data structure with a device-specific data structure.)

Return Value

Returns zero if successful. Otherwise, it returns an MCI error code.

Comments

This command applies to animation, and video overlay devices.