mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-08 17:42:19 +02:00
+ added and fixed some delphi compatibility stuff
git-svn-id: trunk@7813 -
This commit is contained in:
parent
a635bc2a15
commit
201fc56655
@ -556,6 +556,8 @@
|
||||
|
||||
TFarProc = FARPROC;
|
||||
|
||||
TFNWndProc = TFarProc;
|
||||
|
||||
PROC = FARPROC;
|
||||
|
||||
ENUMRESTYPEPROC = function (_para1:HANDLE; _para2:LPTSTR; _para3:LONG):WINBOOL;stdcall;
|
||||
|
@ -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;
|
||||
|
@ -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}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user