IC Imaging Control C++

Grabber::setWindowPosition Method

Grabber::setWindowPosition Method

Sets the position of the grabber's live video window.
Syntax:
bool setWindowPosition( long posx, long posy );
Parameter Description
posx

Specifies the x-coordinate of the upper left hand corner of the video window. It defaults to 0.

posy

Specifies the y-coordinate of the upper left hand corner of the video window. It defaults to 0.

Return value:

true on success, false otherwise.

Remarks:

A position for the live video window can only be set, if Grabber::getDefaultWindowPosition returns false. If an application wants to alter the position of the live video window, it should call Grabber::setDefaultWindowPosition(false) first.

Sample:

This example demonstrates how to set the position of the grabber's live video window.

long posx   = 50;
long posy   = 50;
long width  = 150;
long height = 100;
if( grabber.setWindowPosition( posx, posy ) == true )
{
    printf("New window position is %d %d\n",posx, posy);
}
else
{
    printf("Failed to set the new window position!\n");
}
See also: Grabber, Grabber::setWindowSize, Grabber::getWindowPosition, 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