Browse Source

+ added the win16api window coordinate mapping and hit testing functions

git-svn-id: trunk@31738 -
nickysn 10 years ago
parent
commit
077ce10a93
2 changed files with 19 additions and 0 deletions
  1. 7 0
      rtl/win16/win31.pp
  2. 12 0
      rtl/win16/winprocsh.inc

+ 7 - 0
rtl/win16/win31.pp

@@ -706,6 +706,13 @@ function RegisterClass(var wc: WNDCLASS): ATOM; external 'USER';
 function GetWindowPlacement(hwnd: HWND; lpwndpl: LPWINDOWPLACEMENT): BOOL; external 'USER';
 function SetWindowPlacement(hwnd: HWND; lpwndpl: LPWINDOWPLACEMENT): BOOL; external 'USER';
 
+{ Window coordinate mapping and hit-testing }
+
+procedure MapWindowPoints(hwndFrom, hwndTo: HWND; lppt: LPPOINT; cpt: UINT); external 'USER';
+{$ifdef VAR_PARAMS_ARE_FAR}
+procedure MapWindowPoints(hwndFrom, hwndTo: HWND; var pt: POINT; cpt: UINT); external 'USER';
+{$endif}
+
 implementation
 
 end.

+ 12 - 0
rtl/win16/winprocsh.inc

@@ -893,3 +893,15 @@ procedure CloseWindow(hwnd: HWND); external 'USER';
 function AnyPopup: BOOL; external 'USER';
 function IsIconic(hwnd: HWND): BOOL; external 'USER';
 function IsZoomed(hwnd: HWND): BOOL; external 'USER';
+
+{ Window coordinate mapping and hit-testing }
+
+procedure ClientToScreen(hwnd: HWND; lppt: LPPOINT); external 'USER';
+procedure ScreenToClient(hwnd: HWND; lppt: LPPOINT); external 'USER';
+{$ifdef VAR_PARAMS_ARE_FAR}
+procedure ClientToScreen(hwnd: HWND; var pt: POINT); external 'USER';
+procedure ScreenToClient(hwnd: HWND; var pt: POINT); external 'USER';
+{$endif}
+
+function WindowFromPoint(pt: POINT): HWND; external 'USER';
+function ChildWindowFromPoint(hwndParent: HWND; pt: POINT): HWND; external 'USER';