Home   Index   About
Ultimate Pack


Custom Search
Overview
Group
Quick Info

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
destination at rectangle
frame
frame at rectangle
source
source at rectangle
  • ideo
    video at rectangle
    window
    window at rectangle
    window client
    window client at rectangle
overlay
destination
destination at rectangle
frame
frame at rectangle
source
source at rectangle
video
video at rectangle

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.
  • ideo
Selects the entire incoming video image to capture in the frame buffer.
  • ideo 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 command. To change the location of the window without changing its height or width, specify zero for the height and width.
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 command).

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

open
, set


Last news from Greatis Software

Nostalgia .Net     Nostalgia .Net     .Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes.  More »

Recommended software for developers

Ultimate Pack for Delphi and C++ Builder     Ultimate Pack     Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price.  More »

Form Designer .Net     Form Designer .Net     Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro!  More »

Print Suite .Net     Print Suite .Net     Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available  More »

Gradient Controls .Net     Gradient Controls .Net     Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available  More »

iGrid     Greatis iGrid     iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors.  More »


All the contacts and projects

Dmitry Vasiliev (just.dmitry)

Related Links

Software for Visual Studio .NET developers
Software for Delphi and C++ Builder developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET

More Online Helps

Win32 Programmer's Reference
Win32 Multimedia Programmer's Reference
OLE Programmer's Reference
Microsoft Windows Pen API Programmer's Reference
Microsoft Windows Sockets 2 Reference
Microsoft Windows Telephony API (TAPI) Programmer's Reference
Unix Manual Pages

Free Tech Secrets ;) Copyright © 2008-2011 Free Tech Secrets ;) greatis just4fun network just4fun