Browse Source

* Merges from Fixes branch

carl 23 years ago
parent
commit
07af6301de

+ 52 - 11
rtl/win32/keyboard.pp

@@ -16,6 +16,13 @@
  **********************************************************************}
 unit Keyboard;
 interface
+{$ifdef DEBUG}
+uses
+  windows;
+
+var
+  last_ir : Input_Record;
+{$endif DEBUG}
 
 {$i keybrdh.inc}
 
@@ -28,7 +35,9 @@ implementation
 }
 
 uses
+{$ifndef DEBUG}
    Windows,
+{$endif DEBUG}
    Dos,
    WinEvent;
 
@@ -112,6 +121,7 @@ procedure HandleKeyboard(var ir:INPUT_RECORD);
 var
    i      : longint;
    c      : word;
+   altc : char;
    addThis: boolean;
 begin
          with ir.Event.KeyEvent do
@@ -125,11 +135,35 @@ begin
                         addThis := true;
                         if (dwControlKeyState and LEFT_ALT_PRESSED <> 0) or
                            (dwControlKeyState and RIGHT_ALT_PRESSED <> 0) then            {alt pressed}
-                          if (wVirtualKeyCode >= $60) and (wVirtualKeyCode <= $69) then   {0..9 on NumBlock}
+                          if ((wVirtualKeyCode >= $60) and (wVirtualKeyCode <= $69)) or
+                             ((dwControlKeyState and ENHANCED_KEY = 0) and
+                              (wVirtualKeyCode in [$C{VK_CLEAR generated by keypad 5},
+                                                   $21 {VK_PRIOR (PgUp) 9},
+                                                   $22 {VK_NEXT (PgDown) 3},
+                                                   $23 {VK_END 1},
+                                                   $24 {VK_HOME 7},
+                                                   $25 {VK_LEFT 4},
+                                                   $26 {VK_UP 8},
+                                                   $27 {VK_RIGHT 6},
+                                                   $28 {VK_DOWN 2},
+                                                   $2D {VK_INSERT 0}])) then   {0..9 on NumBlock}
                           begin
                             if length (altNumBuffer) = 3 then
                               delete (altNumBuffer,1,1);
-                            altNumBuffer := altNumBuffer + char (wVirtualKeyCode-48);
+                            case wVirtualKeyCode of
+                              $60..$69 : altc:=char (wVirtualKeyCode-48);
+                              $c  : altc:='5';
+                              $21 : altc:='9';
+                              $22 : altc:='3';
+                              $23 : altc:='1';
+                              $24 : altc:='7';
+                              $25 : altc:='4';
+                              $26 : altc:='8';
+                              $27 : altc:='6';
+                              $28 : altc:='2';
+                              $2D : altc:='0';
+                            end;
+                            altNumBuffer := altNumBuffer + altc;
                             altNumActive   := true;
                             addThis := false;
                           end else
@@ -559,6 +593,13 @@ begin
     { we return it here otherwise we have to translate more later }
     if t.AsciiChar <> #0 then
     begin
+      if (t.dwControlKeyState and ENHANCED_KEY <> 0) and
+         (t.wVirtualKeyCode = $DF) then
+        begin
+          t.dwControlKeyState:=t.dwControlKeyState and not ENHANCED_KEY;
+          t.wVirtualKeyCode:=VK_DIVIDE;
+          t.AsciiChar:='/';
+        end;
       {drivers needs scancode, we return it here as under dos and linux
        with $03000000 = the lowest two bytes is the physical representation}
 {$ifdef  USEKEYCODES}
@@ -682,6 +723,9 @@ begin
      if getKeyEventFromQueueWait (t) then
        key := translateKey (t);
   until key <> 0;
+{$ifdef DEBUG}
+  last_ir.Event.KeyEvent:=t;
+{$endif DEBUG}
   SysGetKeyEvent := key;
 end;
 
@@ -776,14 +820,11 @@ begin
 end.
 {
   $Log$
-  Revision 1.6  2002-03-02 09:43:46  peter
-    * fixed compile bug in debug mode
-
-  Revision 1.5  2001/09/21 21:33:36  michael
-  + Merged driver support from fixbranch
+  Revision 1.7  2002-05-09 08:28:23  carl
+  * Merges from Fixes branch
 
-  Revision 1.4  2001/08/05 12:23:57  peter
-    * fixed for new input_record
+  Revision 1.2.2.5  2002/01/25 23:12:38  pierre
+   * fix bugs from web 1602
 
   Revision 1.2.2.4  2001/09/21 21:20:43  michael
   + Added support for keyboard driver.
@@ -799,8 +840,8 @@ end.
   Revision 1.2.2.2  2001/02/05 15:30:06  pierre
    * fix compiliing with -dDEBUG
 
-  Revision 1.3  2001/05/20 12:08:17  peter
-    * fixed to compile with debug
+  Revision 1.2.2.1  2001/01/30 21:52:03  peter
+    * moved api utils to rtl
 
   Revision 1.2  2001/01/14 22:20:00  peter
     * slightly optimized event handling (merged)

+ 2 - 9
rtl/win32/signals.pp

@@ -1,6 +1,3 @@
-{
-  $Id$
-}
 unit signals;
 
 interface
@@ -319,6 +316,8 @@ var
          EXCEPTION_PRIV_INSTRUCTION,
          EXCEPTION_IN_PAGE_ERROR,
          EXCEPTION_SINGLE_STEP : res:=CallSignal(SIGSEGV,frame,false);
+         { Ignore EXCEPTION_INVALID_HANDLE exceptions }
+         EXCEPTION_INVALID_HANDLE : res:=0;
          end;
        Signals_exception_handler:=res;
     end;
@@ -465,9 +464,3 @@ finalization
 
   remove_exception_handler;
 end.
-{
-  $Log$
-  Revision 1.4  2002-01-25 16:23:03  peter
-    * merged filesearch() fix
-
-}

+ 6 - 3
rtl/win32/sysutils.pp

@@ -532,8 +532,8 @@ begin
   else
     HF:='hh';
   // No support for 12 hour stuff at the moment...
-  ShortTimeFormat := HF+':mm';
-  LongTimeFormat := HF + ':mm:ss';
+  ShortTimeFormat := HF+':nn';
+  LongTimeFormat := HF + ':nn:ss';
   { Currency stuff }
   CurrencyString:=GetLocaleStr(LID, LOCALE_SCURRENCY, '');
   CurrencyFormat:=StrToIntDef(GetLocaleStr(LID, LOCALE_ICURRENCY, '0'), 0);
@@ -655,7 +655,10 @@ Finalization
 end.
 {
   $Log$
-  Revision 1.13  2002-03-24 19:26:49  marco
+  Revision 1.14  2002-05-09 08:28:23  carl
+  * Merges from Fixes branch
+
+  Revision 1.13  2002/03/24 19:26:49  marco
    * Added win32platform
 
   Revision 1.12  2002/01/25 16:23:04  peter

+ 10 - 1
rtl/win32/win32.inc

@@ -53,6 +53,12 @@ const
    FILE_BEGIN = 0;
    FILE_CURRENT = 1;
    FILE_END = 2;
+   
+   { GetFileType  }
+   FILE_TYPE_UNKNOWN = 0;
+   FILE_TYPE_DISK = 1;
+   FILE_TYPE_CHAR = 2;
+   FILE_TYPE_PIPE = 3;
 
    VER_PLATFORM_WIN32s = 0;
    VER_PLATFORM_WIN32_WINDOWS = 1;
@@ -120,7 +126,10 @@ type
 
 {
   $Log$
-  Revision 1.7  2001-12-02 17:21:25  peter
+  Revision 1.8  2002-05-09 08:28:23  carl
+  * Merges from Fixes branch
+
+  Revision 1.7  2001/12/02 17:21:25  peter
     * merged fixes from 1.0
 
   Revision 1.6  2001/07/30 14:53:17  marco

+ 46 - 7
rtl/win32/wininc/ascdef.inc

@@ -283,6 +283,8 @@ function EnumDisplaySettings(lpszDeviceName:LPCSTR; iModeNum:DWORD; lpDevMode:LP
 function SystemParametersInfo(uiAction:UINT; uiParam:UINT; pvParam:PVOID; fWinIni:UINT):WINBOOL; external 'user32' name 'SystemParametersInfoA';
 function AddFontResource(_para1:LPCSTR):longint; external 'gdi32' name 'AddFontResourceA';
 function CopyMetaFile(_para1:HMETAFILE; _para2:LPCSTR):HMETAFILE; external 'gdi32' name 'CopyMetaFileA';
+function CreateFont(_para1:longint; _para2:longint; _para3:longint; _para4:longint; _para5:longint;_para6:DWORD; _para7:DWORD; _para8:DWORD; _para9:DWORD; _para10:DWORD;_para11:DWORD; _para12:DWORD; _para13:DWORD; _para14:LPCWSTR):HFONT;
+external 'gdi32' name 'CreateFontA';
 function CreateFontIndirect(_para1:LPLOGFONT):HFONT; external 'gdi32' name 'CreateFontIndirectA';
 function CreateIC(_para1:LPCSTR; _para2:LPCSTR; _para3:LPCSTR; _para4:LPDEVMODE):HDC; external 'gdi32' name 'CreateICA';
 function CreateMetaFile(_para1:LPCSTR):HDC; external 'gdi32' name 'CreateMetaFileA';
@@ -488,13 +490,50 @@ end;
 
 {
   $Log$
-  Revision 1.4  2002-01-19 11:58:20  peter
-    * more functions from webbugs
+  Revision 1.5  2002-05-09 08:31:43  carl
+  * Merges from Fixes branch
 
-  Revision 1.3  2000/10/11 16:05:55  peter
-    * stdcall for callbacks (merged)
+  Revision 1.1.2.3  2002/01/19 11:48:20  peter
+    * more functions added from webbugs
+
+  Revision 1.1.2.2  2001/04/16 23:08:20  pierre
+   * fixes for bug 1473
+
+  Revision 1.1.2.1  2000/10/02 22:15:40  pierre
+   * all callbacks are stdcall functions
+
+  Revision 1.1  2000/07/13 06:31:22  michael
+  + Initial import
+
+  Revision 1.11  2000/06/16 13:35:07  pierre
+   * GetFullPathName was wrong
+
+  Revision 1.10  2000/06/15 11:26:57  pierre
+    * avoid lines longer than 255 chars
+    + add smartlink on by default, if not version 0.99.14
+    * some functions not present in win95 DLL's are now only inserted if
+      smartlink is on.
+
+  Revision 1.9  2000/06/14 19:24:58  peter
+    * removed more var stuff which is now in redef
+
+  Revision 1.6  2000/06/11 07:04:58  peter
+    * Windows unit has now more Delphi compatibile functions
+    * placed the external functions only in the interface
+
+  Revision 1.5  2000/03/20 23:44:43  alex
+   + added overlaoded PeekMessage fundtion for delphi compatibility
+
+  Revision 1.4  2000/02/09 16:59:35  peter
+    * truncated log
+
+  Revision 1.3  2000/01/07 16:41:54  daniel
+    * copyright 2000
+
+  Revision 1.2  1999/09/28 22:30:00  peter
+    * fixed createdc to be D4 compatible
+
+  Revision 1.1  1999/09/16 13:38:22  peter
+    * windows unit include moved to wininc/
 
-  Revision 1.2  2000/07/13 11:33:58  michael
-  + removed logs
- 
 }

+ 46 - 7
rtl/win32/wininc/ascfun.inc

@@ -283,6 +283,8 @@ function EnumDisplaySettingsA(lpszDeviceName:LPCSTR; iModeNum:DWORD; lpDevMode:L
 function SystemParametersInfoA(uiAction:UINT; uiParam:UINT; pvParam:PVOID; fWinIni:UINT):WINBOOL; external 'user32' name 'SystemParametersInfoA';
 function AddFontResourceA(_para1:LPCSTR):longint; external 'gdi32' name 'AddFontResourceA';
 function CopyMetaFileA(_para1:HMETAFILE; _para2:LPCSTR):HMETAFILE; external 'gdi32' name 'CopyMetaFileA';
+function CreateFontA(_para1:longint; _para2:longint; _para3:longint; _para4:longint; _para5:longint;_para6:DWORD; _para7:DWORD; _para8:DWORD; _para9:DWORD; _para10:DWORD;_para11:DWORD; _para12:DWORD; _para13:DWORD; _para14:LPCWSTR):HFONT;
+external 'gdi32' name 'CreateFontA';
 function CreateFontIndirectA(_para1:LPLOGFONT):HFONT; external 'gdi32' name 'CreateFontIndirectA';
 function CreateICA(_para1:LPCSTR; _para2:LPCSTR; _para3:LPCSTR; _para4:LPDEVMODE):HDC; external 'gdi32' name 'CreateICA';
 function CreateMetaFileA(_para1:LPCSTR):HDC; external 'gdi32' name 'CreateMetaFileA';
@@ -489,13 +491,50 @@ end;
 
 {
   $Log$
-  Revision 1.4  2002-01-19 11:58:20  peter
-    * more functions from webbugs
+  Revision 1.5  2002-05-09 08:31:43  carl
+  * Merges from Fixes branch
 
-  Revision 1.3  2000/10/11 16:05:56  peter
-    * stdcall for callbacks (merged)
+  Revision 1.1.2.3  2002/01/19 11:48:20  peter
+    * more functions added from webbugs
+
+  Revision 1.1.2.2  2001/04/16 23:08:21  pierre
+   * fixes for bug 1473
+
+  Revision 1.1.2.1  2000/10/02 22:15:40  pierre
+   * all callbacks are stdcall functions
+
+  Revision 1.1  2000/07/13 06:31:23  michael
+  + Initial import
+
+  Revision 1.9  2000/06/16 13:35:07  pierre
+   * GetFullPathName was wrong
+
+  Revision 1.8  2000/06/15 11:26:58  pierre
+    * avoid lines longer than 255 chars
+    + add smartlink on by default, if not version 0.99.14
+    * some functions not present in win95 DLL's are now only inserted if
+      smartlink is on.
+
+  Revision 1.7  2000/06/14 19:24:58  peter
+    * removed more var stuff which is now in redef
+
+  Revision 1.6  2000/06/11 07:04:58  peter
+    * Windows unit has now more Delphi compatibile functions
+    * placed the external functions only in the interface
+
+  Revision 1.5  2000/03/20 23:44:43  alex
+   + added overlaoded PeekMessage fundtion for delphi compatibility
+
+  Revision 1.4  2000/02/09 16:59:35  peter
+    * truncated log
+
+  Revision 1.3  2000/01/07 16:41:54  daniel
+    * copyright 2000
+
+  Revision 1.2  1999/09/28 22:30:00  peter
+    * fixed createdc to be D4 compatible
+
+  Revision 1.1  1999/09/16 13:38:22  peter
+    * windows unit include moved to wininc/
 
-  Revision 1.2  2000/07/13 11:33:58  michael
-  + removed logs
- 
 }

+ 46 - 7
rtl/win32/wininc/defines.inc

@@ -539,9 +539,12 @@
      DEFAULT_QUALITY = 0;
      DRAFT_QUALITY = 1;
      PROOF_QUALITY = 2;
+     NONANTIALIASED_QUALITY = 3;
+     ANTIALIASED_QUALITY = 4;
      DEFAULT_PITCH = 0;
      FIXED_PITCH = 1;
      VARIABLE_PITCH = 2;
+     MONO_FONT = 8;
      FF_DECORATIVE = 80;
      FF_DONTCARE = 0;
      FF_MODERN = 48;
@@ -710,6 +713,7 @@
      BS_TOP = $400;
      BS_USERBUTTON = $8;
      BS_VCENTER = $c00;
+     BS_FLAT = $8000;
      CBS_AUTOHSCROLL = $40;
      CBS_DISABLENOSCROLL = $800;
      CBS_DROPDOWN = $2;
@@ -4746,12 +4750,13 @@
      BI_BITFIELDS = 3;
   { Extensions to OpenGL  }
   { ChoosePixelFormat  }
+     PFD_DOUBLEBUFFER = $1;
+     PFD_STEREO = $2;
      PFD_DRAW_TO_WINDOW = $4;
      PFD_DRAW_TO_BITMAP = $8;
      PFD_SUPPORT_GDI = $10;
      PFD_SUPPORT_OPENGL = $20;
-     PFD_DOUBLEBUFFER = $1;
-     PFD_STEREO = $2;
+     PFD_DEPTH_DONTCARE = $20000000;
      PFD_DOUBLEBUFFER_DONTCARE = $40000000;
      PFD_STEREO_DONTCARE = $80000000;
      PFD_TYPE_RGBA = 0;
@@ -4767,8 +4772,11 @@
      PFD_GENERIC_FORMAT = $40;
      PFD_NEED_PALETTE = $80;
      PFD_NEED_SYSTEM_PALETTE = $100;
-     PFD_SWAP_COPY = $400;
      PFD_SWAP_EXCHANGE = $200;
+     PFD_SWAP_COPY = $400;
+     PFD_SWAP_LAYER_BUFFERS = $800;
+     PFD_GENERIC_ACCELERATED = $1000;
+     PFD_SUPPORT_DIRECTDRAW = $2000;
   { TEXTMETRIC structure  }
      TMPF_FIXED_PITCH = $1;
      TMPF_VECTOR = $2;
@@ -5723,13 +5731,44 @@ const
 
 {
   $Log$
-  Revision 1.4  2001-02-09 23:08:31  peter
+  Revision 1.5  2002-05-09 08:31:43  carl
+  * Merges from Fixes branch
+
+  Revision 1.1.2.5  2002/01/20 23:24:20  pierre
+   + add ANTIALIASED_QUALITY bug report 1695
+
+  Revision 1.1.2.4  2001/09/04 01:26:59  carl
+  + added missing PFD_ flags
+
+  Revision 1.1.2.3  2001/04/16 23:08:21  pierre
+   * fixes for bug 1473
+
+  Revision 1.1.2.2  2001/02/09 23:09:21  peter
     * fixed bugs 1398,1399,1400
 
-  Revision 1.3  2000/12/30 22:40:45  peter
+  Revision 1.1.2.1  2000/12/30 22:39:59  peter
     * added cds_fullscreen
 
-  Revision 1.2  2000/07/13 11:33:59  michael
-  + removed logs
+  Revision 1.1  2000/07/13 06:31:23  michael
+  + Initial import
+
+  Revision 1.6  2000/06/11 07:04:58  peter
+    * Windows unit has now more Delphi compatibile functions
+    * placed the external functions only in the interface
+
+  Revision 1.5  2000/03/14 10:20:19  michael
+  + Added constants and types for Delphi compatibility
+
+  Revision 1.4  2000/02/09 16:59:35  peter
+    * truncated log
+
+  Revision 1.3  2000/01/07 16:41:54  daniel
+    * copyright 2000
+
+  Revision 1.2  2000/01/07 16:32:35  daniel
+    * copyright 2000 added
+
+  Revision 1.1  1999/09/16 13:38:22  peter
+    * windows unit include moved to wininc/
 
 }

+ 132 - 18
rtl/win32/wininc/func.inc

@@ -521,9 +521,9 @@ function TrackPopupMenu(hMenu:HMENU; uFlags:UINT; x:longint; y:longint; nReserve
 function GetMenuDefaultItem(hMenu:HMENU; fByPos:UINT; gmdiFlags:UINT):UINT; external 'user32' name 'GetMenuDefaultItem';
 function SetMenuDefaultItem(hMenu:HMENU; uItem:UINT; fByPos:UINT):WINBOOL; external 'user32' name 'SetMenuDefaultItem';
 function GetMenuItemRect(hWnd:HWND; hMenu:HMENU; uItem:UINT; lprcItem:LPRECT):WINBOOL; external 'user32' name 'GetMenuItemRect';
-function MenuItemFromPoint(hWnd:HWND; hMenu:HMENU; ptScreen:POINT):longint; external 'user32' name 'MenuItemFromPoint';
+function MenuItemFromPoint(hWnd:HWND; hMenu:HMENU; ptScreen:POINT):longint; {external 'user32' name 'MenuItemFromPoint';bug 1807 }
 function DragObject(_para1:HWND; _para2:HWND; _para3:UINT; _para4:DWORD; _para5:HCURSOR):DWORD; external 'user32' name 'DragObject';
-function DragDetect(hwnd:HWND; pt:POINT):WINBOOL; external 'user32' name 'DragDetect';
+function DragDetect(hwnd:HWND; pt:POINT):WINBOOL; {external 'user32' name 'DragDetect';bug 1807 }
 function DrawIcon(hDC:HDC; X:longint; Y:longint; hIcon:HICON):WINBOOL; external 'user32' name 'DrawIcon';
 function UpdateWindow(hWnd:HWND):WINBOOL; external 'user32' name 'UpdateWindow';
 function SetActiveWindow(hWnd:HWND):HWND; external 'user32' name 'SetActiveWindow';
@@ -586,8 +586,8 @@ function GetCaretPos(lpPoint:LPPOINT):WINBOOL; external 'user32' name 'GetCaretP
 function ClientToScreen(hWnd:HWND; lpPoint:LPPOINT):WINBOOL; external 'user32' name 'ClientToScreen';
 function ScreenToClient(hWnd:HWND; lpPoint:LPPOINT):WINBOOL; external 'user32' name 'ScreenToClient';
 function MapWindowPoints(hWndFrom:HWND; hWndTo:HWND; lpPoints:LPPOINT; cPoints:UINT):longint; external 'user32' name 'MapWindowPoints';
-function WindowFromPoint(Point:POINT):HWND; external 'user32' name 'WindowFromPoint';
-function ChildWindowFromPoint(hWndParent:HWND; Point:POINT):HWND; external 'user32' name 'ChildWindowFromPoint';
+function WindowFromPoint(Point:POINT):HWND; { external 'user32' name 'WindowFromPoint';bug 1807 }
+function ChildWindowFromPoint(hWndParent:HWND; Point:POINT):HWND; { external 'user32' name 'ChildWindowFromPoint';bug 1807 }
 function GetSysColor(nIndex:longint):DWORD; external 'user32' name 'GetSysColor';
 function GetSysColorBrush(nIndex:longint):HBRUSH; external 'user32' name 'GetSysColorBrush';
 function SetSysColors(cElements:longint; var lpaElements:wINT; var lpaRgbValues:COLORREF):WINBOOL; external 'user32' name 'SetSysColors';
@@ -605,7 +605,7 @@ function SubtractRect(lprcDst:LPRECT; var lprcSrc1:RECT; var lprcSrc2:RECT):WINB
 function OffsetRect(lprc:LPRECT; dx:longint; dy:longint):WINBOOL; external 'user32' name 'OffsetRect';
 function IsRectEmpty(var lprc:RECT):WINBOOL; external 'user32' name 'IsRectEmpty';
 function EqualRect(var lprc1:RECT; var lprc2:RECT):WINBOOL; external 'user32' name 'EqualRect';
-function PtInRect(var lprc:RECT; pt:POINT):WINBOOL; external 'user32' name 'PtInRect';
+function PtInRect(var lprc:RECT; pt:POINT):WINBOOL; {external 'user32' name 'PtInRect';bug 1807 }
 function GetWindowWord(hWnd:HWND; nIndex:longint):WORD; external 'user32' name 'GetWindowWord';
 function SetWindowWord(hWnd:HWND; nIndex:longint; wNewWord:WORD):WORD; external 'user32' name 'SetWindowWord';
 function GetClassWord(hWnd:HWND; nIndex:longint):WORD; external 'user32' name 'GetClassWord';
@@ -616,7 +616,7 @@ function SetParent(hWndChild:HWND; hWndNewParent:HWND):HWND; external 'user32' n
 function EnumChildWindows(hWndParent:HWND; lpEnumFunc:ENUMWINDOWSPROC; lParam:LPARAM):WINBOOL; external 'user32' name 'EnumChildWindows';
 function EnumWindows(lpEnumFunc:ENUMWINDOWSPROC; lParam:LPARAM):WINBOOL; external 'user32' name 'EnumWindows';
 function EnumThreadWindows(dwThreadId:DWORD; lpfn:ENUMWINDOWSPROC; lParam:LPARAM):WINBOOL; external 'user32' name 'EnumThreadWindows';
-function EnumTaskWindows(hTask:HWND; lpfn:FARPROC; lParam: LPARAM): BOOL;external 'user32' name 'EnumTaskWindows';
+function EnumTaskWindows(hTask:HWND; lpfn:FARPROC; lParam: LPARAM): BOOL;external 'user32' name 'EnumThreadWindows';
 function GetTopWindow(hWnd:HWND):HWND; external 'user32' name 'GetTopWindow';
 function GetWindowThreadProcessId(hWnd:HWND; lpdwProcessId:LPDWORD):DWORD; external 'user32' name 'GetWindowThreadProcessId';
 function GetLastActivePopup(hWnd:HWND):HWND; external 'user32' name 'GetLastActivePopup';
@@ -652,7 +652,7 @@ function DrawFrameControl(_para1:HDC; _para2:LPRECT; _para3:UINT; _para4:UINT):W
 function DrawCaption(_para1:HWND; _para2:HDC; var _para3:RECT; _para4:UINT):WINBOOL; external 'user32' name 'DrawCaption';
 function DrawAnimatedRects(hwnd:HWND; idAni:longint; var lprcFrom:RECT; var lprcTo:RECT):WINBOOL; external 'user32' name 'DrawAnimatedRects';
 function TrackPopupMenuEx(_para1:HMENU; _para2:UINT; _para3:longint; _para4:longint; _para5:HWND;_para6:LPTPMPARAMS):WINBOOL; external 'user32' name 'TrackPopupMenuEx';
-function ChildWindowFromPointEx(_para1:HWND; _para2:POINT; _para3:UINT):HWND; external 'user32' name 'ChildWindowFromPointEx';
+function ChildWindowFromPointEx(_para1:HWND; _para2:POINT; _para3:UINT):HWND; {external 'user32' name 'ChildWindowFromPointEx';}
 function DrawIconEx(hdc:HDC; xLeft:longint; yTop:longint; hIcon:HICON; cxWidth:longint;cyWidth:longint; istepIfAniCur:UINT; hbrFlickerFreeDraw:HBRUSH; diFlags:UINT):WINBOOL; external 'user32' name 'DrawIconEx';
 function AnimatePalette(_para1:HPALETTE; _para2:UINT; _para3:UINT; var _para4:PALETTEENTRY):WINBOOL; external 'gdi32' name 'AnimatePalette';
 function Arc(_para1:HDC; _para2:longint; _para3:longint; _para4:longint; _para5:longint;_para6:longint; _para7:longint; _para8:longint; _para9:longint):WINBOOL; external 'gdi32' name 'Arc';
@@ -916,7 +916,7 @@ function ShowHideMenuCtl(hWnd:HWND; uFlags:UINT; lpInfo:LPINT):WINBOOL; external
 procedure GetEffectiveClientRect(hWnd:HWND; lprc:LPRECT; lpInfo:LPINT); external 'comctl32' name 'GetEffectiveClientRect';
 function MakeDragList(hLB:HWND):WINBOOL; external 'comctl32' name 'MakeDragList';
 procedure DrawInsert(handParent:HWND; hLB:HWND; nItem:longint); external 'comctl32' name 'DrawInsert';
-function LBItemFromPt(hLB:HWND; pt:POINT; bAutoScroll:WINBOOL):longint; external 'comctl32' name 'LBItemFromPt';
+function LBItemFromPt(hLB:HWND; pt:POINT; bAutoScroll:WINBOOL):longint; { external 'comctl32' name 'LBItemFromPt';}
 function CreateUpDownControl(dwStyle:DWORD; x:longint; y:longint; cx:longint; cy:longint;hParent:HWND; nID:longint; hInst:HINST; hBuddy:HWND; nUpper:longint;nLower:longint; nPos:longint):HWND; external 'comctl32' name 'CreateUpDownControl';
 function RegCloseKey(hKey:HKEY):LONG; external 'advapi32' name 'RegCloseKey';
 function RegSetKeySecurity(hKey:HKEY; SecurityInformation:SECURITY_INFORMATION; pSecurityDescriptor:PSECURITY_DESCRIPTOR):LONG; external 'advapi32' name 'RegSetKeySecurity';
@@ -991,7 +991,8 @@ function DuplicateIcon(_para1:HINST; _para2:HICON):HICON; external 'shell32' nam
 function DdeAbandonTransaction(_para1:DWORD; _para2:HCONV; _para3:DWORD):BOOL;external 'user32' name 'DdeAbandonTransaction';
 function DdeAccessData(_para1:HDDEDATA; _para2:PDWORD):PBYTE;external 'user32' name 'DdeAccessData';
 function DdeAddData(_para1:HDDEDATA; _para2:PBYTE; _para3:DWORD; _para4:DWORD):HDDEDATA;external 'user32' name 'DdeAddData';
-function DdeCallback(_para1, _para2:UINT; _para3:HCONV; _para4, _para5:HSZ;_para6: HDDEDATA; _para7, _para8:PDWORD):HDDEDATA;external 'user32' name 'DdeCallback';
+{ This is only a prototype PM
+function DdeCallback(_para1, _para2:UINT; _para3:HCONV; _para4, _para5:HSZ;_para6: HDDEDATA; _para7, _para8:PDWORD):HDDEDATA;external 'user32' name 'DdeCallback';}
 function DdeClientTransaction(_para1:PBYTE; _para2:DWORD; _para3:HCONV; _para4:HSZ; _para5:UINT;
            _para6:UINT; _para7:DWORD; _para8:PDWORD):HDDEDATA;external 'user32' name 'DdeClientTransaction';
 function DdeCmpStringHandles(_para1:HSZ; _para2:HSZ):longint; external 'user32' name 'DdeCmpStringHandles';
@@ -1032,6 +1033,9 @@ function SHGetFileInfo(_para1:LPCTSTR; _para2:DWORD; var _para3:SHFILEINFO; _par
 function SHGetPathFromIDList(_para1:LPCITEMIDLIST; _para2:LPTSTR):WINBOOL; external 'shell32' name 'SHGetPathFromIDList';
 function SHGetSpecialFolderLocation(_para1:HWND; _para2:longint; var _para3:LPITEMIDLIST):HRESULT; external 'shell32' name 'SHGetSpecialFolderLocation';
 
+{ was missing, bug report 1808 PM }
+function CommDlgExtendedError : DWORD; external 'comdlg32' name 'CommDlgExtendedError';
+
 { translated macro's }
 function Animate_Create(hWndP:HWND; id:HMENU;dwStyle:DWORD;hInstance:HINST):HWND;
 function Animate_Open(hwnd : HWND;szName : LPTSTR) : LRESULT;
@@ -1209,6 +1213,64 @@ function GlobalPtrHandle(lp:pointer):Pointer;
 
 {$ifdef read_implementation}
 
+{ Win32 API calling convention
+  pushes POINT struct passed by value directly
+  on stack instead of just pushing an address
+  to overcome this we use a internal function
+  that just pushes the two arguments.
+  Bug report 1807. PM }
+
+function Internal_MenuItemFromPoint(hWnd:HWND; hMenu:HMENU; ptScreenX, ptScreenY : LONG):longint; external 'user32' name 'MenuItemFromPoint';
+
+function MenuItemFromPoint(hWnd:HWND; hMenu:HMENU; ptScreen:POINT):longint; {external 'user32' name 'MenuItemFromPoint';}
+begin
+  MenuItemFromPoint:=Internal_MenuItemFromPoint(hWnd, hMenu, ptScreen.X, ptScreen.Y);
+end;
+
+function Internal_DragDetect(hwnd:HWND; ptX, ptY : LONG):WINBOOL; external 'user32' name 'DragDetect';
+
+function DragDetect(hwnd:HWND; pt:POINT):WINBOOL; {external 'user32' name 'DragDetect';}
+begin
+  DragDetect:=Internal_DragDetect(hWnd, pt.X, pt.Y);
+end;
+
+function Internal_WindowFromPoint(PointX,PointY : LONG):HWND; external 'user32' name 'WindowFromPoint';
+
+function WindowFromPoint(Point:POINT):HWND;
+begin
+  WindowFromPoint:=Internal_WindowFromPoint(Point.X, Point.Y);
+end;
+
+function Internal_ChildWindowFromPoint(hWndParent:HWND; PointX,PointY : LONG):HWND; external 'user32' name 'ChildWindowFromPoint';
+
+function ChildWindowFromPoint(hWndParent:HWND; Point:POINT):HWND;
+begin
+  ChildWindowFromPoint:=Internal_ChildWindowFromPoint(hWndParent, Point.X, Point.Y);
+end;
+
+function Internal_PtInRect(var lprc:RECT; ptX,ptY : LONG):WINBOOL; external 'user32' name 'PtInRect';
+
+function PtInRect(var lprc:RECT; pt:POINT):WINBOOL;
+begin
+  PtInRect:=Internal_PtInRect(lprc,pt.X,pt.Y);
+end;
+
+function Internal_ChildWindowFromPointEx(_para1:HWND; _para2X,_Para2Y : LONG; _para3:UINT):HWND; external 'user32' name 'ChildWindowFromPointEx';
+
+function ChildWindowFromPointEx(_para1:HWND; _para2:POINT; _para3:UINT):HWND;
+begin
+  ChildWindowFromPointEx:=Internal_ChildWindowFromPointEx(_para1,_para2.X,_para2.Y,_para3);
+end;
+
+function Internal_LBItemFromPt(hLB:HWND; ptX, ptY : LONG; bAutoScroll:WINBOOL):longint; external 'comctl32' name 'LBItemFromPt';
+
+function LBItemFromPt(hLB:HWND; pt:POINT; bAutoScroll:WINBOOL):longint; { external 'comctl32' name 'LBItemFromPt';}
+begin
+  LBItemFromPt:=Internal_LBItemFromPt(hLB, pt.X, pt.Y, bAutoScroll);
+end;
+
+{ End of bug fixes for bug report 1807. PM }
+
 function GlobalDiscard(hglbMem:HGLOBAL):HGLOBAL;
 begin
   GlobalDiscard:=GlobalReAlloc(hglbMem,0,GMEM_MOVEABLE);
@@ -2226,19 +2288,71 @@ end;
 
 {
   $Log$
-  Revision 1.6  2002-01-19 11:58:20  peter
-    * more functions from webbugs
+  Revision 1.7  2002-05-09 08:31:44  carl
+  * Merges from Fixes branch
+
+  Revision 1.1.2.8  2002/02/18 23:46:21  pierre
+   * add a workaround for bug 1807
+
+  Revision 1.1.2.7  2002/02/15 08:42:20  pierre
+   * fix bug 1808
 
-  Revision 1.5  2001/06/13 18:32:55  peter
-    * fixed crash within donevideo (merged)
+  Revision 1.1.2.6  2002/01/21 09:02:34  pierre
+   * fix correctly bug 1398
 
-  Revision 1.4  2001/02/09 23:08:31  peter
+  Revision 1.1.2.5  2002/01/19 11:48:20  peter
+    * more functions added from webbugs
+
+  Revision 1.1.2.4  2001/06/12 22:27:32  pierre
+   * fix web bug 1520
+
+  Revision 1.1.2.3  2001/02/09 23:09:21  peter
     * fixed bugs 1398,1399,1400
 
-  Revision 1.3  2001/02/02 20:53:18  peter
-    * merged fix for bug 1375
+  Revision 1.1.2.2  2001/02/01 23:49:02  pierre
+   * fix for bug 1375
+
+  Revision 1.1.2.1  2000/07/15 21:16:38  pierre
+   * DdeCallBack is only a prototype
+
+  Revision 1.1  2000/07/13 06:31:24  michael
+  + Initial import
+
+  Revision 1.11  2000/06/29 06:46:37  michael
+  + Added ddecallack
+
+  Revision 1.10  2000/06/15 19:56:12  pierre
+   * fix for bug 969: missing DDE functions
+
+  Revision 1.9  2000/06/15 11:26:58  pierre
+    * avoid lines longer than 255 chars
+    + add smartlink on by default, if not version 0.99.14
+    * some functions not present in win95 DLL's are now only inserted if
+      smartlink is on.
+
+  Revision 1.8  2000/06/11 07:04:59  peter
+    * Windows unit has now more Delphi compatibile functions
+    * placed the external functions only in the interface
+
+  Revision 1.7  2000/05/25 12:57:22  pierre
+   + DdeFreeStringHandle was missing
+
+  Revision 1.6  2000/03/19 20:29:06  marco
+   * some stuff for JCL
+
+  Revision 1.5  2000/02/09 16:59:35  peter
+    * truncated log
+
+  Revision 1.4  2000/01/07 16:41:55  daniel
+    * copyright 2000
+
+  Revision 1.3  2000/01/07 16:32:36  daniel
+    * copyright 2000 added
+
+  Revision 1.2  1999/10/26 09:38:51  pierre
+   + some Delphi overload added
 
-  Revision 1.2  2000/07/13 11:33:59  michael
-  + removed logs
+  Revision 1.1  1999/09/16 13:38:22  peter
+    * windows unit include moved to wininc/
 
 }