Browse Source

+ added and fixed some delphi compatibility stuff

git-svn-id: trunk@7813 -
florian 18 years ago
parent
commit
201fc56655
3 changed files with 60 additions and 1 deletions
  1. 2 0
      rtl/win/wininc/base.inc
  2. 25 0
      rtl/win/wininc/defines.inc
  3. 33 1
      rtl/win/wininc/redef.inc

+ 2 - 0
rtl/win/wininc/base.inc

@@ -556,6 +556,8 @@
 
 
      TFarProc = FARPROC;
      TFarProc = FARPROC;
 
 
+     TFNWndProc = TFarProc;
+
      PROC = FARPROC;
      PROC = FARPROC;
 
 
      ENUMRESTYPEPROC = function (_para1:HANDLE; _para2:LPTSTR; _para3:LONG):WINBOOL;stdcall;
      ENUMRESTYPEPROC = function (_para1:HANDLE; _para2:LPTSTR; _para3:LONG):WINBOOL;stdcall;

+ 25 - 0
rtl/win/wininc/defines.inc

@@ -4483,6 +4483,17 @@
      SW_OTHERZOOM = 2;
      SW_OTHERZOOM = 2;
      SW_PARENTCLOSING = 1;
      SW_PARENTCLOSING = 1;
      SW_PARENTOPENING = 3;
      SW_PARENTOPENING = 3;
+
+     AW_HOR_POSITIVE = $00000001;
+     AW_HOR_NEGATIVE = $00000002;
+     AW_VER_POSITIVE = $00000004;
+     AW_VER_NEGATIVE = $00000008;
+     AW_CENTER = $00000010;
+     AW_HIDE = $00010000;
+     AW_ACTIVATE = $00020000;
+     AW_SLIDE = $00040000;
+     AW_BLEND = $00080000;
+
   { Virtual Key codes  }
   { Virtual Key codes  }
      VK_LBUTTON = 1;
      VK_LBUTTON = 1;
      VK_RBUTTON = 2;
      VK_RBUTTON = 2;
@@ -4679,6 +4690,16 @@
      HTTRANSPARENT = -(1);
      HTTRANSPARENT = -(1);
      HTVSCROLL = 7;
      HTVSCROLL = 7;
      HTZOOM = 9;
      HTZOOM = 9;
+
+     HTBORDER = 18;
+     HTSIZEFIRST = HTLEFT;
+     HTSIZELAST = HTBOTTOMRIGHT;
+     HTOBJECT = 19;
+     HTCLOSE = 20;
+     HTHELP = 21;
+     HTMINBUTTON = HTREDUCE;
+     HTMAXBUTTON = HTZOOM;
+
   { Mouse messages  }
   { Mouse messages  }
      MK_CONTROL = 8;
      MK_CONTROL = 8;
      MK_LBUTTON = 1;
      MK_LBUTTON = 1;
@@ -4699,6 +4720,10 @@
      CS_PARENTDC = 128;
      CS_PARENTDC = 128;
      CS_SAVEBITS = 2048;
      CS_SAVEBITS = 2048;
      CS_VREDRAW = 1;
      CS_VREDRAW = 1;
+
+     CS_IME = $10000;
+     CS_DROPSHADOW = $20000;
+
      DLGWINDOWEXTRA = 30;
      DLGWINDOWEXTRA = 30;
   { ACCEL structure  }
   { ACCEL structure  }
      FALT = 16;
      FALT = 16;

+ 33 - 1
rtl/win/wininc/redef.inc

@@ -107,7 +107,6 @@ const
 
 
   { Some missing consts }
   { Some missing consts }
   SIF_TRACKPOS = $10;
   SIF_TRACKPOS = $10;
-  HTBORDER = 18;
   CP_UTF7 = 65000;
   CP_UTF7 = 65000;
   CP_UTF8 = 65001;
   CP_UTF8 = 65001;
   CREATE_NO_WINDOW = $08000000;
   CREATE_NO_WINDOW = $08000000;
@@ -122,6 +121,18 @@ const
   VK_PA1 = 253;
   VK_PA1 = 253;
   VK_OEM_CLEAR = 254;
   VK_OEM_CLEAR = 254;
 
 
+  WHEEL_DELTA = 120;
+  WHEEL_PAGESCROLL = MAXDWORD;
+
+  MSH_MOUSEWHEEL   = 'MSWHEEL_ROLLMSG';
+  MOUSEZ_CLASSNAME = 'MouseZ';
+  MOUSEZ_TITLE     = 'Magellan MSWHEEL';
+  MSH_WHEELSUPPORT = 'MSH_WHEELSUPPORT_MSG';
+  MSH_SCROLL_LINES = 'MSH_SCROLL_LINES_MSG';
+
+  MSH_WHEELMODULE_CLASS = MOUSEZ_CLASSNAME;
+  MSH_WHEELMODULE_TITLE = MOUSEZ_TITLE;
+
 const
 const
   { Severity values }
   { Severity values }
   FACILITY_NT_BIT = $10000000;
   FACILITY_NT_BIT = $10000000;
@@ -989,6 +1000,9 @@ function AnsiLowerBuff(lpsz:LPSTR; cchLength:DWORD):DWORD; external 'user32' nam
 function CreateIcon(hInstance:HINST; nWidth:longint; nHeight:longint; cPlanes:BYTE; cBitsPixel:BYTE;lpbANDbits:pointer; lpbXORbits:pointer):HICON; external 'user32' name 'CreateIcon';
 function CreateIcon(hInstance:HINST; nWidth:longint; nHeight:longint; cPlanes:BYTE; cBitsPixel:BYTE;lpbANDbits:pointer; lpbXORbits:pointer):HICON; external 'user32' name 'CreateIcon';
 function GetKeyboardState(var KeyState:TKeyboardState):WINBOOL; external 'user32' name 'GetKeyboardState';
 function GetKeyboardState(var KeyState:TKeyboardState):WINBOOL; external 'user32' name 'GetKeyboardState';
 function SetKeyboardState(var KeyState:TKeyboardState):WINBOOL; external 'user32' name 'SetKeyboardState';
 function SetKeyboardState(var KeyState:TKeyboardState):WINBOOL; external 'user32' name 'SetKeyboardState';
+function GetWindowThreadProcessId(hWnd:HWND;var lpdwProcessId:DWORD):DWORD; external 'user32' name 'GetWindowThreadProcessId';
+function HwndMSWheel(var puiMsh_MsgMouseWheel, puiMsh_Msg3DSupport,puiMsh_MsgScrollLines: UINT;
+  var pf3DSupport: BOOL; var piScrollLines: Integer): HWND;
 {$endif read_interface}
 {$endif read_interface}
 
 
 
 
@@ -1118,5 +1132,23 @@ function GetCurrentTime: Longint;inline;
 begin
 begin
   Result:=GetTickCount;
   Result:=GetTickCount;
 end;
 end;
+
+function HwndMSWheel(var puiMsh_MsgMouseWheel, puiMsh_Msg3DSupport,puiMsh_MsgScrollLines: UINT;
+  var pf3DSupport: BOOL; var piScrollLines: Integer): HWND;
+begin
+  Result:=FindWindow(MSH_WHEELMODULE_CLASS, MSH_WHEELMODULE_TITLE);
+  puiMsh_MsgMouseWheel:=RegisterWindowMessage(MSH_MOUSEWHEEL);
+  puiMsh_Msg3DSupport:=RegisterWindowMessage(MSH_WHEELSUPPORT);
+  puiMsh_MsgScrollLines:=RegisterWindowMessage(MSH_SCROLL_LINES);
+  if (puiMsh_Msg3DSupport<>0) and (Result<>0) then
+    pf3DSupport:=BOOL(SendMessage(Result,puiMsh_Msg3DSupport,0,0))
+  else
+    pf3DSupport:=False;
+
+  if (puiMsh_MsgScrollLines<>0)  and (Result<>0) then
+    piScrollLines:=SendMessage(Result,puiMsh_MsgScrollLines,0,0)
+  else
+    piScrollLines:=3;
+end;
 {$endif read_implementation}
 {$endif read_implementation}