Window::GetWindowRect

Syntax

void GetWindowRect( RECT * lpRect )


Parameters

lpRect
[output] Points to a RECT structure that will receive the screen coordinates of the upper-left and lower-right corners.

Examples

EX1

//Please make sure you have a worksheet window exist when you run the example
int Window_GetWindowRect_ex1()
{

WorksheetPage testWks;
testWks.Create();
Window testWin = testWks.GetWindow();
testWin.ShowWindow(SW_NORMAL);

RECT rect;
testWin.GetWindowRect(&rect);
printf("upper-left position, x:%d, y:%d\n", rect.left, rect.top);
printf("lower-right position: x:%d, y:%d\n", rect.right, rect.bottom);
return 1;
}


Remark

Copies the dimensions of the bounding rectangle of the Window object to the structure pointed to by lpRect. The dimensions are given in screen coordinates relative to the upper-left corner of the display screen. The dimensions of the caption, border, and scroll bars, if present, are included.