ClientToScreen

  BOOL ClientToScreen(hwnd, lppt)    
  HWND hwnd; /* window handle */
  LPPOINT lppt; /* address of structure receiving screen coordinates */

The ClientToScreen function converts the client coordinates of a given point to screen coordinates.

Parameters

hwnd

Identifies the window whose client area is used for the conversion.

lppt

Points to a POINT structure that contains the client coordinates to be converted. The new screen coordinates are copied into this structure if the function is successful. The POINT structure has the following form:

typedef struct tagPOINT { /* pt */

LONG x;

LONG y;

} POINT;

Return Value

The return value is TRUE if the function was successful, or FALSE if an error occurred.

Comments

The ClientToScreen function replaces the client coordinates in the POINT structure with the screen coordinates. The screen coordinates are relative to the upper-left corner of the screen.

See Also

MapWindowPoints, ScreenToClient