1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
unit win32compat;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Windows;
{$ifdef Win32}
{ From System.pas }
function SysAllocStringLen(psz:pointer;len:dword):pointer;stdcall;
external 'oleaut32.dll' name 'SysAllocStringLen';
procedure SysFreeString(bstr:pointer);stdcall;
external 'oleaut32.dll' name 'SysFreeString';
function SysReAllocStringLen(var bstr:pointer;psz: pointer;
len:dword): Integer; stdcall;external 'oleaut32.dll' name 'SysReAllocStringLen';
{ From Win32Int.pas }
type
PInitCommonControlsEx = ^TInitCommonControlsEx;
TInitCommonControlsEx = record
dwSize: dword;
dwICC: dword;
end;
var
InitCommonControlsEx: function(ICC: PInitCommonControlsEx): LongBool; stdcall;
{ From Win32Extras.pas }
const
// Comctl32 version:
// 4.70
LVS_EX_GRIDLINES = $00000001;
LVS_EX_SUBITEMIMAGES = $00000002;
LVS_EX_CHECKBOXES = $00000004;
LVS_EX_TRACKSELECT = $00000008;
LVS_EX_HEADERDRAGDROP = $00000010;
LVS_EX_FULLROWSELECT = $00000020;
LVS_EX_ONECLICKACTIVATE = $00000040;
LVS_EX_TWOCLICKACTIVATE = $00000080;
// 4.71
LVS_EX_FLATSB = $00000100;
LVS_EX_REGIONAL = $00000200;
LVS_EX_INFOTIP = $00000400;
LVS_EX_UNDERLINEHOT = $00000800;
LVS_EX_UNDERLINECOLD = $00001000;
LVS_EX_MULTIWORKAREAS = $00002000;
// 5.80
LVS_EX_LABELTIP = $00004000;
// 4.71
LVS_EX_BORDERSELECT = $00008000;
// 6
LVS_EX_DOUBLEBUFFER = $00010000; // TODO: investigate
// this may be a valid (ex) style message for other controls as well
// atleast the same value is used for controls on the .net framework
// coincidence ??
LVS_EX_HIDELABELS = $00020000;
LVS_EX_SINGLEROW = $00040000;
LVS_EX_SNAPTOGRID = $00080000;
LVS_EX_SIMPLESELECT = $00100000;
{ Tab Control Styles}
TCS_RIGHT = $0002;
TCS_BOTTOM = $0002;
TCS_VERTICAL = $0080;
TCS_MULTILINE = $0200;
{ From Windows.pas (adapted for win32) }
const
SYS_COLOR_INDEX_FLAG = 0;
{$endif}
implementation
initialization
{$ifdef Win32}
Pointer(InitCommonControlsEx) := GetProcAddress(GetModuleHandle(comctl32), 'InitCommonControlsEx');
{$endif}
end.
|