ScreenToClient() private method

private ScreenToClient ( HWND hWnd, Point &point ) : BOOL
hWnd HWND
point Point
return BOOL
Example #1
0
 public Point PointToClient(Point point)
 {
     if (!Functions.ScreenToClient(window.WindowHandle, ref point))
     {
         throw new InvalidOperationException(String.Format(
                                                 "Could not convert point {0} from client to screen coordinates. Windows error: {1}",
                                                 point.ToString(), Marshal.GetLastWin32Error()));
     }
     return(point);
 }
Example #2
0
 public Point PointToClient(Point point)
 {
     if (!Functions.ScreenToClient(this.window.WindowHandle, ref point))
     {
         throw new InvalidOperationException(string.Format("Could not convert point {0} from screen to client coordinates. Windows error: {1}", (object)point.ToString(), (object)Marshal.GetLastWin32Error()));
     }
     else
     {
         return(point);
     }
 }