diff options
author | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2007-06-25 20:23:24 +0000 |
---|---|---|
committer | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2007-06-25 20:23:24 +0000 |
commit | 95933530253876928bdd04b86243bb5cf6d7e20c (patch) | |
tree | fed9a5a7b9ebd9b6734e009a20b842b8d5f47039 | |
parent | 7563e675d59fc5b2520e34f9dda6c2a79c4db3ea (diff) | |
download | fpc-95933530253876928bdd04b86243bb5cf6d7e20c.tar.gz |
+ added and fixed some delphi compatibility stuff
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@7813 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r-- | rtl/win/wininc/base.inc | 2 | ||||
-rw-r--r-- | rtl/win/wininc/defines.inc | 25 | ||||
-rw-r--r-- | rtl/win/wininc/redef.inc | 34 |
3 files changed, 60 insertions, 1 deletions
diff --git a/rtl/win/wininc/base.inc b/rtl/win/wininc/base.inc index fff4b86f93..a78d5e0eb1 100644 --- a/rtl/win/wininc/base.inc +++ b/rtl/win/wininc/base.inc @@ -556,6 +556,8 @@ TFarProc = FARPROC; + TFNWndProc = TFarProc; + PROC = FARPROC; ENUMRESTYPEPROC = function (_para1:HANDLE; _para2:LPTSTR; _para3:LONG):WINBOOL;stdcall; diff --git a/rtl/win/wininc/defines.inc b/rtl/win/wininc/defines.inc index aed1f91839..5191056c46 100644 --- a/rtl/win/wininc/defines.inc +++ b/rtl/win/wininc/defines.inc @@ -4483,6 +4483,17 @@ SW_OTHERZOOM = 2; SW_PARENTCLOSING = 1; 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 } VK_LBUTTON = 1; VK_RBUTTON = 2; @@ -4679,6 +4690,16 @@ HTTRANSPARENT = -(1); HTVSCROLL = 7; HTZOOM = 9; + + HTBORDER = 18; + HTSIZEFIRST = HTLEFT; + HTSIZELAST = HTBOTTOMRIGHT; + HTOBJECT = 19; + HTCLOSE = 20; + HTHELP = 21; + HTMINBUTTON = HTREDUCE; + HTMAXBUTTON = HTZOOM; + { Mouse messages } MK_CONTROL = 8; MK_LBUTTON = 1; @@ -4699,6 +4720,10 @@ CS_PARENTDC = 128; CS_SAVEBITS = 2048; CS_VREDRAW = 1; + + CS_IME = $10000; + CS_DROPSHADOW = $20000; + DLGWINDOWEXTRA = 30; { ACCEL structure } FALT = 16; diff --git a/rtl/win/wininc/redef.inc b/rtl/win/wininc/redef.inc index 4f0f778d73..0d7369564d 100644 --- a/rtl/win/wininc/redef.inc +++ b/rtl/win/wininc/redef.inc @@ -107,7 +107,6 @@ const { Some missing consts } SIF_TRACKPOS = $10; - HTBORDER = 18; CP_UTF7 = 65000; CP_UTF8 = 65001; CREATE_NO_WINDOW = $08000000; @@ -122,6 +121,18 @@ const VK_PA1 = 253; 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 { Severity values } 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 GetKeyboardState(var KeyState:TKeyboardState):WINBOOL; external 'user32' name 'GetKeyboardState'; 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} @@ -1118,5 +1132,23 @@ function GetCurrentTime: Longint;inline; begin Result:=GetTickCount; 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} |