Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - <b>clienttoscreen()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
ClientToScreen()
Convert a point from client co-ordinates to screen co-ordinates
------------------------------------------------------------------------------

Syntax
ClientToScreen( <hWnd>, <aPoint> )   -->   nil

Arguments
<hWnd> is a handle to the window whose client area is to be
used for the conversion.

<aPoint> is the point, specified as an array { x, y } giving
the x- and y- position of the point.

Returns
NIL.

Description
This function converts the co-ordinates in <aPoint>, assumed
to refer to a point in the window specified, to new co-ordinates,
relative to the screen.

This function is useful with TrackPopupMenu(), as it can
convert the mouse position appropriately.

The inverse function is ScreenToClient().

Example
do case
case nEvent == EVENT_RCLICK
     // display and activate a floating menu at the position of the right click
     aPt = { _LastLolParam(), _LastHilParam() }
     ClientToScreen( hWnd, aPt )
     TrackPopupMenu( hPopupMenu,  , aPt[1], aPt[2],  , hWnd )
// . . .
endcase


See Also: ScreenToClient() TrackPopupMenu()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson