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