IC Imaging Control C++

Grabber::getWindowPosition Method

Grabber::getWindowPosition Method

This method retrieves the current position and size of the grabber's live video window.
Syntax:
bool getWindowPosition( long& posx, long& posy, long& width, long& height);
Parameter Description
posx

Receives the x-coordinate of the upper left hand corner of the video window.

posy

Receives the y-coordinate of the upper left hand corner of the video window.

width

Receives the width of the video window, defaults to the width of the video format.

height

Receives the height of the video window, defaults to the height of the video format.

Return value:

true on success, false otherwise.

Sample:

This example demonstrates how to retrieve the size and position of the grabber's live video window and store them into four long variables.

long posx;
long posy;
long width;
long height;
if( grabber.getWindowPosition( posx, posy, width, height ) == true )
{
    printf("Current window position is %d %d %d %d\n",posx, posy, width, height);
}
See also: Grabber, Grabber::setWindowPosition, Grabber::setWindowSize, Grabber::setDefaultWindowPosition, Grabber::getDefaultWindowPosition

<< Grabber

Get in touch with us


About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, frame grabbers and video converters for production automation, quality assurance, logistics, medicine, science and security.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

Automated Imaging Association ISO 9001:2015 certified

Contact us