【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.2.6.32.26 Window::ScreenToClient
Contents
Description
Converts the screen coordinates of a given RECT structure pointer on the display to client coordinates.
Syntax
void ScreenToClient( RECT * lpRect )
Parameters
- lpRect
- [modify] Pointer to a RECT structure that contains the screen coordinates to be converted.
- The new screen coordinates are copied into this structure if the function succeeds.
Return
Examples
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; }
Remark
See Also
Header to Include
origin.h