ScreenToClient
Converts the screen coordinates of a given RECT structure pointer on the display to client coordinates.
void ScreenToClient( RECT * lpRect )
EX1
//Please make sure you have a worksheet window exist when you run the example int Window_ScreenToClient_ex1() { WorksheetPage testWks = Project.WorksheetPages(0); Window testWin = testWks.GetWindow(); testWin.ShowWindow(SW_NORMAL); RECT rect; rect.left=100; rect.right=200; rect.top=200; rect.bottom=300; testWin.ScreenToClient(&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; }
origin.h