GetClientRect
void GetClientRect( RECT * lpRect )
EX1
//Please make sure you have a worksheet window exist when you run the example int Window_GetClientRect_ex1() { WorksheetPage testWks = Project.WorksheetPages(0); Window testWin = testWks.GetWindow(); testWin.ShowWindow(SW_NORMAL); RECT rect; testWin.GetClientRect(&rect); printf("upper-left position to client area, x:%d, y:%d\n", rect.left, rect.top); printf("lower-right position to client area: x:%d, y:%d\n", rect.right, rect.bottom); return 1; }
Copies the client coordinates of the Window client area into the structure pointed to by lpRect.
The client coordinates specify the upper-left and lower-right corners of the client area. Since
client coordinates are relative to the upper-left corners of the CWnd client area, the
coordinates of the upper-left corner are (0,0).
origin.h