window
The window
command controls the display window. You can use this command to change the
display characteristics of the window or provide a destination window for the
driver to use in place of the default display window. Digital-video, and
video-overlay devices recognize this command.
wsprintf(lpstrCommand, "window %s %s %s",
lpszDeviceID, lpszWindowFlags,
lpszFlags);
Parameters
lpszDeviceID
Identifier of
an MCI device. This identifier or alias is assigned when the device is opened.
lpszWindowFlags
Flag for
controlling the display window. The following table lists device types that
recognize the window command and the flags used by each type:
digitalvideo |
handle hwnd |
show
minimized |
overlay |
fixed |
state
restore |
The following
table lists the flags that can be specified in the lpszWindowFlags parameter
and their meanings:
fixed |
Disables
stretching of the image. |
handle
default |
Specifies
that the device should set the display window back to the default window
created during the open video-overlay devices,
specifies that the device should create and manage its own destination
window. |
handle hwnd |
Specifies
the handle of the destination window to use instead of the default window.
The hwnd parameter contains the ASCII numeric equivalent of the window
handle returned by the CreateWindow |
show
maximized |
Maximizes
the destination window. |
show min |
Displays
the destination window as an icon. |
show
minimized |
Minimizes
the destination window. |
show na |
Displays
the destination window in its current state; the window that is currently
active remains active. |
show
noactivate |
Displays
the destination window in its most recent size and position; the window that
is currently active remains active. |
show normal |
Activates
and displays the destination window in its original size and position. (This
is the same as the state restore flag.) |
state hide |
Hides the
destination window. |
state
iconic |
Displays
the destination window as an icon. |
state
maximized |
Maximizes
the destination window. |
state
minimize |
Minimizes
the destination window and activates the top-level window in the window-manager s
list. |
state
minimized |
Minimizes
the destination window. |
state no
action |
Displays
the destination window in its current state. The window that is currently
active remains active. |
state no
activate |
Displays
the destination window in its most recent size and state. The currently
active window remains active. |
state
normal |
Activates
and displays the destination window in its original size and position. |
state
restore |
Activates
and displays the destination window in its original size and position. |
state show |
Shows the
destination window. |
stretch |
Enables
stretching of the image. |
text caption |
Specifies
the caption for the destination window. If this text contains embedded
blanks, the entire caption must be enclosed in quotation marks. The default
caption for the default window is blank. |
lpszFlags
Can be
wait , notify , or both. For digital-video devices, test can also be
specified. For more information about these flags, see The Wait, Notify, and
Test Flags
Return Values
Returns zero
if successful or an error otherwise.
Remarks
Video-overlay
devices typically create and display a window when opened. If your application
provides a window to the driver, your application is responsible for managing
the messages sent to the window.
Since you can
use the status
The following
command displays and sets the caption for the movie playback window:
window movie text "Welcome to the Movies"
state show
See Also