Поделиться через


CWnd::ScreenToClient

Converts the screen coordinates of a given point or rectangle on the display to client coordinates.

void ScreenToClient(
   LPPOINT lpPoint 
) const;
void ScreenToClient(
   LPRECT lpRect 
) const;

Параметры

  • lpPoint
    Points to a CPoint object or POINT structure that contains the screen coordinates to be converted.

  • lpRect
    Points to a CRect object or RECT structure that contains the screen coordinates to be converted.

Заметки

The ScreenToClient member function replaces the screen coordinates given in lpPoint or lpRect with client coordinates. The new coordinates are relative to the upper-left corner of the CWnd client area.

Пример

See the example for CListCtrl::GetItemRect.

Требования

Header: afxwin.h

См. также

Основные понятия

CWnd Class

CWnd Members

Hierarchy Chart

CWnd::ClientToScreen

ScreenToClient