put
The put
command defines the area of the source image and destination window used for
display. Digital-video and video-overlay devices recognize this command.
wsprintf(lpstrCommand, "put %s %s %s",
lpszDeviceID, lpszRegions,
lpszFlags);
Parameters
lpszDeviceID
Identifier of
an MCI device. This identifier or alias is assigned when the device is opened.
lpszRegions
Flag for
defining the area. The following table lists device types that recognize the put
command and the flags used by each type:
digitalvideo |
destination |
video |
overlay |
destination |
source |
The following
table lists the flags that can be specified in the lpszRegions parameter
and their meanings:
destination |
Selects the
entire client area of the destination window to display the data. |
destination
at rectangle |
Selects a
portion of the client area of the destination window used to display the
image. When an area of the display window is specified and the device
supports stretching, the source image is stretched to the destination offset
and extent. |
frame |
Selects the
entire frame buffer to receive the incoming video images. |
frame at rectangle |
Selects a
portion of the frame buffer to receive the incoming video images. |
source |
Selects the
entire image for display in the destination window. |
source at rectangle |
Selects a
portion of the image to display in the destination window. When an area of
the source image is specified, and the device supports stretching, the source
image is stretched to the destination offset and extent. |
video |
Selects the
entire incoming video image to capture in the frame buffer. |
video at rectangle |
Selects a
portion of the incoming video image to capture in the frame buffer. |
window |
Restores
the initial window size on the display. This command also displays the
window. |
window at rectangle |
Changes the
size and location of the display window. The specified rectangle is relative
to the parent window of the display window (usually the desktop) if the
style child flag has been used for the open |
window
client |
Restores
the client area of the window. |
window
client at rectangle |
Changes the
size and location of the client area of the window. The specified rectangle
is relative to the parent window of the client window. To change the location
of the window without changing its height or width, specify zero for the
height and width. |
When a flag
includes a rectangle, the rectangle coordinates are relative to the window
origin or the image origin, as appropriate, and are specified as X1 Y1 X2 Y2.
The coordinates X1 Y1 specify the upper left corner, and the
coordinates X2 Y2 specify the width and height of the rectangle.
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
The put
command defines one or more of the following rectangles when working with
video-overlay devices:
The video rectangle defines the
region of the incoming video image to capture.
The frame rectangle defines the
region of the frame buffer that receives the incoming video image.
The source rectangle defines
which region of the frame buffer is copied to the destination rectangle.
The destination rectangle
defines the region of the display window client area that receives the video
image.
The video
rectangle is related to the frame rectangle in the same way the source
rectangle is related to the destination rectangle. Stretching can occur from
the video rectangle to the frame rectangle and from the source rectangle to the
destination rectangle. Not all devices support stretching, and stretching must
be enabled (by using the set
The following
command defines three regions for the video, frame, and source:
put vboard video 120 120 200 200 frame 0 0 200 200
source 0 0 200 200
The regions
in this example are defined as follows:
A 200- by 200-pixel region of
the incoming video data, starting at an origin 120 pixels from the upper left
corner, will be captured to the frame buffer.
The video data will be placed
in a 200- by 200-pixel region at the upper left corner of the frame buffer.
Transfers are made from the
200- by 200-pixel region at the upper left corner of the frame buffer to the
destination window.
See Also