summaryrefslogtreecommitdiff
path: root/plugins/mRadio
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2012-10-10 09:06:13 +0000
committerKirill Volinsky <mataes2007@gmail.com>2012-10-10 09:06:13 +0000
commit1216b6c0235d6f55c29671c6b2b1074c8962da38 (patch)
treeda4617df8509d81c1751563a8da847872662a731 /plugins/mRadio
parent58a0d4659d4735f9d5c724f9d7c950e50565abf9 (diff)
mRadio moved to protocols
in fpc.cfg added pathes for protocols folder git-svn-id: http://svn.miranda-ng.org/main/trunk@1859 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/mRadio')
-rw-r--r--plugins/mRadio/activex.pp4173
-rw-r--r--plugins/mRadio/commctrl.pp13751
-rw-r--r--plugins/mRadio/i_bass.inc940
-rw-r--r--plugins/mRadio/i_cc.inc433
-rw-r--r--plugins/mRadio/i_frame.inc242
-rw-r--r--plugins/mRadio/i_frameapi.inc234
-rw-r--r--plugins/mRadio/i_hotkey.inc61
-rw-r--r--plugins/mRadio/i_myservice.inc178
-rw-r--r--plugins/mRadio/i_optdlg.inc962
-rw-r--r--plugins/mRadio/i_search.inc444
-rw-r--r--plugins/mRadio/i_service.inc241
-rw-r--r--plugins/mRadio/i_tray.inc228
-rw-r--r--plugins/mRadio/i_tray_api.inc125
-rw-r--r--plugins/mRadio/i_variables.inc82
-rw-r--r--plugins/mRadio/i_vars.inc184
-rw-r--r--plugins/mRadio/i_visual.inc115
-rw-r--r--plugins/mRadio/ico/delete.icobin2550 -> 0 bytes
-rw-r--r--plugins/mRadio/ico/mradio.icobin318 -> 0 bytes
-rw-r--r--plugins/mRadio/ico/new.icobin2550 -> 0 bytes
-rw-r--r--plugins/mRadio/ico/off.icobin2038 -> 0 bytes
-rw-r--r--plugins/mRadio/ico/on.icobin2038 -> 0 bytes
-rw-r--r--plugins/mRadio/ico/recoff.icobin1406 -> 0 bytes
-rw-r--r--plugins/mRadio/ico/recon.icobin1406 -> 0 bytes
-rw-r--r--plugins/mRadio/make.bat20
-rw-r--r--plugins/mRadio/mr_rc.inc87
-rw-r--r--plugins/mRadio/mradio.dpr350
-rw-r--r--plugins/mRadio/mradio.rc182
-rw-r--r--plugins/mRadio/mradio.resbin18720 -> 0 bytes
-rw-r--r--plugins/mRadio/proto_mradio/Proto_mRadio.vcxproj130
-rw-r--r--plugins/mRadio/proto_mradio/Proto_mRadio.vcxproj.filters23
-rw-r--r--plugins/mRadio/proto_mradio/res/proto_away.icobin2550 -> 0 bytes
-rw-r--r--plugins/mRadio/proto_mradio/res/proto_invisible.icobin2550 -> 0 bytes
-rw-r--r--plugins/mRadio/proto_mradio/res/proto_offline.icobin2550 -> 0 bytes
-rw-r--r--plugins/mRadio/proto_mradio/res/proto_online.icobin2550 -> 0 bytes
-rw-r--r--plugins/mRadio/proto_mradio/res/resource.rc37
-rw-r--r--plugins/mRadio/proto_mradio/src/resource.hbin1174 -> 0 bytes
-rw-r--r--plugins/mRadio/readme.txt147
-rw-r--r--plugins/mRadio/variants.pas7
38 files changed, 0 insertions, 23376 deletions
diff --git a/plugins/mRadio/activex.pp b/plugins/mRadio/activex.pp
deleted file mode 100644
index d36762ccf1..0000000000
--- a/plugins/mRadio/activex.pp
+++ /dev/null
@@ -1,4173 +0,0 @@
-Unit ActiveX;
-
-//+-------------------------------------------------------------------------
-//
-// Microsoft Windows
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//
-// File: objidl.idl
-//
-// Header translation by Marco van de Voort for Free Pascal Platform
-// SDK dl'ed January 2002
-//
-//--------------------------------------------------------------------------
-
-{$Mode objfpc}
-
-{$ifndef NO_SMART_LINK}
-{$smartlink on}
-{$endif}
-
-Interface
-
-Uses variants,Windows,ctypes,types;
-
-
-type
-{ extra types }
- TOleChar = Types.TOleChar;
- POleStr = Types.POleStr;
- PPOleStr = Types.PPOleStr;
- TBStr = POleStr;
- TBStrList = array[0..(high(integer) div sizeof(TBSTR))-1] of TBstr;
- PBStrList = ^TBStrList;
- POleStrList = ^TOleStrList;
- TOleStrList = array[0..(high(integer) div sizeof(POleStr))-1] of POleStr;
-
- PBStr = ^TBStr;
- TOleEnum = type LongWord;
- LargeInt = Types.LargeInt;
- LargeUInt = Types.LargeUInt;
- PLargeInt = Types.PLargeInt;
- PLargeUInt = Types.PLargeUInt;
- FMTID = TGUID;
- pFMTID = pGUID;
-
- { Glue types, should be linked to the proper windows unit types}
- Size_t = DWord; {??, probably, like Unix, typecastable to pointer?!?}
- OleChar = WChar;
- LPOLESTR = ^OLECHAR;
- POLECHAR = LPOLESTR;
- PLPOLESTR = ^LPOLESTR;
- PROPID = ULONG;
- TPROPID= PROPID;
- PPROPID= ^PROPID;
- VARIANT_BOOL = wordbool;
- _VARIANT_BOOL = VARIANT_BOOL;
- PVARIANT_BOOL = ^VARIANT_BOOL;
- CY = CURRENCY;
- DATE = DOUBLE;
- BSTR = POLESTR;
- TOleDate = DATE;
- POleDate = ^TOleDate;
- OLE_HANDLE = UINT;
- LPOLE_HANDLE = ^OLE_HANDLE;
- OLE_COLOR = DWORD;
- LPOLE_COLOR = ^OLE_COLOR;
- TOleHandle = OLE_HANDLE;
- POleHandle = LPOLE_HANDLE;
- TOleColor = OLE_COLOR;
- POleColor = LPOle_Color;
-
-CONST
- GUID_NULL : TGUID = '{00000000-0000-0000-0000-000000000000}';
-
- // bit flags for IExternalConnection
-CONST
- EXTCONN_STRONG = $0001; // strong connection
- EXTCONN_WEAK = $0002; // weak connection (table, container)
- EXTCONN_CALLABLE = $0004; // table .vs. callable
- {Bind Flags}
- BIND_MAYBOTHERUSER = 1;
- BIND_JUSTTESTEXISTENCE = 2;
-
-
- MKSYS_NONE = 0;
- MKSYS_GENERICCOMPOSITE = 1;
- MKSYS_FILEMONIKER = 2;
- MKSYS_ANTIMONIKER = 3;
- MKSYS_ITEMMONIKER = 4;
- MKSYS_POINTERMONIKER = 5;
-// MKSYS_URLMONIKER = 6;
- MKSYS_CLASSMONIKER = 7;
- MKSYS_OBJREFMONIKER = 8;
- MKSYS_SESSIONMONIKER = 9;
-
- // system moniker types; returned from IsSystemMoniker.
-
- MKRREDUCE_ONE = 3 SHL 16;
- MKRREDUCE_TOUSER = 2 SHL 16;
- MKRREDUCE_THROUGHUSER = 1 SHL 16;
- MKRREDUCE_ALL = 0;
-
- // Storage element types
- STGTY_STORAGE = 1;
- STGTY_STREAM = 2;
- STGTY_LOCKBYTES = 3;
- STGTY_PROPERTY = 4;
-
- STREAM_SEEK_SET = 0;
- STREAM_SEEK_CUR = 1;
- STREAM_SEEK_END = 2;
-
- LOCK_WRITE = 1;
- LOCK_EXCLUSIVE = 2;
- LOCK_ONLYONCE = 4;
-
- //Advise Flags
- ADVF_NODATA = 1;
- ADVF_PRIMEFIRST = 2;
- ADVF_ONLYONCE = 4;
- ADVF_DATAONSTOP = 64;
- ADVFCACHE_NOHANDLER = 8;
- ADVFCACHE_FORCEBUILTIN = 16;
- ADVFCACHE_ONSAVE = 32;
-
-
-//****************************************************************************
-//* Notification Interfaces
-//****************************************************************************/
-
- TYMED_HGLOBAL = 1;
- TYMED_FILE = 2;
- TYMED_ISTREAM = 4;
- TYMED_ISTORAGE = 8;
- TYMED_GDI = 16;
- TYMED_MFPICT = 32;
- TYMED_ENHMF = 64;
- TYMED_NULL = 0;
-
-// Object Definitions for EnumObjects()
- OBJ_PEN = 1;
- OBJ_BRUSH = 2;
- OBJ_DC = 3;
- OBJ_METADC = 4;
- OBJ_PAL = 5;
- OBJ_FONT = 6;
- OBJ_BITMAP = 7;
- OBJ_REGION = 8;
- OBJ_METAFILE = 9;
- OBJ_MEMDC = 10;
- OBJ_EXTPEN = 11;
- OBJ_ENHMETADC = 12;
- OBJ_ENHMETAFILE = 13;
- DATADIR_GET = 1;
- DATADIR_SET = 2;
-
-// call type used by IMessageFilter::HandleIncomingMessage
-
- CALLTYPE_TOPLEVEL = 1; // toplevel call - no outgoing call
- CALLTYPE_NESTED = 2; // callback on behalf of previous outgoing call - should always handle
- CALLTYPE_ASYNC = 3; // aysnchronous call - can NOT be rejected
- CALLTYPE_TOPLEVEL_CALLPENDING = 4; // new toplevel call with new LID
- CALLTYPE_ASYNC_CALLPENDING = 5; // async call - can NOT be rejected
-
-// status of server call - returned by IMessageFilter::HandleIncomingCall
-// and passed to IMessageFilter::RetryRejectedCall
-
- SERVERCALL_ISHANDLED = 0;
- SERVERCALL_REJECTED = 1;
- SERVERCALL_RETRYLATER = 2;
-
-// Pending type indicates the level of nesting
-
- PENDINGTYPE_TOPLEVEL = 1; // toplevel call
- PENDINGTYPE_NESTED = 2; // nested call
-
-// return values of MessagePending
-
- PENDINGMSG_CANCELCALL = 0; // cancel the outgoing call
- PENDINGMSG_WAITNOPROCESS = 1; // wait for the return and don't dispatch the message
- PENDINGMSG_WAITDEFPROCESS = 2; // wait and dispatch the message
-
- EOAC_NONE = $0;
- EOAC_MUTUAL_AUTH = $1;
- EOAC_STATIC_CLOAKING = $20;
- EOAC_DYNAMIC_CLOAKING = $40;
- EOAC_ANY_AUTHORITY = $80;
- EOAC_MAKE_FULLSIC = $100;
- EOAC_DEFAULT = $800;
-
- // These are only valid for CoInitializeSecurity
- EOAC_SECURE_REFS = $2;
- EOAC_ACCESS_CONTROL = $4;
- EOAC_APPID = $8;
- EOAC_DYNAMIC = $10;
- EOAC_REQUIRE_FULLSIC = $200;
- EOAC_AUTO_IMPERSONATE = $400;
- EOAC_NO_CUSTOM_MARSHAL = $2000;
- EOAC_DISABLE_AAA = $1000;
-
-//****************************************************************************
-//* ICOMThreadingInfo and enums
-//****************************************************************************/
-
- APTTYPE_CURRENT = -1;
- APTTYPE_STA = 0;
- APTTYPE_MTA = 1;
- APTTYPE_NA = 2;
- APTTYPE_MAINSTA = 3;
-
- THDTYPE_BLOCKMESSAGES = 0;
- THDTYPE_PROCESSMESSAGES = 1;
-
- DCOM_NONE = $0;
- DCOM_CALL_COMPLETE = $1;
- DCOM_CALL_CANCELED = $2;
-
- COMBND_RPCTIMEOUT = $1; // Rpc transport-specific timeout.
-
-//************************* Misc Enums wtypes.h ***********************************/
-
-// Common typdefs used in API paramaters, gleamed from compobj.h
-
-// memory context values; passed to CoGetMalloc
-
-Const
- MEMCTX_TASK = 1; // task (private) memory
- MEMCTX_SHARED = 2; // shared memory (between processes)
- MEMCTX_MACSYSTEM = 3; // on the mac, the system heap
- // these are mostly for internal use...
- MEMCTX_UNKNOWN = -1; // unknown context (when asked about it)
- MEMCTX_SAME = -2; // same context (as some other pointer)
-
-
-// For IRunningObjectTable::Register
- ROTFLAGS_REGISTRATIONKEEPSALIVE = $1;
- ROTFLAGS_ALLOWANYCLIENT = $2;
-
-// Maximum size of comparison buffer for IROTData::GetComparisonData
- ROT_COMPARE_MAX = 2048;
-
-
-// class context: used to determine what scope and kind of class object to use
-// NOTE: this is a bitwise enum
-
- CLSCTX_INPROC_SERVER = $0001; // server dll (runs in same process as caller)
- CLSCTX_INPROC_HANDLER = $0002; // handler dll (runs in same process as caller)
- CLSCTX_LOCAL_SERVER = $0004; // server exe (runs on same machine; diff proc)
- CLSCTX_INPROC_SERVER16 = $0008; // 16-bit server dll (runs in same process as caller)
- CLSCTX_REMOTE_SERVER = $0010; // remote server exe (runs on different machine)
- CLSCTX_INPROC_HANDLER16 = $0020; // 16-bit handler dll (runs in same process as caller)
- CLSCTX_INPROC_SERVERX86 = $0040; // Wx86 server dll (runs in same process as caller)
- CLSCTX_INPROC_HANDLERX86 = $0080; // Wx86 handler dll (runs in same process as caller)
- CLSCTX_ESERVER_HANDLER = $0100; // handler dll (runs in the server process)
- CLSCTX_RESERVED =$0200; // reserved
- CLSCTX_NO_CODE_DOWNLOAD = $0400; // disallow code download from the Directory Service (if any) or the internet -rahulth
- CLSCTX_NO_WX86_TRANSLATION = $0800;
- CLSCTX_NO_CUSTOM_MARSHAL = $1000;
- CLSCTX_ENABLE_CODE_DOWNLOAD = $2000; // allow code download from the Directory Service (if any) or the internet
- CLSCTX_NO_FAILURE_LOG = $04000; // do not log messages about activation failure (should one occur) to Event Log
- CLSCTX_DISABLE_AAA = $08000; // Disable EOAC_DISABLE_AAA capability for this activation only
- CLSCTX_ENABLE_AAA = $10000; // Enable EOAC_DISABLE_AAA capability for this activation only
- CLSCTX_FROM_DEFAULT_CONTEXT = $20000; // Begin this activation from the default context of the current apartment
- CLSCTX_INPROC = (CLSCTX_INPROC_SERVER OR CLSCTX_INPROC_HANDLER);
-// With DCOM, CLSCTX_REMOTE_SERVER should be included
- CLSCTX_ALL = (CLSCTX_INPROC_SERVER OR CLSCTX_INPROC_HANDLER OR CLSCTX_LOCAL_SERVER {$ifdef Remote} OR CLSCTX_REMOTE_SERVER {$endif});
- CLSCTX_SERVER = (CLSCTX_INPROC_SERVER OR CLSCTX_LOCAL_SERVER {$ifdef Remote} OR CLSCTX_REMOTE_SERVER {$endif});
-
-
-// marshaling flags; passed to CoMarshalInterface
- MSHLFLAGS_NORMAL = 0; // normal marshaling via proxy/stub
- MSHLFLAGS_TABLESTRONG = 1; // keep object alive; must explicitly release
- MSHLFLAGS_TABLEWEAK = 2; // doesn't hold object alive; still must release
- MSHLFLAGS_NOPING = 4; // remote clients dont 'ping' to keep objects alive
- MSHLFLAGS_RESERVED1 = 8; // reserved
- MSHLFLAGS_RESERVED2 = 16; // reserved
- MSHLFLAGS_RESERVED3 = 32; // reserved
- MSHLFLAGS_RESERVED4 = 64; // reserved
-
-// marshal context: determines the destination context of the marshal operation
-
- MSHCTX_LOCAL = 0; // unmarshal context is local (eg.shared memory)
- MSHCTX_NOSHAREDMEM = 1; // unmarshal context has no shared memory access
- MSHCTX_DIFFERENTMACHINE = 2; // unmarshal context is on a different machine
- MSHCTX_INPROC = 3; // unmarshal context is on different thread
- MSHCTX_CROSSCTX = 4; // unmarshal context is on different context
-
-// #########################################################################
-//
-// VARTYPE
-//
-// #########################################################################
-
-
-{
- VARENUM usage key,
-
- * [V] - may appear in a VARIANT
- * [T] - may appear in a TYPEDESC
- * [P] - may appear in an OLE property set
- * [S] - may appear in a Safe Array
-
-
- VT_EMPTY [V] [P] nothing
- VT_NULL [V] [P] SQL style Null
- VT_I2 [V][T][P][S] 2 byte signed int
- VT_I4 [V][T][P][S] 4 byte signed int
- VT_R4 [V][T][P][S] 4 byte real
- VT_R8 [V][T][P][S] 8 byte real
- VT_CY [V][T][P][S] currency
- VT_DATE [V][T][P][S] date
- VT_BSTR [V][T][P][S] OLE Automation string
- VT_DISPATCH [V][T] [S] IDispatch *
- VT_ERROR [V][T][P][S] SCODE
- VT_BOOL [V][T][P][S] True=-1, False=0
- VT_VARIANT [V][T][P][S] VARIANT *
- VT_UNKNOWN [V][T] [S] IUnknown *
- VT_DECIMAL [V][T] [S] 16 byte fixed point
- VT_RECORD [V] [P][S] user defined type
- VT_I1 [V][T][P][s] signed char
- VT_UI1 [V][T][P][S] unsigned char
- VT_UI2 [V][T][P][S] unsigned short
- VT_UI4 [V][T][P][S] unsigned long
- VT_I8 [T][P] signed 64-bit int
- VT_UI8 [T][P] unsigned 64-bit int
- VT_INT [V][T][P][S] signed machine int
- VT_UINT [V][T] [S] unsigned machine int
- VT_INT_PTR [T] signed machine register size width
- VT_UINT_PTR [T] unsigned machine register size width
- VT_VOID [T] C style void
- VT_HRESULT [T] Standard return type
- VT_PTR [T] pointer type
- VT_SAFEARRAY [T] (use VT_ARRAY in VARIANT)
- VT_CARRAY [T] C style array
- VT_USERDEFINED [T] user defined type
- VT_LPSTR [T][P] null terminated string
- VT_LPWSTR [T][P] wide null terminated string
- VT_FILETIME [P] FILETIME
- VT_BLOB [P] Length prefixed bytes
- VT_STREAM [P] Name of the stream follows
- VT_STORAGE [P] Name of the storage follows
- VT_STREAMED_OBJECT [P] Stream contains an object
- VT_STORED_OBJECT [P] Storage contains an object
- VT_VERSIONED_STREAM [P] Stream with a GUID version
- VT_BLOB_OBJECT [P] Blob contains an object
- VT_CF [P] Clipboard format
- VT_CLSID [P] A Class ID
- VT_VECTOR [P] simple counted array
- VT_ARRAY [V] SAFEARRAY*
- VT_BYREF [V] void* for local use
- VT_BSTR_BLOB Reserved for system use
-}
-
-// VARENUM's
-
- VT_EMPTY = 0;
- VT_NULL = 1;
- VT_I2 = 2;
- VT_I4 = 3;
- VT_R4 = 4;
- VT_R8 = 5;
- VT_CY = 6;
- VT_DATE = 7;
- VT_BSTR = 8;
- VT_DISPATCH = 9;
- VT_ERROR = 10;
- VT_BOOL = 11;
- VT_VARIANT = 12;
- VT_UNKNOWN = 13;
- VT_DECIMAL = 14;
-// VBA reserves 15 for future use
- VT_I1 = 16;
- VT_UI1 = 17;
- VT_UI2 = 18;
- VT_UI4 = 19;
- VT_I8 = 20;
- VT_UI8 = 21;
- VT_INT = 22;
- VT_UINT = 23;
- VT_VOID = 24;
- VT_HRESULT = 25;
- VT_PTR = 26;
- VT_SAFEARRAY = 27;
- VT_CARRAY = 28;
- VT_USERDEFINED = 29;
- VT_LPSTR = 30;
- VT_LPWSTR = 31;
-// VBA reserves 32-35 for future use
- VT_RECORD = 36;
- VT_INT_PTR = 37;
- VT_UINT_PTR = 38;
-
- VT_FILETIME = 64;
- VT_BLOB = 65;
- VT_STREAM = 66;
- VT_STORAGE = 67;
- VT_STREAMED_OBJECT = 68;
- VT_STORED_OBJECT = 69;
- VT_BLOB_OBJECT = 70;
- VT_CF = 71;
- VT_CLSID = 72;
- VT_VERSIONED_STREAM = 73;
-
- VT_BSTR_BLOB = $0fff;
-
- VT_VECTOR = $1000;
- VT_ARRAY = $2000;
- VT_BYREF = $4000;
- VT_RESERVED = $8000;
-
- VT_ILLEGAL = $ffff;
- VT_ILLEGALMASKED = $0fff;
- VT_TYPEMASK = $0fff;
-
-
-
-//
-// Common typedefs for paramaters used in data view API's, gleamed
-// from dvobj.h
-//
-
-// Data/View aspect; specifies the desired aspect of the object when
-// drawing or getting data.
-
- DVASPECT_CONTENT = 1;
- DVASPECT_THUMBNAIL = 2;
- DVASPECT_ICON = 4;
- DVASPECT_DOCPRINT = 8;
-
-//****** Storage types *************************************************
-
-
-// Storage commit types
-
- STGC_DEFAULT = 0;
- STGC_OVERWRITE = 1;
- STGC_ONLYIFCURRENT = 2;
- STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4;
- STGC_CONSOLIDATE = 8;
-
- STGMOVE_MOVE = 0;
- STGMOVE_COPY = 1;
- STGMOVE_SHALLOWCOPY = 2;
-
- STATFLAG_DEFAULT = 0;
- STATFLAG_NONAME = 1;
- STATFLAG_NOOPEN = 2;
-
-// #########################################################################
-//
-// Constants for the call context
-//
-
- WDT_INPROC_CALL = ULONG($48746457);
- WDT_REMOTE_CALL = ULONG($52746457);
- WDT_INPROC64_CALL = ULONG($50746457);
-
- COLE_DEFAULT_PRINCIPAL {: pOleStr?} = pOleStr(-1);
- COLE_DEFAULT_AUTHINFO {: pointer?} = pointer(-1);
-
-// DISPID reserved to indicate an \"unknown\" name
-// only reserved for data members (properties); reused as a method dispid below
-
- DISPID_UNKNOWN = -1;
-
-// DISPID reserved for the \"value\" property
-
- DISPID_VALUE = 0;
-
-// The following DISPID is reserved to indicate the param")
-// that is the right-hand-side (or \"put\" value) of a PropertyPut")
-
- DISPID_PROPERTYPUT = -3;
-
-// DISPID reserved for the standard \"NewEnum\" method
-
- DISPID_NEWENUM = -4;
-
-// DISPID reserved for the standard \"Evaluate\" method
-
- DISPID_EVALUATE = -5;
- DISPID_CONSTRUCTOR = -6;
- DISPID_DESTRUCTOR = -7;
- DISPID_COLLECT = -8;
-
- DISPATCH_METHOD = $1;
- DISPATCH_PROPERTYGET = $2;
- DISPATCH_PROPERTYPUT = $4;
- DISPATCH_PROPERTYPUTREF = $8;
-
- USERCLASSTYPE_FULL = 1;
- USERCLASSTYPE_SHORT = 2;
- USERCLASSTYPE_APPNAME = 3;
-
-// The range -500 through -999 is reserved for Controls
-// The range 0x80010000 through 0x8001FFFF is reserved for Controls
-// The range -5000 through -5499 is reserved for ActiveX Accessability
-// The range -2000 through -2499 is reserved for VB5
-// The range -3900 through -3999 is reserved for Forms
-// The range -5500 through -5550 is reserved for Forms
-// The remainder of the negative DISPIDs are reserved for future use
-
-
- DESCKIND_NONE = 0;
- DESCKIND_FUNCDESC = 1;
- DESCKIND_VARDESC = 2;
- DESCKIND_TYPECOMP = 3;
- DESCKIND_IMPLICITAPPOBJ = 4;
- DESCKIND_MAX = 5;
-
-
- SYS_WIN16 = 0;
- SYS_WIN32 = 1;
- SYS_MAC = 2;
- SYS_WIN64 = 3;
-
- REGKIND_DEFAULT = 0;
- REGKIND_REGISTER = 1;
- REGKIND_NONE = 2;
-
- INTERFACESAFE_FOR_UNTRUSTED_CALLER = $00000001; // Caller of interface may be untrusted
- INTERFACESAFE_FOR_UNTRUSTED_DATA = $00000002; // Data passed into interface may be untrusted
- INTERFACE_USES_DISPEX = $00000004; // Object knows to use IDispatchEx
- INTERFACE_USES_SECURITY_MANAGER = $00000008; // Object knows to use IInternetHostSecurityManager
-
- LIBFLAG_FRESTRICTED = $01;
- LIBFLAG_FCONTROL = $02;
- LIBFLAG_FHIDDEN = $04;
- LIBFLAG_FHASDISKIMAGE = $08;
- TYPEFLAG_FAPPOBJECT = $01;
- TYPEFLAG_FCANCREATE = $02;
- TYPEFLAG_FLICENSED = $04;
- TYPEFLAG_FPREDECLID = $08;
- TYPEFLAG_FHIDDEN = $10;
- TYPEFLAG_FCONTROL = $20;
- TYPEFLAG_FDUAL = $40;
- TYPEFLAG_FNONEXTENSIBLE = $80;
- TYPEFLAG_FOLEAUTOMATION = $100;
- TYPEFLAG_FRESTRICTED = $200;
- TYPEFLAG_FAGGREGATABLE = $400;
- TYPEFLAG_FREPLACEABLE = $800;
- TYPEFLAG_FDISPATCHABLE = $1000;
- TYPEFLAG_FREVERSEBIND = $2000;
- TYPEFLAG_FPROXY = $4000;
-
- FUNCFLAG_FRESTRICTED = $1;
- FUNCFLAG_FSOURCE = $2;
- FUNCFLAG_FBINDABLE = $4;
- FUNCFLAG_FREQUESTEDIT = $8;
- FUNCFLAG_FDISPLAYBIND = $10;
- FUNCFLAG_FDEFAULTBIND = $20;
- FUNCFLAG_FHIDDEN = $40;
- FUNCFLAG_FUSESGETLASTERROR = $80;
- FUNCFLAG_FDEFAULTCOLLELEM = $100;
- FUNCFLAG_FUIDEFAULT = $200;
- FUNCFLAG_FNONBROWSABLE = $400;
- FUNCFLAG_FREPLACEABLE = $800;
- FUNCFLAG_FIMMEDIATEBIND = $1000;
-
- VARFLAG_FREADONLY = $1;
- VARFLAG_FSOURCE = $2;
- VARFLAG_FBINDABLE = $4;
- VARFLAG_FREQUESTEDIT = $8;
- VARFLAG_FDISPLAYBIND = $10;
- VARFLAG_FDEFAULTBIND = $20;
- VARFLAG_FHIDDEN = $40;
- VARFLAG_FRESTRICTED = $80;
- VARFLAG_FDEFAULTCOLLELEM = $100;
- VARFLAG_FUIDEFAULT = $200;
- VARFLAG_FNONBROWSABLE = $400;
- VARFLAG_FREPLACEABLE = $800;
- VARFLAG_FIMMEDIATEBIND = $1000;
-
- FADF_AUTO = USHORT($0001); // array is allocated on the stack
- FADF_STATIC = USHORT($0002); // array is staticly allocated
- FADF_EMBEDDED = USHORT($0004); // array is embedded in a structure
- FADF_FIXEDSIZE = USHORT($0010); // may not be resized or reallocated
- FADF_RECORD = USHORT($0020); // an array of records
- FADF_HAVEIID = USHORT($0040); // with FADF_DISPATCH, FADF_UNKNOWN
- // array has an IID for interfaces
- FADF_HAVEVARTYPE = USHORT($0080); // array has a VT type
- FADF_BSTR = USHORT($0100); // an array of BSTRs
- FADF_UNKNOWN = USHORT($0200); // an array of IUnknown*
- FADF_DISPATCH = USHORT($0400); // an array of IDispatch*
- FADF_VARIANT = USHORT($0800); // an array of VARIANTs
- FADF_RESERVED = USHORT($F008); // reserved bits
-
-// IMPLTYPE Flags
-
- IMPLTYPEFLAG_FDEFAULT = USHORT($1);
- IMPLTYPEFLAG_FSOURCE = USHORT($2);
- IMPLTYPEFLAG_FRESTRICTED = USHORT($4);
- IMPLTYPEFLAG_FDEFAULTVTABLE = USHORT($8);
-
- PARAMFLAG_NONE = USHORT($00);
- PARAMFLAG_FIN = USHORT($01);
- PARAMFLAG_FOUT = USHORT($02);
- PARAMFLAG_FLCID = USHORT($04);
- PARAMFLAG_FRETVAL = USHORT($08);
- PARAMFLAG_FOPT = USHORT($10);
- PARAMFLAG_FHASDEFAULT = USHORT($20);
- PARAMFLAG_FHASCUSTDATA = USHORT($40);
-
- VAR_PERINSTANCE = 0;
- VAR_STATIC = 1;
- VAR_CONST = 2;
- VAR_DISPATCH = 3;
-
- // notification messages used by the dynamic typeinfo protocol.
-
- CHANGEKIND_ADDMEMBER = 0;
- CHANGEKIND_DELETEMEMBER = 1;
- CHANGEKIND_SETNAMES = 2;
- CHANGEKIND_SETDOCUMENTATION = 3;
- CHANGEKIND_GENERAL = 4;
- CHANGEKIND_INVALIDATE = 5;
- CHANGEKIND_CHANGEFAILED = 6;
- CHANGEKIND_MAX = 7;
-
- INVOKE_FUNC = 1;
- INVOKE_PROPERTYGET = 2;
- INVOKE_PROPERTYPUT = 4;
- INVOKE_PROPERTYPUTREF = 8;
-
- TKIND_ENUM = 0;
- TKIND_RECORD = 1;
- TKIND_MODULE = 2;
- TKIND_INTERFACE = 3;
- TKIND_DISPATCH = 4;
- TKIND_COCLASS = 5;
- TKIND_ALIAS = 6;
- TKIND_UNION = 7;
- TKIND_MAX = 8; // end of enum marker
-
- SF_ERROR = VT_ERROR;
- SF_I1 = VT_I1;
- SF_I2 = VT_I2;
- SF_I4 = VT_I4;
- SF_I8 = VT_I8;
- SF_BSTR = VT_BSTR;
- SF_UNKNOWN = VT_UNKNOWN;
- SF_DISPATCH = VT_DISPATCH;
- SF_VARIANT = VT_VARIANT;
- SF_RECORD = VT_RECORD;
- SF_HAVEIID = VT_UNKNOWN OR VT_RESERVED;
- IDLFLAG_NONE = PARAMFLAG_NONE;
- IDLFLAG_FIN = PARAMFLAG_FIN;
- IDLFLAG_FOUT = PARAMFLAG_FOUT;
- IDLFLAG_FLCID = PARAMFLAG_FLCID;
- IDLFLAG_FRETVAL = PARAMFLAG_FRETVAL;
-
- CC_FASTCALL = 0;
- CC_CDECL = 1;
- CC_MSCPASCAL = 2;
- CC_PASCAL = CC_MSCPASCAL;
- CC_MACPASCAL = 3;
- CC_STDCALL = 4;
- CC_FPFASTCALL = 5;
- CC_SYSCALL = 6;
- CC_MPWCDECL = 7;
- CC_MPWPASCAL = 8;
- CC_MAX = 9; // end of enum marker
-
- FUNC_VIRTUAL = 0;
- FUNC_PUREVIRTUAL = 1;
- FUNC_NONVIRTUAL = 2;
- FUNC_STATIC = 3;
- FUNC_DISPATCH = 4;
-
-// objbase.h
-
- MARSHALINTERFACE_MIN = 500; // minimum number of bytes for interface marshl
-
-//
-// Common typedefs for paramaters used in Storage API's, gleamed from storage.h
-// Also contains Storage error codes, which should be moved into the storage
-// idl files.
-//
-
-
- CWCSTORAGENAME = 32;
-
-// Storage instantiation modes
- STGM_DIRECT = $00000000;
- STGM_TRANSACTED = $00010000;
- STGM_SIMPLE = $08000000;
- STGM_READ = $00000000;
- STGM_WRITE = $00000001;
- STGM_READWRITE = $00000002;
- STGM_SHARE_DENY_NONE = $00000040;
- STGM_SHARE_DENY_READ = $00000030;
- STGM_SHARE_DENY_WRITE = $00000020;
- STGM_SHARE_EXCLUSIVE = $00000010;
- STGM_PRIORITY = $00040000;
- STGM_DELETEONRELEASE = $04000000;
- STGM_NOSCRATCH = $00100000; {WINNT+}
- STGM_CREATE = $00001000;
- STGM_CONVERT = $00020000;
- STGM_FAILIFTHERE = $00000000;
- STGM_NOSNAPSHOT = $00200000;
- STGM_DIRECT_SWMR = $00400000; { Win2000+}
-
-// flags for internet asyncronous and layout docfile
- ASYNC_MODE_COMPATIBILITY = $00000001;
- ASYNC_MODE_DEFAULT = $00000000;
-
- STGTY_REPEAT = $00000100;
- STG_TOEND = $FFFFFFFF;
-
- STG_LAYOUT_SEQUENTIAL = $00000000;
- STG_LAYOUT_INTERLEAVED = $00000001;
-
- STGFMT_STORAGE = 0;
- STGFMT_NATIVE = 1;
- STGFMT_FILE = 3;
- STGFMT_ANY = 4;
- STGFMT_DOCFILE = 5;
-
-// This is a legacy define to allow old component to builds
- STGFMT_DOCUMENT = 0;
-
-
-// COM initialization flags; passed to CoInitialize.
- COINIT_APARTMENTTHREADED = $2; // Apartment model
-
- // These constants are only valid on Windows NT 4.0
-
- COINIT_MULTITHREADED = $0; // OLE calls objects on any thread.
- COINIT_DISABLE_OLE1DDE = $4; // Don't use DDE for Ole1 support.
- COINIT_SPEED_OVER_MEMORY = $8; // Trade memory for speed.
-
- SMEXF_SERVER = $01; // server side aggregated std marshaler
- SMEXF_HANDLER = $02; // client side (handler) agg std marshaler
-
- COWAIT_WAITALL = 1;
- COWAIT_ALERTABLE = 2;
-
- DOCMISC_CANCREATEMULTIPLEVIEWS = 1;
- DOCMISC_SUPPORTCOMPLEXRECTANGLES = 2;
- DOCMISC_CANTOPENEDIT = 4; // fails the IOleDocumentView::Open method
- DOCMISC_NOFILESUPPORT = 8; // does not support read/writing to a file
-
- PID_DICTIONARY = PROPID($00000000);
- PID_CODEPAGE = PROPID($00000001);
- PID_FIRST_USABLE = PROPID($00000002);
- PID_FIRST_NAME_DEFAULT = PROPID($00000fff);
- PID_LOCALE = PROPID($80000000);
- PID_MODIFY_TIME = PROPID($80000001);
- PID_SECURITY = PROPID($80000002);
- PID_BEHAVIOR = PROPID($80000003);
- PID_ILLEGAL = PROPID($ffffffff);
- PID_MIN_READONLY = PROPID($80000000);
- PID_MAX_READONLY = PROPID($bfffffff);
- PIDDI_THUMBNAIL = DWORD($00000002);// VT_BLOB
- PIDSI_TITLE = DWORD($00000002); // VT_LPSTR
- PIDSI_SUBJECT = DWORD($00000003); // VT_LPSTR
- PIDSI_AUTHOR = DWORD($00000004); // VT_LPSTR
- PIDSI_KEYWORDS = DWORD($00000005); // VT_LPSTR
- PIDSI_COMMENTS = DWORD($00000006); // VT_LPSTR
- PIDSI_TEMPLATE = DWORD($00000007); // VT_LPSTR
- PIDSI_LASTAUTHOR = DWORD($00000008); // VT_LPSTR
- PIDSI_REVNUMBER = DWORD($00000009); // VT_LPSTR
- PIDSI_EDITTIME = DWORD($0000000a); // VT_FILETIME
- PIDSI_LASTPRINTED = DWORD($0000000b); // VT_FILETIME
- PIDSI_CREATE_DTM = DWORD($0000000c); // VT_FILETIME
- PIDSI_LASTSAVE_DTM = DWORD($0000000d); // VT_FILETIME
- PIDSI_PAGECOUNT = DWORD($0000000e); // VT_I4
- PIDSI_WORDCOUNT = DWORD($0000000f); // VT_I4
- PIDSI_CHARCOUNT = DWORD($00000010); // VT_I4
- PIDSI_THUMBNAIL = DWORD($00000011); // VT_CF
- PIDSI_APPNAME = DWORD($00000012); // VT_LPSTR
- PIDSI_DOC_SECURITY = DWORD($00000013); // VT_I4
- PIDDSI_CATEGORY = $00000002; // VT_LPSTR
- PIDDSI_PRESFORMAT = $00000003; // VT_LPSTR
- PIDDSI_BYTECOUNT = $00000004; // VT_I4
- PIDDSI_LINECOUNT = $00000005; // VT_I4
- PIDDSI_PARCOUNT = $00000006; // VT_I4
- PIDDSI_SLIDECOUNT = $00000007; // VT_I4
- PIDDSI_NOTECOUNT = $00000008; // VT_I4
- PIDDSI_HIDDENCOUNT = $00000009; // VT_I4
- PIDDSI_MMCLIPCOUNT = $0000000A; // VT_I4
- PIDDSI_SCALE = $0000000B; // VT_BOOL
- PIDDSI_HEADINGPAIR = $0000000C; // VT_VARIANT |VT_VECTOR
- PIDDSI_DOCPARTS = $0000000D; // VT_LPSTR |VT_VECTOR
- PIDDSI_MANAGER = $0000000E; // VT_LPSTR
- PIDDSI_COMPANY = $0000000F; // VT_LPSTR
- PIDDSI_LINKSDIRTY = $00000010; // VT_BOOL
-
-// FMTID_MediaFileSummaryInfo - Property IDs
-
- PIDMSI_EDITOR = DWord($00000002); // VT_LPWSTR
- PIDMSI_SUPPLIER = DWord($00000003); // VT_LPWSTR
- PIDMSI_SOURCE = DWord($00000004); // VT_LPWSTR
- PIDMSI_SEQUENCE_NO = DWord($00000005); // VT_LPWSTR
- PIDMSI_PROJECT = DWord($00000006); // VT_LPWSTR
- PIDMSI_STATUS = DWord($00000007); // VT_UI4
- PIDMSI_OWNER = DWord($00000008); // VT_LPWSTR
- PIDMSI_RATING = DWord($00000009); // VT_LPWSTR
- PIDMSI_PRODUCTION = DWord($0000000A); // VT_FILETIME (UTC)
- PIDMSI_COPYRIGHT = DWord($0000000B); // VT_LPWSTR
- PRSPEC_INVALID = ULONG($ffffffff);
- PRSPEC_LPWSTR = ULONG(0);
- PRSPEC_PROPID = ULONG(1);
- PROPSETFLAG_DEFAULT = DWORD(0);
- PROPSETFLAG_NONSIMPLE = DWORD(1);
- PROPSETFLAG_ANSI = DWORD(2);
-
-TYPE
- VARTYPE = USHORT;
-
-//TypeInfo stuff.
-
- DISPID = Long ;
- SCODE = Long;
- pSCODE = ^SCODE;
- lpDISPID = ^DISPID;
- MEMBERID = DispId;
- HREFTYPE = DWord;
- TResultList = array[0..high(integer) div 4-50] of HResult;
- PResultList = ^TResultList;
-
- PSYSINT = ^SYSINT;
- SYSINT = LongInt;
- PSYSUINT = ^SYSUINT;
- SYSUINT = LongWord;
-
-// Enums
- VARKIND = DWord;
- DESCKIND = DWord;
- SYSKIND = DWord;
- TSYSKIND = SYSKIND;
- REGKIND = DWord;
- TREGKIND = REGKIND;
- FUNCKIND = DWord;
- CHANGEKIND = DWord;
- CALLCONV = DWord;
-
- PIDMSI_STATUS_VALUE = (
- PIDMSI_STATUS_NORMAL = 0,
- PIDMSI_STATUS_NEW,
- PIDMSI_STATUS_PRELIM,
- PIDMSI_STATUS_DRAFT,
- PIDMSI_STATUS_INPROGRESS,
- PIDMSI_STATUS_EDIT,
- PIDMSI_STATUS_REVIEW,
- PIDMSI_STATUS_PROOF,
- PIDMSI_STATUS_FINAL,
- PIDMSI_STATUS_OTHER = $7FFF
- );
- TPIDMSI_STATUS_VALUE= PIDMSI_STATUS_Value;
-
-
-
- PCOAUTHIDENTITY = ^TCOAUTHIDENTITY;
- _COAUTHIDENTITY = Record
- User : PUSHORT;
- UserLength : ULONG;
- Domain : PUSHORT;
- DomainLength : ULong;
- Password : PUSHORT;
- PassWordLength : ULong;
- Flags : ULong;
- End;
-
- COAUTHIDENTITY = _COAUTHIDENTITY;
- TCOAUTHIDENTITY = _COAUTHIDENTITY;
-
- PCOAUTHINFO = ^TCOAUTHINFO;
- COAuthInfo = Record
- AuthnSvc : DWord;
- AuthzSvc : DWord;
- ServerPrincName : LPWSTR;
- AuthnLevel : DWord;
- ImpersonationLevel : DWord;
- AuthIdentityData : PCOAUTHIDENTITY;
- Capabilities : DWord;
- END;
- TCOAUTHINFO = COAUTHINFO;
-
- PCOSERVERINFO = ^TCOSERVERINFO;
- _COSERVERINFO = Record
- dwReserved1 : DWord;
- pwszName : LPWSTR;
- pAuthInfo : PCoAuthInfo;
- dwReserved2 : DWord;
- end;
- TCOSERVERINFO = _COSERVERINFO;
- PMultiQI = ^Multi_QI;
- tagMULTI_QI = Record
- iid: piid; // pass this one in
- itf: IUnknown; // get these out (you must set to NULL before calling)
- hr : HResult;
- END;
- MULTI_QI = TagMULTI_QI;
- PMulti_QI = PMultiQI;
- TMultiQI = tagMULTI_QI;
-
- PMultiQIArray = ^TMultiQIArray;
- TMultiQIArray = array[0..65535] of TMultiQI;
-
-
- HContext = Pointer;
- ApartmentID = DWord;
-
-
-//****** Critical Section Wrappers ***********************************
-
-// LCID = WORD;
-// LANGID = USHORT;
-
-// #######################################################################
-//
-// User marshal support for Windows data types.
-
-//
-// Frequently used helpers: sized blobs
-//
-// Never put [user_marshal] or [wire_marshal] on the helpers directly.
-//
-
-// Flagged blobs.
-
- _FLAGGED_BYTE_BLOB = Record
- fFlags : ULong;
- clSize : ULong;
- abdata : array[0..0] of byte;
- End;
- FLAGGED_BYTE_BLOB = _FLAGGED_BYTE_BLOB;
- UP_FLAGGED_BYTE_BLOB = ^FLAGGED_BYTE_BLOB;
-
- _FLAGGED_WORD_BLOB = Record
- fFlags : ULong;
- clSize : ULong;
- abdata : array[0..0] of USHORT;
- End;
- FLAGGED_WORD_BLOB = _FLAGGED_WORD_BLOB;
- UP_FLAGGED_WORD_BLOB = ^FLAGGED_WORD_BLOB;
-
- _FLAGGED_DWORD_BLOB = Record
- fFlags : ULong;
- clSize : ULong;
- abdata : array[0..0] of ULONG;
- End;
- FLAGGED_DWORD_BLOB = _FLAGGED_DWORD_BLOB;
- FLAGGED_UP_DWORD_BLOB = ^FLAGGED_DWORD_BLOB;
-
-// Simple blobs.
-
- _BYTE_BLOB = Record
- clSize : ULong;
- abdata : array[0..0] of byte;
- End;
- BYTE_BLOB = _BYTE_BLOB;
- UP_BYTE_BLOB = ^BYTE_BLOB;
-
- _WORD_BLOB = Record
- clSize : ULong;
- abdata : array[0..0] of USHORT;
- End;
- WORD_BLOB = _WORD_BLOB;
- UP_WORD_BLOB = ^WORD_BLOB;
-
- _DWORD_BLOB = Record
- clSize : ULong;
- abdata : array[0..0] of ULONG;
- End;
- DWORD_BLOB = _DWORD_BLOB;
- UP_DWORD_BLOB = ^DWORD_BLOB;
-
-// Frequently used helpers with sized pointers.
-
- _BYTE_SIZEDARR = Record
- clsize : ULong;
- Data : PByte;
- End;
- BYTE_SIZEDARR = _BYTE_SIZEDARR;
-
- _SHORT_SIZEDARR = Record
- clsize : ULong;
- Data : PSHORT;
- End;
- SHORT_SIZEDARR = _SHORT_SIZEDARR;
-
- _LONG_SIZEDARR = Record
- clsize : ULong;
- Data : PLONG;
- End;
- LONG_SIZEDARR = _LONG_SIZEDARR;
- HYPER = LONGLONG;
- PHYPER = ^HYPER;
- _HYPER_SIZEDARR = Record
- clsize : ULong;
- Data : PHYPER;
- End;
- HYPER_SIZEDARR = _HYPER_SIZEDARR;
-
-
-// #########################################################################
-//
-// CLIPFORMAT
-//
-
- userCLIPFORMAT = Record
- FContext : Long;
- CASE INTEGER OF
- 0 : (dwvalue : DWORD);
- 1 : (szName : poleStr);
- End;
-
- wireCLIPFORMAT = ^userCLIPFORMAT;
-
-
-// #########################################################################
-//
-// Good for most of the gdi handles.
-
- _GDI_NONREMOTE = Record
- FContext : Long;
- Case Integer Of
- 0 : (HInProc : Long);
- 1 : (HRemote : DWORD_BLOB);
- END;
- GDI_NONREMOTE = _GDI_NONREMOTE;
-
-// #########################################################################
-//
-// HGLOBAL
-//
-// A global may be Null or may be non-NULL with 0 length.
-
- _userHGLOBAL = Record
- FContext : Long;
- CASE Integer OF
- 0 : (hInproc : Long);
- 1 : (hRemote : UP_FLAGGED_BYTE_BLOB);
- 2 : (hInproc64: int64);
- End;
- userHGlobal = _userHGLOBAL;
- wireHGLOBAL = ^userHGLOBAL;
-
-// #########################################################################
-//
-// HMETAFILE
-//
- _userHMETAFILE = Record
- fContext : Long;
- Case Integer OF
- 0 : (hInproc : Long);
- 1 : (hRemote : up_byte_blob);
- 2 : (hInProc64 : Int64);
- End;
- userHMETAFILE = _userHMETAFILE;
- puserHMETAFILE = ^userHMETAFILE;
-
-// #########################################################################
-//
-// HMETAFILEPICT
-//
-
- _remoteMETAFILEPICT = Record
- mm : Long;
- xExt : Long;
- yExt : Long;
- mgf : puserHMETAFILE;
- End;
-
- remoteMETAFILEPICT = _remoteMETAFILEPICT;
- premoteMETAFILEPICT = ^remoteMETAFILEPICT;
-
- _userHMETAFILEPICT = Record
- fContext : Long;
- Case Integer OF
- 0 : (hInproc : Long);
- 1 : (hRemote : premoteMETAFILEPICT);
- 2 : (hInProc64 : Int64);
- End;
- userHMETAFILEPICT = _userHMETAFILEPICT;
-
-
-// #########################################################################
-//
-// HENHMETAFILE
-//
-
- _userHENHMETAFILE = Record
- fContext : Long;
- Case Integer OF
- 0 : (hInproc : Long);
- 1 : (hRemote : up_byte_blob);
- 2 : (hInProc64 : Int64);
- End;
- userHENHMETAFILE = _userHENHMETAFILE;
- puserHENHMETAFILE = ^userHENHMETAFILE;
-
-// #########################################################################
-//
-// HBITMAP
-//
-
-// RemHBITMAP was just a byte blob, but the whole bitmap structure was copied
-// at the beginning of the buffer.
-
-// So, we take BITMAP fields from wingdi.x
-
-
- _userBITMAP = Record
- bmType,
- bmWidth,
- bmHeight,
- bmWidthBytes : Long;
- bmPlanes,
- bmBitsPixel : Word;
- cvsize : ULONG;
- buffer : pbyte;
- End;
-
- userBITMAP = _userBITMAP;
- puserBITMAP = ^userBITMAP;
-
- _userHBITMAP = Record
- fContext : Long;
- Case Integer OF
- 0 : (hInproc : Long);
- 1 : (hRemote : puserBITMAP);
- 2 : (hInProc64 : Int64);
- End;
- userHBITMAP = _userHBITMAP;
- puserHBITMAP = ^userHBITMAP;
-
-
-// #########################################################################
-//
-// HPALETTE
-//
-
-// PALETTEENTRY is in wingdi.x, it is a struct with 4 bytes.
-// LOGPALETTE is in wingdi.x, it is a conf struct with paletteentries and
-// a version field
-
- _userHpalette = Record
- fContext : Long;
- Case Integer OF
- 0 : (hInproc : Long);
- 1 : (hRemote : logpalette);
- 2 : (hInProc64 : Int64);
- End;
- userHpalette = _userHpalette;
- puserHpalette = ^userHpalette;
-
-// #########################################################################
-//
-// Handles passed locally as longs.
-//
-
- _RemotableHandle = Record
- fContext : Long;
- Case Integer OF
- 0 : (hInproc : Long);
- 1 : (hRemote : Long);
- End;
- RemotableHandle = _RemotableHandle;
-
-
- wireHWND = ^RemotableHandle;
- wireHMENU = ^RemotableHandle;
- wireHACCEL = ^RemotableHandle;
- wireHBRUSH = ^RemotableHandle;
- wireHFONT = ^RemotableHandle;
- wireHDC = ^RemotableHandle;
- wireHICON = ^RemotableHandle;
- HCursor = HICON;
-
-
- tagTEXTMETRICW = Record
- tmHeight,
- tmAscent,
- tmDescent,
- tmInternalLeading,
- tmExternalLeading,
- tmAveCharWidth,
- tmMaxCharWidth,
- tmWeight,
- tmOverhang,
- tmDigitizedAspectX,
- tmDigitizedAspectY : Long;
- tmFirstChar,
- tmLastChar,
- tmDefaultChar,
- tmBreakChar : WCHAR;
- tmItalic,
- tmUnderlined,
- tmStruckOut,
- tmPitchAndFamily,
- tmCharSet : BYTE;
- End;
-
- TEXTMETRICW = tagTEXTMETRICW;
- PTEXTMETRICW = ^TEXTMETRICW;
- LPTEXTMETRICW = PTEXTMETRICW;
- wireHBITMAP = ^userHBITMAP;
- wireHPALETTE = ^userHPALETTE;
- wireHENHMETAFILE = ^userHENHMETAFILE;
- wireHMETAFILE = ^userHMETAFILE;
- wireHMETAFILEPICT = ^userHMETAFILEPICT;
- HMetaFilePict = Pointer;
- HLOCAL = HGLOBAL;
-// Date = Double;
-
-{****************************************************************************
- * Binding Interfaces
- ****************************************************************************}
-
- tagBIND_OPTS = Record
- cvStruct, // sizeof(BIND_OPTS)
- grfFlags,
- grfMode,
- dwTickCountDeadline : DWord;
- End;
- TBind_Opts = tagBIND_OPTS;
- PBind_Opts = ^TBind_Opts;
- TBindOpts = tagBIND_OPTS;
- PBindOpts = ^TBindOpts;
- Bind_Opts = tagBind_opts;
-
- tagBIND_OPTS2_CPP = Record
- dwTrackFlags,
- dwClassContext : Dword;
- Locale : LCID;
- ServerInfo : pCoServerInfo;
- End;
-
- TBind_Opts2_CPP = tagBIND_OPTS2_CPP;
- PBind_Opts2_CPP = ^TBind_Opts2_CPP;
-
-
- tagBind_OPTS2 = Record
- cvStruct, // sizeof(BIND_OPTS)
- grfFlags,
- grfMode,
- dwTickCountDeadline : DWord;
- dwTrackFlags,
- dwClassContext : DWord;
- Locale : LCID;
- ServerInfo : pCoServerInfo;
- End;
-
- TBind_Opts2 = tagBIND_OPTS2;
- PBind_Opts2 = ^TBind_Opts2;
-
-// ****************************************************************************
-// * Structured Storage Interfaces
-// ****************************************************************************
-
-
-
- tagSTATSTG = types.tagSTATSTG;
-
- TStatStg = tagSTATSTG;
- PStatStg = types.PStatStg;
- STATSTG = TStatStg;
-
-{ TagRemSNB = Record
- ulCntStr : ULong;
- ulCntChar : ULong;
- [size_is(ulCntChar)] OLECHAR rgString[];
- End;
- RemSNB=TagRemSNB
- WireSNB=^RemSNB}
- SNB = ^PoleStr;
- tagDVTARGETDEVICE = Record
- tdSize : DWord;
- tdDriverNameOffset,
- tdDeviceNameOffset,
- tdPortNameOffset,
- tdExtDevmodeOffset : Word;
- Data : Record End;
- End;
-
- DVTARGETDEVICE = TagDVTARGETDEVICE;
- PDVTARGETDEVICE = ^tagDVTARGETDEVICE;
- LPCLIPFORMAT = ^TCLIPFORMAT;
- TCLIPFORMAT = Word;
- CLIPFORMAT = TCLIPFORMAT;
- PClipFormat = LPCLIPFORMAT;
-
- tagFORMATETC = Record
- CfFormat : Word {TCLIPFORMAT};
- Ptd : PDVTARGETDEVICE;
- dwAspect : DWORD;
- lindex : Long;
- tymed : DWORD;
- End;
- FORMATETC = TagFORMATETC;
- TFORMATETC = FORMATETC;
- LPFORMATETC = ^FORMATETC;
- PFormatEtc = LPFORMATETC;
-
- // Stats for data; used by several enumerations and by at least one
- // implementation of IDataAdviseHolder; if a field is not used, it
- // will be NULL.
-
-
- tagRemSTGMEDIUM = Record
- tymed : DWord;
- dwHandleType : DWord;
- pData,
- pUnkForRelease,
- cbData : ULong;
- Data : Record end;
- End;
-
- RemSTGMEDIUM = TagRemSTGMedium;
-
- TagSTGMEDIUM = Record
- Tymed : DWord;
- Case Integer Of
- 0 : (HBITMAP : hBitmap; PUnkForRelease : Pointer {IUnknown});
- 1 : (HMETAFILEPICT : hMetaFilePict );
- 2 : (HENHMETAFILE : hEnhMetaFile );
- 3 : (HGLOBAL : hGlobal );
- 4 : (lpszFileName : LPOLESTR );
- 5 : (pstm : Pointer{IStream} );
- 6 : (pstg : Pointer{IStorage} );
- End;
- USTGMEDIUM = TagSTGMEDIUM;
- STGMEDIUM = USTGMEDIUM;
- TStgMedium = TagSTGMEDIUM;
- PStgMedium = ^TStgMedium;
-
-//
-// wireSTGMEDIUM
-//
-// These flags are #defined (not enumerated) in wingdi.
-// We need to repeat #defines to avoid conflict in the generated file.
-//
-
- _GDI_OBJECT = Record
- ObjectType : DWord;
- Case Integer Of
- 0 : (HBitmap : WireHBITMAP);
- 1 : (hPalette: wireHPALETTE);
- 2 : (hGeneric: wireHGLOBAL);
- END;
- GDI_OBJECT = _GDI_OBJECT;
-
-
- _userSTGMEDIUM = Record
- tymed : DWORD;
- Case Integer OF
- 0 : (hMetaFilePict : wireHMETAFILEPICT;punkforrelease:Pointer {IUnknown});
- 1 : (hHEnhMetaFile : wireHENHMETAFILE);
- 2 : (hGdiHandle : ^GDI_OBJECT);
- 3 : (HGlobal : wireHGLOBAL);
- 4 : (lpszFileName : LPOLESTR);
- 5 : (pstm : ^BYTE_BLOB);
- 6 : (pstg : ^BYTE_BLOB);
- END;
-
- userSTGMEDIUM = _userSTGMEDIUM;
-
-
- LPSTGMEDIUM = ^STGMEDIUM;
-
- _userFLAG_STGMEDIUM = Record
- ContextFlags,
- fPassOwnership : Long;
- stgmed : userSTGMEDIUM;
- End;
-
- userFLAG_STGMEDIUM = _userFLAG_STGMEDIUM;
-
- wireFLAG_STGMEDIUM = ^userFLAG_STGMEDIUM;
-
-
- _FLAG_STGMEDIUM = Record
- ContextFlags,
- fPassOwnership : Long;
- Stgmed : STGMEDIUM;
- End;
- FLAG_STGMEDIUM = _FLAG_STGMEDIUM;
-
-
- VARIANTARG = VARIANT;
- LPVARIANT = ^VARIANT;
- LPVARIANTARG = ^VARIANT;
-
-// parameter description
-
- tagPARAMDESCEX = Record
- cBytes : ULong; // size of this structure
- varDefaultValue: VariantARG; // default value of this parameter
- End;
-
- PARAMDESCEX = tagPARAMDESCEX;
- LPPARAMDESCEX = ^PARAMDESCEX;
-
- tagPARAMDESC = Record
- pparamdescex: LPPARAMDESCEX ; // valid if PARAMFLAG_FHASDEFAULT bit is set
- wParamFlags : UShort ; // IN, OUT, etc
- End;
-
- PARAMDESC = tagPARAMDESC;
- LPPARAMDESC = ^PARAMDESC;
-
-
- tagSAFEARRAYBOUND = Record
- cElements : ULong;
- lLbound : Long;
- End;
- SAFEARRAYBOUND = tagSAFEARRAYBOUND;
- LPSAFEARRAYBOUND = ^SAFEARRAYBOUND;
-
- tagSAFEARRAY = record
- cDims: USHORT;
- fFeatures: USHORT;
- cbElements: ULONG;
- cLocks: ULONG;
- pvData: PVOID;
- rgsabound: array[0..0] of SAFEARRAYBOUND;
- end;
- TSafeArray = tagSAFEARRAY;
- SAFEARRAY = TSafeArray;
- PSafeArray = ^TSafeArray;
-
-// additional interface information about the incoming call
- tagINTERFACEINFO = Record
- Unk : Pointer {IUnknown}; // the pointer to the object
- IID : Tiid; // interface id
- wMethod : WORD; // interface method
- End;
-
- INTERFACEINFO = tagINTERFACEINFO;
- LPINTERFACEINFO = ^INTERFACEINFO;
- RPCOLEDATAREP = ULong;
- tagRPCOLEMESSAGE = Record
- Reserved1 : Pointer;
- DataRepresentation : RPCOLEDATAREP;
- Buffer : Pointer;
- cbBuffer,
- IMethod : ULong;
- Reserved2 : Array[0..4] Of Pointer;
- rpcFlags : ULong;
- End;
-
- RPCOLEMESSAGE = tagRPCOLEMESSAGE;
- PRPCOLEMESSAGE = ^RPCOLEMESSAGE;
-
- tagStorageLayout = Record
- LayoutType : Dword;
- pwcsElementName : POleStr;
- cOffset,
- cBytes : Large_Integer;
- End;
-
- StorageLayout = tagStorageLayout;
-
- tagSTATDATA = Record
- // field used by:
- FORMATETC : Tformatetc; // EnumAdvise, EnumData (cache), EnumFormats
- advf : DWord; // EnumAdvise, EnumData (cache)
- padvSink : Pointer {IAdviseSink}; // EnumAdvise
- dwConnection: DWord; // EnumAdvise
- End;
- STATDATA = TagStatData;
- LPStatData = ^StatData;
-
- pARRAYDESC = ^ARRAYDESC;
- pTYPEDESC = ^TYPEDESC;
- tagTYPEKIND = Dword;
- TYPEKIND = tagTYPEKIND;
- TTYPEKIND = TYPEKIND;
- INVOKEKIND = Dword;
- tagTYPEDESC = Record
- Case Integer OF
- VT_PTR,
- VT_SAFEARRAY : (lptdesc : PTYPEDESC;vt : VARTYPE);
- VT_CARRAY : (lpadesc : PARRAYDESC);
- VT_USERDEFINED : (hreftype : HREFTYPE);
- End;
- TYPEDESC = tagTYPEDESC;
-
-
-
-
- tagARRAYDESC = Record
- tdescElem : TYPEDESC; // element type
- cDims : USHORT;
- rgbounds : ARRAY [0..0] OF SAFEARRAYBOUND; // dimension count
- End;
-
- ARRAYDESC = tagARRAYDESC;
-
- tagIDLDESC = Record
- dwReserved : pULONG;
- wIDLFlags : USHORT; // IN, OUT, etc
- End;
- IDLDESC = tagIDLDESC;
- LPIDLDESC = ^IDLDESC;
-
-
- tagELEMDESC = Record
- tdesc : TYPEDESC;
- case Integer Of
- 0 : (idldesc : IDLDESC);
- 1 : (paramdesc : PARAMDESC);
- END;
-
- ELEMDESC = tagELEMDESC;
- LPELEMDESC = ^ELEMDESC;
- tagVARDESC = Record
- memId : MEMBERID;
- lpstrSchema : pOleStr;
- CASE Integer OF
- VAR_PERINSTANCE,
- VAR_DISPATCH,
- VAR_STATIC : (oInst : ULong; // offset of variable within the instance
- ElemdescVar : ELEMDESC;
- wVarFlags : WORD;
- varkind : VARKIND);
- VAR_CONST : (lpvarValue : PVARIANT); // the value of the constant
- End;
- VARDESC = tagVARDESC;
- LPVARDESC = ^VARDESC;
- pVARDESC = LPVARDESC;
- tagDISPPARAMS = Record
- rgvarg : lpVARIANTARG;
- rgdispidNamedArgs : lpDISPID;
- cArgs,
- cNamedArgs : UINT;
- End;
- DISPPARAMS = tagDISPPARAMS;
- TDispParams = tagDISPPARAMS;
- PDispParams = ^TDispParams;
-
- PExcepInfo = ^TExcepInfo;
- TFNDeferredFillIn = function(info : PExcepInfo): HRESULT;stdcall;
- tagEXCEPINFO = Record
- wCode, // An error code describing the error.
- wReserved : Word;
- Source, // A source of the exception
- Description, // A description of the error
- HelpFile : WideString; // Fully qualified drive, path, and file name
- dwHelpContext : ULONG; // help context of topic within the help file
- // We can use ULONG_PTR here, because EXCEPINFO is marshalled by RPC
- // RPC will marshal pfnDeferredFillIn.
- pvReserved : pointer;
- pfnDeferredFillIn : TFNDeferredFillIn;
- SCODE : scode;
- End;
-
- EXCEPINFO = tagEXCEPINFO;
- TExcepInfo = tagEXCEPINFO;
-
- tagTYPEATTR = Record
- GUID : Tguid; // the GUID of the TypeInfo
- LCID : lcid; // locale of member names and doc strings
- dwReserved : DWord;
- memidConstructor, // ID of constructor, MEMBERID_NIL if none
- memidDestructor : MemberID; // ID of destructor, MEMBERID_NIL if none
- lpstrSchema : pOleStr;
-
- cbSizeInstance : ULong; // the size of an instance of this type
- typekind : TYPEKIND; // the kind of type this typeinfo describes
- cFuncs, // number of functions
- cVars, // number of variables / data members
- cImplTypes, // number of implemented interfaces
- cbSizeVft, // the size of this types virtual func table
- cbAlignment, { specifies the alignment requirements for
- an instance of this type,
- 0 = align on 64k boundary
- 1 = byte align
- 2 = word align
- 4 = dword align... }
- wTypeFlags,
- wMajorVerNum, // major version number
- wMinorVerNum : Word; // minor version number
- tdescAlias : TYPEDESC; { if typekind == TKIND_ALIAS this field
- specifies the type for which this type
- is an alias }
- idldescType : IDLDESC; // IDL attributes of the described type
- END;
- TYPEATTR = tagTYPEATTR;
-
- LPTYPEATTR = ^TYPEATTR;
- PTYPEAttr = LPTYPEATTR;
-
- tagTLIBATTR = Record
- GUID : guid;
- LCID : lcid;
- SYSKIND : syskind;
- wMajorVerNum,
- wMinorVerNum,
- wLibFlags : Word
- End;
-
- TLIBATTR = tagTLIBATTR;
- LPTLIBATTR = ^tagTLIBATTR;
- PTLIBAttr = LPTLIBATTR;
-
- LPFUNCDESC = ^FUNCDESC;
- PFUNCDESC = LPFUNCDESC;
-
- tagFUNCDESC = Record
- memid : MEMBERID;
- lprgscode : PResultList;
- lprgelemdescParam : lpELEMDESC; // array of param types
- FUNCKIND : funckind;
- invkind : INVOKEKIND;
- callconv : CALLCONV;
- cParams,
- cParamsOpt,
- oVft,
- cScodes : SHORT;
- elemdescFunc : ELEMDESC;
- wFuncFlags : WORD;
- End;
- FUNCDESC = tagFUNCDESC;
-
-
- tagBINDPTR = Record
- case integer Of
- 0 : (lpfuncdesc : LPFUNCDESC);
- 1 : (lpvardesc : LPVARDESC);
- 2 : (lptcomp : Pointer {ITypeComp} );
- End;
- BINDPTR = tagBINDPTR;
- LPBINDPTR = ^BINDPTR;
-
- tagCUSTDATAITEM = Record
- GUID : TGuid; // guid identifying this custom data item
- varValue : VARIANTARG; // value of this custom data item
- End;
-
- CUSTDATAITEM = tagCUSTDATAITEM;
-
- LPCUSTDATAITEM = ^CUSTDATAITEM;
-
- tagCUSTDATA = Record
- cCustData : DWord; // number of custom data items in rgCustData
- prgCustData : LPCUSTDATAITEM; // array of custom data items
- End;
-
- CUSTDATA = tagCUSTDATA;
- LPCUSTDATA = ^CUSTDATA;
-
- PPROPVARIANT = ^TPROPVARIANT;
-
-
-
- tagPROPSPEC = record
- ulKind : ULONG ;
- case boolean of
- false : ( propid:propid);
- true : (lpwstr: LPOLEStr);
- end;
-
- PROPSPEC= tagPROPSPEC;
- TPROPSPEC = PROPSPEC;
- PPROPSPEC = ^TPROPSPEC;
-
- tagSTATPROPSTG = record
- lpwstrName : LPOLESTR ;
- propid:PROPID ;
- vt : VARTYPE;
- end;
- STATPROPSTG = tagSTATPROPSTG;
- TSTATPROPSTG = STATPROPSTG;
- PSTATPROPSTG = ^TSTATPROPSTG;
-
- tagSTATPROPSETSTG = record
- fmtid : FMTID;
- clsid : CLSID;
- grfFlags : DWORD;
- mtime : FILETIME;
- ctime : FILETIME;
- atime : FILETIME;
- dwOSVersion : DWORD;
- end;
- STATPROPSETSTG = tagSTATPROPSETSTG;
- TSTATPROPSETSTG = STATPROPSETSTG;
- PSTATPROPSETSTG = ^STATPROPSETSTG;
-
- tagVersionedStream = record
- guidVersion : TGUID;
- pStream : pointer; {IStream}
- end;
- VERSIONEDSTREAM = tagVersionedStream;
- TVERSIONEDSTREAM = tagVersionedStream;
- LPVERSIONEDSTREAM = tagVersionedStream;
- PVERSIONEDSTREAM = ^TagVersionedStream;
-
-
- LPSAFEARRAY = ^SAFEARRAY;
- tagDEC = record // simpler remoting variant without nested unions. see wtypes.h
- wReserved : ushort;
- scale,
- sign : byte;
- hi32 : ULONG;
- lo64 : ULONGLONG;
- end;
- TDECIMAL=tagDEC;
- PDecimal=^TDECIMAL;
-
- tagCAC = record
- cElems : ULONG;
- pElems : pCHAR;
- end;
- CAC = tagCAC;
- TCAC = tagCAC;
- tagCAUB = record
- cElems : ULONG;
- pElems : pUCHAR;
- end;
- CAUB = tagCAUB;
- TCAUB = tagCAUB;
- tagCAI = record
- cElems : ULONG;
- pElems : pSHORT;
- end;
- CAI = tagCAI;
- TCAI = tagCAI;
- tagCAUI = record
- cElems : ULONG;
- pElems : pUSHORT;
- end;
- CAUI = tagCAUI;
- TCAUI = tagCAUI;
- tagCAL = record
- cElems : ULONG;
- pElems : pLONG;
- end;
- CAL = tagCAL;
- TCAL = tagCAL;
- tagCAUL = record
- cElems : ULONG;
- pElems : pULONG;
- end;
- CAUL = tagCAUL;
- TCAUL = tagCAUL;
- tagCAFLT = record
- cElems : ULONG;
- pElems : pSingle;
- end;
- CAFLT = tagCAFLT;
- TCAFLT = tagCAFLT;
- tagCADBL = record
- cElems : ULONG;
- pElems : ^DOUBLE;
- end;
- CADBL = tagCADBL;
- TCADBL = tagCADBL;
- tagCACY = record
- cElems : ULONG;
- pElems : ^CY;
- end;
- CACY = tagCACY;
- TCACY = tagCACY;
- tagCADATE = record
- cElems : ULONG;
- pElems : ^DATE;
- end;
- CADATE = tagCADATE;
- TCADATE = tagCADATE;
- tagCABSTR = record
- cElems : ULONG;
- pElems : ^BSTR;
- end;
- CABSTR = tagCABSTR;
- TCABSTR = tagCABSTR;
- tagCABSTRBLOB = record
- cElems : ULONG;
- pElems : ^BSTRBLOB;
- end;
- CABSTRBLOB = tagCABSTRBLOB;
- TCABSTRBLOB = tagCABSTRBLOB;
- tagCABOOL = record
- cElems : ULONG;
- pElems : ^VARIANT_BOOL;
- end;
- CABOOL = tagCABOOL;
- TCABOOL = tagCABOOL;
- tagCASCODE = record
- cElems : ULONG;
- pElems : ^SCODE;
- end;
- CASCODE = tagCASCODE;
- TCASCODE = tagCASCODE;
- tagCAPROPVARIANT = record
- cElems : ULONG;
- pElems : ^PROPVARIANT;
- end;
- CAPROPVARIANT = tagCAPROPVARIANT;
- TCAPROPVARIANT = tagCAPROPVARIANT;
- tagCAH = record
- cElems : ULONG;
- pElems : ^LARGE_INTEGER;
- end;
- CAH = tagCAH;
- TCAH = tagCAH;
- tagCAUH = record
- cElems : ULONG;
- pElems : ^ULARGE_INTEGER;
- end;
- CAUH = tagCAUH;
- TCAUH = tagCAUH;
- tagCALPSTR = record
- cElems : ULONG;
- pElems : ^LPSTR;
- end;
- CALPSTR = tagCALPSTR;
- TCALPSTR = tagCALPSTR;
- tagCALPWSTR = record
- cElems : ULONG;
- pElems : ^LPWSTR;
- end;
- CALPWSTR = tagCALPWSTR;
- TCALPWSTR = tagCALPWSTR;
- tagCAFILETIME = record
- cElems : ULONG;
- pElems : ^FILETIME;
- end;
- CAFILETIME = tagCAFILETIME;
- TCAFILETIME = tagCAFILETIME;
- tagCACLIPDATA = record
- cElems : ULONG;
- pElems : ^CLIPDATA;
- end;
- CACLIPDATA = tagCACLIPDATA;
- TCACLIPDATA = tagCACLIPDATA;
- tagCACLSID = record
- cElems : ULONG;
- pElems : ^CLSID;
- end;
- CACLSID = tagCACLSID;
- TCACLSID = tagCACLSID;
-
- PROPVAR_PAD1 = WORD;
- PROPVAR_PAD2 = WORD;
- PROPVAR_PAD3 = WORD;
-
-// Forward interfaces.
-
- IStream = Types.IStream;
- IMoniker = Interface;
- IEnumMoniker = Interface;
- IEnumString = Interface;
- IRunningObjectTable = Interface;
- IStorage = Interface;
- IEnumSTATSTG = Interface;
- IAdviseSink = Interface;
- IBindCtx = Interface;
- IAsyncManager = Interface;
- ICallFactory = Interface;
- ISynchronize = Interface;
- ITypeLib = Interface;
- IPropertyStorage = Interface;
- IEnumSTATPROPSETSTG = interface;
-
- TPROPVARIANT = record
- vt : VARTYPE;
- wReserved1 : PROPVAR_PAD1;
- wReserved2 : PROPVAR_PAD2;
- wReserved3 : PROPVAR_PAD3;
- case longint of
- 0 : ( cVal : CHAR );
- 1 : ( bVal : UCHAR );
- 2 : ( iVal : SHORT );
- 3 : ( uiVal : USHORT );
- 4 : ( lVal : LONG );
- 5 : ( ulVal : ULONG );
- 6 : ( intVal : longINT );
- 7 : ( uintVal : UINT );
- 8 : ( hVal : LARGE_INTEGER );
- 9 : ( uhVal : ULARGE_INTEGER );
- 10 : ( fltVal : SINGLE );
- 11 : ( dblVal : DOUBLE );
- 12 : ( boolVal : VARIANT_BOOL );
- 13 : ( bool : _VARIANT_BOOL );
- 14 : ( scode : SCODE );
- 15 : ( cyVal : CY );
- 16 : ( date : DATE );
- 17 : ( filetime : FILETIME );
- 18 : ( puuid : ^CLSID );
- 19 : ( pclipdata : ^CLIPDATA );
- 20 : ( bstrVal : BSTR );
- 21 : ( bstrblobVal : BSTRBLOB );
- 22 : ( blob : BLOB );
- 23 : ( pszVal : LPSTR );
- 24 : ( pwszVal : LPWSTR );
- 25 : ( punkVal : pointer; { IUnknown to avoid Data types which require initialization/finalization can't be used in variant records});
- 26 : ( pdispVal : pointer; {IDispatch} );
- 27 : ( pStream : pointer {IStream} );
- 28 : ( pStorage : pointer{IStorage} );
- 29 : ( pVersionedStream : LPVERSIONEDSTREAM );
- 30 : ( parray : LPSAFEARRAY );
- 31 : ( cac : CAC );
- 32 : ( caub : CAUB );
- 33 : ( cai : CAI );
- 34 : ( caui : CAUI );
- 35 : ( cal : CAL );
- 36 : ( caul : CAUL );
- 37 : ( cah : CAH );
- 38 : ( cauh : CAUH );
- 39 : ( caflt : CAFLT );
- 40 : ( cadbl : CADBL );
- 41 : ( cabool : CABOOL );
- 42 : ( cascode : CASCODE );
- 43 : ( cacy : CACY );
- 44 : ( cadate : CADATE );
- 45 : ( cafiletime : CAFILETIME );
- 46 : ( cauuid : CACLSID );
- 47 : ( caclipdata : CACLIPDATA );
- 48 : ( cabstr : CABSTR );
- 49 : ( cabstrblob : CABSTRBLOB );
- 50 : ( calpstr : CALPSTR );
- 51 : ( calpwstr : CALPWSTR );
- 52 : ( capropvar : CAPROPVARIANT );
- 53 : ( pcVal : pCHAR );
- 54 : ( pbVal : pUCHAR );
- 55 : ( piVal : pSHORT );
- 56 : ( puiVal : pUSHORT );
- 57 : ( plVal : pLONG );
- 58 : ( pulVal : pULONG );
- 59 : ( pintVal : plongint );
- 60 : ( puintVal : pUINT );
- 61 : ( pfltVal : psingle );
- 62 : ( pdblVal : pDOUBLE );
- 63 : ( pboolVal : ^VARIANT_BOOL );
- 64 : ( pdecVal : pDECIMAL );
- 65 : ( pscode : ^SCODE );
- 66 : ( pcyVal : ^CY );
- 67 : ( pdate : ^DATE );
- 68 : ( pbstrVal : ^TBSTR );
- 69 : ( ppunkVal : ^IUnknown );
- 70 : ( ppdispVal : ^IDispatch );
- 71 : ( pparray : ^LPSAFEARRAY );
- 72 : ( pvarVal : ^PROPVARIANT );
- end;
- PROPVARIANT=TPROPVARIANT;
- TagPROPVARIANT = TPROPVARIANT;
-// Unknwn.idl
-
-// IUnknown is in classesh.inc
-
-
-
- AsyncIUnknown = Interface(IUnknown)
- ['{000e0000-0000-0000-C000-000000000046}']
- Function Begin_QueryInterface(Const riid : TIID): HResult; StdCall;
- Function Finish_QueryInterface(Out ppvObject : Pointer):HResult;StdCall;
- Function Begin_AddRef:HResult;StdCall;
- Function Finish_AddRef:ULong;StdCall;
- Function Begin_Release:HResult;StdCall;
- Function Finish_Release:ULong;StdCall;
- End;
-
- IClassFactory = Interface(IUnknown)
- ['{00000001-0000-0000-C000-000000000046}']
- Function CreateInstance(Const unkOuter:IUnknown;Const riid : TIID;Out vObject):HResult; StdCall;
- Function LockServer(fLock : Bool):HResult;StdCall;
- End;
-
- PLicInfo = ^TLicInfo;
- tagLICINFO = record
- cbLicInfo : ULONG;
- fRuntimeKeyAvail : BOOL;
- fLicVerified : BOOL;
- end;
- TLicInfo = tagLICINFO;
- LICINFO = TLicInfo;
-
- IClassFactory2 = interface(IClassFactory)
- ['{B196B28F-BAB4-101A-B69C-00AA00341D07}']
- function GetLicInfo(var licInfo: TLicInfo): HResult; stdcall;
- function RequestLicKey(dwResrved: DWORD; out bstrKey: WideString): HResult; stdcall;
- function CreateInstanceLic(const unkOuter: IUnknown; const unkReserved: IUnknown;
- const iid: TIID; const bstrKey: WideString; out vObject): HResult; stdcall;
- end;
-
-// objidl.idl
-
-{****************************************************************************
- * Component Object Interfaces
- ****************************************************************************}
-
- IMarshal = Interface(IUnknown)
- ['{00000003-0000-0000-C000-000000000046}']
- Function GetUnmarshalClass ( Const riid: TIID; pv:Pointer; Const dwDestContext:DWord;
- pvDestContext:Pointer; Const mshlflags:DWORD;out LCid : TCLSID ):HResult;Stdcall;
- Function GetMarshalSizeMax ( Const Riid: TIID; {in, unique} pv:Pointer; Const dwDestContext : DWord;
- {in, unique} pvDestContext:Pointer; Const mshlflags : DWord; out pSize : PDWord ): HResult;Stdcall;
- Function MarshalInterface ( Const {in, unique} pStm: IStream; Const riid: TIID; {in, unique} pv:Pointer;
- Const dwDestContext:DWord; {in, unique} pvDestContext:Pointer; Const mshlflags:DWord ): HRESULT;Stdcall;
- Function UnmarshalInterface ( {[in, unique]} Const pStm:IStream; Const riid: TIID;
- out ppv ): HResult;Stdcall;
- Function ReleaseMarshalData ( {[in, unique]} Const Strm: IStream ):HResult;Stdcall;
- Function DisconnectObject ( Const dwReserved:DWord ):HRESULT;Stdcall;
- END;
-
-
- IMarshal2 = Interface(IMarshal)
- ['{000001cf-0000-0000-C000-000000000046}']
- End;
-
- IMalloc = Interface(IUnknown)
- ['{00000002-0000-0000-C000-000000000046}']
- Function Alloc(cb :size_t):Pointer; Stdcall;
- Function Realloc (pv :pointer;cb:size_t):Pointer;stdcall;
- Procedure Free({[in]} pv: pointer); Stdcall;
- Function GetSize(pv:pointer):size_t;stdcall;
- Function DidAlloc(pv:pointer):Longint;stdcall;
- procedure HeapMinimize; stdcall;
- End;
-
- IMallocSpy = Interface(IUnknown)
- ['{0000001d-0000-0000-C000-000000000046}']
-
- Function PreAlloc(cbrequest:Size_t):Longint; StdCall;
- function PostAlloc(Pactual:Pointer):Pointer;StdCall;
- Function PreFree(pRequest:Pointer;fSpyed:bool):pointer;StdCall;
- Procedure PostFree(fspyed:Bool);Stdcall;
- Function PreRealloc(pRequest:Pointer;cbRequest:Size_t;Out ppNewRequest:Pointer;
- fSpyed:Bool):Size_t;Stdcall;
- Function PostRealloc(pactual:Pointer;fspyed:Bool):pointer;Stdcall;
- Function PreGetSize(pRequest:pointer;fSpyed:Bool):Pointer;StdCall;
- Function PostGetSize(cbactual:Size_t;fSpyed:Bool):Size_t;StdCall;
- Function PreDidAlloc(pRequest:pointer;fSpyed:Bool):pointer;stdcall;
- Function PostDidAlloc(pRequest:pointer;fSpyed:Bool;Factual:Longint):pointer;stdcall;
- Procedure PreHeapMinimize;StdCall;
- Procedure PostHeapMinimize;StdCall;
- End;
-
- IStdMarshalInfo = Interface(IUnknown)
- ['{00000018-0000-0000-C000-000000000046}']
- Function GetClassForHandler (dwDestContext : DWord;pvDestContext:pointer;out Clsid : Pclsid ):HResult;Stdcall;
- End;
-
-
- IExternalConnection = Interface(IUnknown)
- ['{00000019-0000-0000-C000-000000000046}']
- Function AddConnection (ExtConn: DWord; Reserved: DWord):DWord;Stdcall;
- Function ReleaseConnection(extconn: DWord; Reserved: Dword;FLastReleaseCloses: Bool):DWord;StdCall;
- End;
-
-
- IMultiQI = Interface(IUnknown)
- ['{00000020-0000-0000-C000-000000000046}']
-//if (__midl >= 500)
-// async_uuid(000e0020-0000-0000-C000-000000000046)
-//endif
- Function QueryMultipleInterfaces(cMQIs:Ulong;pMQIs:pMultiQI):HResult;StdCall;
- END;
-
- IInternalUnknown=Interface(IUnknown)
- ['{00000021-0000-0000-C000-000000000046}']
- Function QueryInternalInterface(const riid:TIID;Out ppv:Pointer):HResult;StdCall;
- END;
-
-
- IEnumUnknown = Interface(IUnknown)
- ['{00000100-0000-0000-C000-000000000046}']
- // pointer_default(unique)
- Function Next(Celt:Ulong;out rgelt;out pCeltFetched:pulong):HRESULT;StdCall;
-// HRESULT RemoteNext( [in] ULONG celt, [out, size_is(celt), length_is( *pceltFetched)] IUnknown **rgelt, [out] ULONG *pceltFetched);
- Function Skip(Celt:Ulong):HResult;StdCall;
- Function Reset():HResult;
- Function Close(Out ppenum: IEnumUnknown):HResult;
- END;
-
-
- IBindCtx = Interface (IUnknown)
- ['{0000000e-0000-0000-C000-000000000046}']
- Function RegisterObjectBound(Const punk:IUnknown):HResult; stdCall;
- Function RevokeObjectBound (Const Punk:IUnknown):HResult; stdCall;
- Function ReleaseBoundObjects :HResult; StdCall;
- Function SetBindOptions(Const bindOpts:TBind_Opts):HResult; stdCall;
-// Function RemoteSetBindOptions(Const bind_opts: TBind_Opts2):HResult;StdCall;
- Function GetBindOptions(var BindOpts:TBind_Opts):HResult; stdCall;
-// Function RemoteGetBindOptions(Var bind_opts: TBind_Opts2):HResult;StdCall;
- Function GetRunningObjectTable(Out rot : IRunningObjectTable):Hresult; StdCall;
- Function RegisterObjectParam(Const pszkey:LPOleStr;const punk:IUnknown):HResult;
- Function GetObjectParam(Const pszkey:LPOleStr; out punk: IUnknown):HResult; StdCall;
- Function EnumObjectParam (out enum:IEnumString):Hresult;StdCall;
- Function RevokeObjectParam(pszKey:LPOleStr):HResult;StdCall;
- End;
-
-
- IEnumMoniker = Interface (IUnknown)
- ['{00000102-0000-0000-C000-000000000046}']
- Function Next(celt:ULong; out Elt;out celftfetched: ULong):HResult; StdCall;
-// Function RemoteNext(Celt:ULong; Out rgelt;out celtfetched :ULong):Hresult; StdCall;
- Function Skip(celt:Ulong):HResult; StdCall;
- Function Reset:HResult; StdCall;
- Function Close(out penum:IEnumMoniker):HResult;StdCall;
- End;
-
-
- IRunnableObject = Interface(IUnknown)
- ['{00000126-0000-0000-C000-000000000046}']
- Function GetRunningClass(Out clsid:Tclsid):Hresult; StdCall;
- Function Run(Const pb: IBindCtx):HResult; StdCall;
- Function IsRunning:Bool; StdCall;
-// Function RemoteIsRunning:Bool; StdCall;
- Function LockRunning(FLock,FLastUnlockClose:BOOL):HResult; StdCall;
- Function SetContainedObject(fContained:Bool):Hresult;Stdcall;
- End;
-
- IRunningObjectTable = Interface (IUnknown)
- ['{00000010-0000-0000-C000-000000000046}']
- Function Register (grfFlags :DWord;const unkobject:IUnknown;Const mkObjectName:IMoniker;Out dwregister:DWord):HResult;StdCall;
- Function Revoke (dwRegister:DWord):HResult; StdCall;
- Function IsRunning (Const mkObjectName: IMoniker):HResult;StdCall;
- Function GetObject (Const mkObjectName: IMoniker; Out punkObject:IUnknown):HResult; StdCall;
- Function NoteChangeTime(dwRegister :DWord;Const FileTime: TFileTime):HResult;StdCall;
- Function GetTimeOfLastChange(Const mkObjectName:IMoniker;Out filetime:TFileTime):HResult; StdCall;
- Function EnumRunning (Out enumMoniker: IEnumMoniker):HResult; StdCall;
- End;
-
- IPersist = Interface (IUnknown)
- ['{0000010c-0000-0000-C000-000000000046}']
- Function GetClassId(out clsid:TClsId):HResult; StdCall;
- End;
-
- IPersistStream = Interface(IPersist)
- ['{00000109-0000-0000-C000-000000000046}']
- Function IsDirty:HResult; StdCall;
- Function Load(Const stm: IStream):HResult; StdCall;
- Function Save(Const stm: IStream;fClearDirty:Bool):HResult;StdCall;
- Function GetSizeMax(Out cbSize:ULarge_Integer):HResult; StdCall;
- End;
-
- PIMoniker = ^IMoniker;
- IMoniker = Interface (IPersistStream)
- ['{0000000f-0000-0000-C000-000000000046}']
- Function BindToObject (const pbc:IBindCtx;const mktoleft:IMoniker; const RiidResult:TIID;Out vresult):HResult;StdCall;
-// Function RemoteBindToObject (const pbc:IBindCtx;const mktoleft:IMoniker;const RiidResult:TIID;Out vresult):HResult;StdCall;
- Function BindToStorage(Const Pbc:IBindCtx;Const mktoLeft:IMoniker; const Riid:TIID;Out vobj):HResult; StdCall;
-// Function RemoteBindToStorage(Const Pbc:IBindCtx;Const mktoLeft:IMoniker;const Riid:TIID;Out vobj):HResult; StdCall;
- Function Reduce (const pbc:IBindCtx; dwReduceHowFar:DWord; mktoLeft: PIMoniker; Out mkReduced:IMoniker):HResult; StdCall;
- Function ComposeWith(Const MkRight:IMoniker;fOnlyIfNotGeneric:BOOL; OUT mkComposite:IMoniker):HResult; StdCall;
- Function Enum(fForward:Bool;Out enumMoniker:IEnumMoniker):HResult;StdCall;
- Function IsEqual(Const mkOtherMoniker:IMoniker):HResult;StdCall;
- Function Hash (Out dwHash:Dword):HResult;StdCall;
- Function IsRunning(Const bc:IBindCtx;Const MkToLeft:IMoniker;Const mknewlyRunning:IMoniker):HResult;StdCall;
- Function GetTimeOfLastChange(Const bc:IBindCtx;Const mkToLeft:IMoniker; out ft : FileTime):HResult; StdCall;
- Function Inverse(out mk : IMoniker):HResult; StdCall;
- Function CommonPrefixWith (Const mkOther:IMoniker):HResult; StdCall;
- Function RelativePathTo(Const mkother:IMoniker; Out mkRelPath : IMoniker):HResult;StdCall;
- Function GetDisplayName(Const bc:IBindCtx;const mktoleft:IMoniker;Out szDisplayName: pOleStr):HResult; StdCall;
- Function ParseDisplayName(Const bc:IBindCtx;Const mkToLeft:IMoniker;szDisplayName:POleStr;out cheaten:ULong;out mkOut:IMoniker):HResult; StdCall;
- Function IsSystemMoniker(Out dwMkSys:DWord):HResult;StdCall;
- End;
-
- IROTData = Interface (IUnknown)
- ['{f29f6bc0-5021-11ce-aa15-00006901293f}']
- Function GetComparisonData(out data; cbMax:ULong;out cbData:ULong):HResult;StdCall;
- End;
-
-
- IEnumString = Interface (IUnknown)
- ['{00000101-0000-0000-C000-000000000046}']
- Function Next(Celt:ULong;Out xcelt;Out Celtfetched:ULong):HResult; StdCall;
-// Function RemoteNext(Celt:ULong; Out celt;Out Celtfetched:ULong):HResult; StdCall;
- Function Skip (Celt:ULong):Hresult;StdCall;
- Function Reset:HResult;StdCall;
- Function Clone(Out penum:IEnumString):HResult;StdCall;
- End;
-
- ISequentialStream = Types.ISequentialStream;
- (*interface(IUnknown)
- ['{0c733a30-2a1c-11ce-ade5-00aa0044773d}']
- function Read(pv : Pointer;cb : ULONG;pcbRead : PULONG) : HRESULT;stdcall;
- function Write(pv : Pointer;cb : ULONG;pcbWritten : PULONG): HRESULT;stdcall;
- end;
- *)
-
- (* defined above by pulling it in from types IStream = interface(ISequentialStream)
- ['{0000000C-0000-0000-C000-000000000046}']
- function Seek(dlibMove : LargeInt; dwOrigin: Longint;
- out libNewPosition : LargeInt): HResult; stdcall;
- function SetSize(libNewSize : LargeInt) : HRESULT;stdcall;
- function CopyTo(stm: IStream;cb : LargeInt;out cbRead : LargeInt;
- out cbWritten: LargeInt) : HRESULT;stdcall;
- function Commit(grfCommitFlags : Longint) : HRESULT; stdcall;
- function Revert : HRESULT; stdcall;
- function LockRegion(libOffset : LargeInt;cb : LargeInt;
- dwLockType: Longint) : HRESULT;stdcall;
- function UnlockRegion(libOffset: LargeInt;cb: LargeInt;
- dwLockType: Longint) : HRESULT;stdcall;
- Function Stat(out statstg : TStatStg; grfStatFlag: Longint): HRESULT;stdcall;
- function Clone(out stm : IStream) : HRESULT; stdcall;
- end;
- *)
- IEnumSTATSTG = Interface (IUnknown)
- ['{0000000d-0000-0000-C000-000000000046}']
- Function Next (Celt:ULong;Out xcelt;pceltfetched : PUlong):HResult; StdCall;
-// Function RemoteNext(Celt:Ulong; Out Celt;pceltfetched : PUlong);
- Function Skip(Celt:ULong):HResult; StdCall;
- Function Reset:HResult; StdCall;
- Function Clone(Out penum:IEnumStatSTG):HResult; StdCall;
- End;
-
- IStorage = Interface (IUnknown)
- ['{0000000b-0000-0000-C000-000000000046}']
- Function CreateStream(pwcsname:POleStr;GrfMode,Reserved1,Reserved2 : DWord; Out stm : IStream):HResult; StdCall;
- Function OpenStream(pwcsname:POleStr;Reserved1:Pointer;GrfMode,Reserved2 : DWord; Out stm : IStream):HResult; StdCall;
-// Function RemouteOpenStream(pwcsname:POleStr;cbReserved1:ULong;reserved1:pbyte;GrfMode,Reserved2 : DWord; Out stm : IStream):HResult; StdCall;
- Function CreateStorage(pwcsname:POleStr;GrfMode,Reserved1,Reserved2 : DWord; Out stm : IStorage):HResult; StdCall;
- Function OpenStorage(pwcsname:POleStr;Const stgPriority:IStorage;grfmode : DWord;Const SNBExclude :SNB;reserved:DWord;Out stm : IStorage):HResult; StdCall;
- Function CopyTo(ciidExclude:DWord; rgiidexclude:piid; const snbexclude:SNB;const pstg : IStorage):HResult;StdCall;
- Function MoveElementTo(wcsName:POleStr;Const pstgDest : IStorage;
- wcvsNewName:POleStr; GrfFlags:DWord):Hresult; StdCall;
- Function Commit(grfCommitFlags:Dword):Hresult; StdCall;
- Function Revert:HResult; StdCall;
- Function EnumElements(Reserved1 :Dword;Reserved2:Pointer;Reserved3:DWord;Out penum:IEnumStatStg):HResult;StdCall;
- Function RemoteEnumElements(Reserved1 :Dword;cbReserved2:ULong;Reserved2:pbyte;reserved3:DWord;Out penum:IEnumStatStg):HResult;StdCall;
- Function DestroyElement(wcsName: POleStr):HResult;StdCall;
- Function RenameElement(wcsoldName: POleStr;wcsnewName: POleStr):HResult;StdCall;
- Function SetElementTimes(wcsName:POleStr; Const pctime,patime,pmtime : FileTime):HResult;StdCall;
- Function SetClass(Const ClasId: TClsID):HResult;StdCall;
- Function SetStateBits(grfStateBits:DWord;grfMask:DWord):HResult;StdCall;
- Function Stat(Out pStatStg:StatStg;grfStatFlag:DWord):HResult;StdCall;
- End;
-
- IPersistFile = Interface (IPersist)
- ['{0000010b-0000-0000-C000-000000000046}']
- Function IsDirty:HResult;StdCall;
- Function Load(FileName:POleStr;dwMode:DWord):HResult;StdCall;
- Function Save(FileName:POleStr;fremember:Bool):HResult;StdCall;
- Function SaveCompleted(FileName:POleStr):HResult;StdCall;
- Function GetCurFIle(Out FileName:POleStr):HResult;StdCall;
- End;
-
-
- IPersistStorage = Interface (IPersist)
- ['{0000010a-0000-0000-C000-000000000046}']
- Function IsDirty:HResult;StdCall;
- Function InitNew(const pstg:IStorage):HResult;StdCall;
- Function Load(const pstg:IStorage):HResult;StdCall;
- Function Save(const pstg:IStorage;FSameAsLoad:Boolean):HResult;StdCall;
- Function SaveCompleted(const pstg:IStorage):HResult;StdCall;
- Function HandsOffStorage:HResult;StdCall;
- End;
-
- ILockBytes = Interface (IUnknown)
- ['{0000000a-0000-0000-C000-000000000046}']
- Function ReadAt(ulOffset:ULarge_Integer;pv:Pointer;cb:Ulong; Out pcbRead:ULong):HResult; StdCall;
-// Function RemoteReadAt(ulOffset:ULarge_Integer;pv:Pointer;cb:Ulong; Out pcbRead:ULong):HResult; StdCall;
- Function WriteAt(ulOffset:ULarge_Integer;pv:Pointer;cb:Ulong; Out pcbWritten:ULong):HResult; StdCall;
-// Function RemoteWriteAt(ulOffset:ULarge_Integer;pv:Pointer;cb:Ulong; Out pcbWritten:ULong):HResult; StdCall;
- Function Flush:HResult;StdCall;
- Function SetSize(cb:ULarge_Integer):HResult;StdCall;
- Function LockRegion(LibOffSet:ULarge_Integer;cb:ULarge_Integer;dwLockType:DWord):HResult;StdCall;
- Function UnlockRegion(LibOffSet:ULarge_Integer;cb:ULarge_Integer;dwLockType:DWord):HResult;StdCall;
- Function Stat(Out pstatstg:STATSTG;grfstatFlag:DWord):HResult;StdCall;
- End;
-
-
- IEnumFORMATETC = Interface (IUnknown)
- ['{00000103-0000-0000-C000-000000000046}']
- Function Next(Celt:ULong;Out Rgelt:FormatEtc;pceltFetched:pULong=nil):HResult; StdCall;
-// Function RemoteNext(Celt:ULong;Out Rgelt:FormatEtc; pceltFetched:pULong=nil):HResult; StdCall;
- Function Skip(Celt:ULong):HResult;StdCall;
- Function Reset:HResult;StdCall;
- Function Clone(out penum:IEnumFORMATETC):HResult;StdCall;
- End;
-
- IEnumSTATDATA = Interface (IUnknown)
- ['{00000105-0000-0000-C000-000000000046}']
- Function Next(Celt:ULong;Out Rgelt:statdata; pceltFetched:pULong=nil):HResult; StdCall;
-// Function RemoteNext(Celt:ULong;Out Rgelt:statdata;Out pceltFetched:ULong):HResult; StdCall;
- Function Skip(Celt:ULong):HResult;StdCall;
- Function Reset:HResult;StdCall;
- Function Clone(out penum:IEnumstatdata):HResult;StdCall;
- End;
-
-
-
- IRootStorage = Interface (IUnknown)
- ['{00000012-0000-0000-C000-000000000046}']
- Function SwitchToFile(pszfile:PoleStr):HResult;StdCall;
- End;
-
-
-
- IAdviseSink = Interface (IUnknown)
- ['{0000010f-0000-0000-C000-000000000046}']
- {$ifdef midl500} ['{00000150-0000-0000-C000-000000000046}'] {$endif}
- Procedure OnDataChange (Const pformatetc : Formatetc;const pstgmed : STGMEDIUM); StdCall;
- Procedure OnViewChange (dwAspect : DWord; lindex : Long); StdCall;
- Procedure OnRename (Const pmk : IMoniker); StdCall;
- Procedure OnSave; StdCall;
- Procedure OnClose; StdCall;
- End;
-
- IAdviseSink2 = Interface (IAdviseSink)
- ['{00000125-0000-0000-C000-000000000046}']
- Procedure OnLinkSrcChange(Const Pmk: IMoniker); StdCall;
- End;
-
-
- IDataObject = Interface (IUnknown)
- ['{0000010e-0000-0000-C000-000000000046}']
- Function GetData(Const formatetcIn : FORMATETC;Out medium : STGMEDIUM):HRESULT; STDCALL;
- Function GetDataHere(CONST pformatetc : FormatETC; Out medium : STGMEDIUM):HRESULT; STDCALL;
- Function QueryGetData(const pformatetc : FORMATETC):HRESULT; STDCALL;
- Function GetCanonicalFormatEtc(const pformatetcIn : FORMATETC;Out pformatetcOut : FORMATETC):HResult; STDCALl;
- Function SetData (Const pformatetc : FORMATETC;const medium:STGMEDIUM;FRelease : BOOL):HRESULT; StdCall;
- Function EnumFormatEtc(dwDirection : DWord; OUT enumformatetcpara : IENUMFORMATETC):HRESULT; StdCall;
- Function DAdvise(const formatetc : FORMATETC;advf :DWORD; CONST AdvSink : IAdviseSink;OUT dwConnection:DWORD):HRESULT;StdCall;
- Function DUnadvise(dwconnection :DWord) :HRESULT;StdCall;
- Function EnumDAdvise(Out enumAdvise : IEnumStatData):HResult;StdCall;
- End;
-
- IDataAdviseHolder = Interface (IUnknown)
- ['{00000110-0000-0000-C000-000000000046}']
- Function Advise (CONST pdataObject : IDataObject;CONST fetc:FORMATETC;advf : DWORD;Const pAdvise:IAdviseSink;Out DwConnection:DWord):HResult; StdCall;
- Function Unadvise (dwConnection:Dword):HResult; StdCall;
- Function EnumAdvise(out penumAdvise : IEnumStatData):HResult;StdCall;
- Function SendOnDataChange(const pDataObject :IDataObject;DwReserved,advf : DWord):HResult; StdCall;
- End;
-
-
-
-
- IMessageFilter = Interface (IUnknown)
- ['{00000016-0000-0000-C000-000000000046}']
- Function HandleInComingCall(dwCallType :DWord;htaskCaller : HTASK; dwTickCount: DWORD;CONST sinterfaceinfo:InterfaceInfo):DWord; StdCall;
- Function RetryRejectedCall (htaskCallee:HTASK; dwTickCount : DWord; dwRejectType : Dword):DWord; StdCall;
- Function MessagePending (htaskCallee:HTASK; dwTickCount : DWord; dwPendingType : Dword):DWord; StdCall;
- End;
-
-//****************************************************************************
-//* Object Remoting Interfaces
-//****************************************************************************
-
-
-
- IRpcChannelBuffer = Interface (IUnknown)
- ['{D5F56B60-593B-101A-B569-08002B2DBF7A}']
- Function GetBuffer (Const pMesasge : RPCOLEMESSAGE;Const riid :TIId):HResult; StdCall;
- Function SendReceive(Var pMessage : RPCOLEMESSAGE; Out PStatus : ULong):HResult; StdCall;
- Function FreeBuffer(Const pMessage : RPCOLEMESSAGE):HResult; StdCall;
- Function GetDestCTX(Out dwDestContext : DWord;Out pvDestContext : Pointer):HResult; StdCall;
- Function IsConnected:HResult; StdCall;
- End;
-
- IRpcChannelBuffer2 = Interface (IRpcChannelBuffer)
- ['{594f31d0-7f19-11d0-b194-00a0c90dc8bf}']
- Function GetProtocolVersion(Var dwVersion : DWord):HResult; StdCall;
- End;
-
-
- IAsyncRpcChannelBuffer = Interface (IRpcChannelBuffer2)
- ['{a5029fb6-3c34-11d1-9c99-00c04fb998aa}']
- Function Send(Var Msg: RPCOLEMESSAGE;Const pSync : ISynchronize;Out PulStatus : ULong):HResult; StdCall;
- Function Receive(Var Msg: RPCOLEMESSAGE;Out PulStatus : ULong):HResult; StdCall;
- Function GetDestCTXEx(Out MSG : RPCOLEMESSAGE;Out vDestContext : DWord;Out pvDestContext : Pointer ):HResult;StdCall;
- End;
-
- IRpcChannelBuffer3 = Interface (IRpcChannelBuffer2)
- ['{25B15600-0115-11d0-BF0D-00AA00B8DFD2}']
- Function Send(Var msg : RPCOLEMESSAGE;Out ulStatus : ULONG):HResult; StdCall;
- Function Receive(Var msg : RPCOLEMESSAGE;ulSize : ULong;Out ulStatus : ULONG):HResult; StdCall;
- Function Cancel (Const msg : RPCOLEMESSAGE):HResult; StdCall;
- Function GetCallContext(Const msg : RPCOLEMESSAGE; Const riid : TIID; Out pInterface : Pointer):HResult; StdCall;
- Function GetDestCTXEx(Const Msg : RPCOLEMESSAGE;Out vDestContext : DWord;Out pvDestContext : Pointer ):HResult;StdCall;
- Function GetState(Const Msg : RPCOLEMESSAGE;Out State: DWord):HResult;StdCall;
- Function RegisterAsync(Const Msg : RPCOLEMESSAGE;Const asyncmgr : IAsyncManager):HResult;StdCall;
- End;
-
- IRpcSyntaxNegotiate = Interface (IUnknown)
- ['{58a08519-24c8-4935-b482-3fd823333a4f}']
- Function NegotiateSyntax ( Var msg : RPCOLEMESSAGE):HResult; StdCall;
- End;
-
-
-
-
- IRpcProxyBuffer = Interface (IUnknown)
- ['{D5F56A34-593B-101A-B569-08002B2DBF7A}']
- Function Connect(Const rpcchannelbuffer : IRpcChannelBuffer):HResult; StdCall;
- Procedure Disconnect;
- End;
-
- IRpcStubBuffer = Interface (IUnknown)
- ['{D5F56AFC-593B-101A-B569-08002B2DBF7A}']
- Function COnnect ( Const UnkServer : IUnknown):HResult; StdCall;
- Procedure Disconnect; StdCall;
- Function Invoke(Const rpcmsg : RPCOLEMESSAGE;Const RpcChanBuf : IRpcChannelBuffer):HResult; StdCall;
- Function IsIIDSupported (Const riid : TIID):Pointer {IRpcStubBuffer}; StdCall;
- Function CountRefs :ULong; StdCall;
- Function DebugServerQueryInterface(CONST pv : Pointer):HResult; StdCall;
- Procedure DebugServerRelease (pv : Pointer); StdCall;
- End;
-
- IPSFactoryBuffer = Interface (IUnknown)
- ['{D5F569D0-593B-101A-B569-08002B2DBF7A}']
- Function CreateProxy(Const UnkOuter : IUnknown;const riid : TIID; Out proxy: IRpcProxyBuffer; Out Pv :Pointer):HResult; StdCall;
- Function CreateStub (Const riid : TIID; Const UnkServer : IUnknown; Out pstub : IRpcStubBuffer):HResult; StdCall;
- End;
-
-{$ifdef NT4_greater_Or_DCOM}
-// This interface is only valid on Windows NT 4.0
-
-// This structure contains additional data for hooks. As a backward
-// compatability hack, the entire structure is passed in place of the
-// RIID parameter on all hook methods. Thus the IID must be the first
-// parameter. As a forward compatability hack the second field is the
-// current size of the structure.
-
- SChannelHookCallInfo= Record;
- IID : iid;
- cbSize : Dword;
- uCausality : GUID;
- dwServerPid,
- iMethod : DWord;
- pObject : Pointer;
- End;
-
-
-
- IChannelHook = Interface (IUnknown)
- ['{1008c4a0-7613-11cf-9af1-0020af6e72f4}']
- Procedure ClientGetSize(Const uExtent : TGuid; CONST riid : TIID; Out datasize :ULong); StdCall;
- Procedure ClientFillBuffer(Const uExtent : TGuid; CONST riid : TIID; Var datasize :ULong;Buffer :Pointer); StdCall;
- Procedure ClientNotify(Const uExtent : TGuid; CONST riid : TIID; datasize :ULong;Buffer :Pointer;hrfault:HResult); StdCall;
- Procedure ServerNotify(Const uExtent : TGuid; CONST riid : TIID; datasize :ULong;Buffer :Pointer;DataRep:DWord); StdCall;
- Procedure ServerGetSize(Const uExtent : TGuid; CONST riid : TIID;hrFault :HResult; Out datasize :ULong); StdCall;
- Procedure ServerFillBuffer(Const uExtent : TGuid; CONST riid : TIID; Var datasize :ULong;Buffer :Pointer;HrFault:HResult); StdCall;
- End;
-{$Endif}
-
-
-// Well-known Property Set Format IDs
-//FMTID_SummaryInformation = {CONST} FMTID;
-//FMTID_DocSummaryInformation = {CONST} FMTID;
-//FMTID_UserDefinedProperties = {CONST} FMTID;
-//FMTID_DiscardableInformation = {CONST} FMTID;
-//FMTID_ImageSummaryInformation = {CONST} FMTID;
-//FMTID_AudioSummaryInformation = {CONST} FMTID;
-//FMTID_VideoSummaryInformation = {CONST} FMTID;
-//FMTID_MediaFileSummaryInformation = {CONST} FMTID;
-
-
-//****************************************************************************
-// * Connection Point Interfaces
-// ****************************************************************************/
-
-//#ifdef __INCLUDE_CPIFS
- IConnectionPointContainer = Interface;
-//interface IConnectionPoint;
-//interface IEnumConnections;
- IEnumConnectionPoints = Interface;
- IEnumConnections = Interface;
-
-
- IConnectionPoint = Interface (IUnknown)
- ['{B196B286-BAB4-101A-B69C-00AA00341D07}']
- Function GetConnectionInterface(out piid : TIID):HResult;StdCall;
- Function GetConnectionPointContainer(CPC : IConnectionPointContainer):HResult;StdCall;
- Function Advise(unkSink : IUnknown;Out dwCookie : DWord):HResult;StdCall;
- Function UnAdvise(dwCookie : DWord):HResult;StdCall;
- Function EnumConnection(out pEnum : IEnumConnections):HResult;stdCall;
- End;
-
- IConnectionPointContainer = Interface (IUnknown)
- ['{B196B284-BAB4-101A-B69C-00AA00341D07}']
- Function EnumConnectionPoints(out pEnum : IEnumConnectionPoints):HResult;StdCall;
- Function FindConnectionPoint(Const RIID : TIID;Out ppcp : IConnectionPoint):HResult;StdCall;
- End;
-
- tagCONNECTDATA = Record
- unk : Pointer; {IUnknown}
- dwCookie : DWord;
- End;
- ConnectData = tagCONNECTDATA;
-
- IEnumConnections = Interface (IUnknown)
- ['{B196B287-BAB4-101A-B69C-00AA00341D07}']
- Function Next(cConnections : ULong; Out rgcd : ConnectData; lpcFetched : pULong=nil):HResult;StdCall;
- Function Skip(cConnections : ULong):HResult;StdCall;
- Function Reset:HResult;StdCall;
- Function Clone(Out pEnum : IEnumConnections):HResult; StdCall;
- End;
-
-
- IEnumConnectionPoints = Interface (IUnknown)
- ['{B196B285-BAB4-101A-B69C-00AA00341D07}']
- Function Next(cConnections : ULong; Out rgpcm : IConnectionPoint; lpcFetched : pULong=nil):HResult;StdCall;
- Function Skip(cConnections : ULong):HResult;StdCall;
- Function Reset:HResult;StdCall;
- Function Clone(Out pEnum : IEnumConnectionPoints):HResult;StdCall;
- End;
-
-
-
- tagSOLE_AUTHENTICATION_SERVICE = Record
- dwAuthnSvc,
- dwAuthzSvc : DWord;
- pPrincipalName : POleStr;
- hr : HResult;
- End;
- SOLE_AUTHENTICATION_SERVICE = tagSOLE_AUTHENTICATION_SERVICE;
- PSOLE_AUTHENTICATION_SERVICE = ^SOLE_AUTHENTICATION_SERVICE;
-
- tagSOLE_AUTHENTICATION_INFO = Record
- dwAuthnSvc,
- dwAuthzSvc : DWord;
- AuthInfo : Pointer;
- End;
- SOLE_AUTHENTICATION_INFO = tagSOLE_AUTHENTICATION_INFO;
- PSOLE_AUTHENTICATION_INFO = ^SOLE_AUTHENTICATION_INFO;
-
- tagSOLE_AUTHENTICATION_LIST = Record
- cAuthInfo : DWord;
- AuthInfo : PSOLE_AUTHENTICATION_INFO;
- End;
- SOLE_AUTHENTICATION_LIST = tagSOLE_AUTHENTICATION_LIST;
- PSOLE_AUTHENTICATION_LIST = ^SOLE_AUTHENTICATION_LIST;
-
-{$ifdef WINNT_DCOM}
-
- IClientSecurity = Interface (IUnknown)
- ['{0000013D-0000-0000-C000-000000000046}']
- Function QueryBlanket (Proxy : IUnknown;Out AuthnSvc,AuthzSvc : Dword;Out ServerPrincName:pOleStr;Out AuthnLevel,ImpLevel:Dword; Out AuthInfo : Pointer; Out Capabilities : Dword):HResult;StdCall;
- Function SetBlanket (Proxy : IUnknown;AuthnSvc,AuthzSvc : Dword;ServerPrincName:pOleStr;AuthnLevel,ImpLevel:Dword;AuthInfo : Pointer;Capabilities : Dword):HResult;StdCall;
- Function CopyProxy (Proxy : IUnknown;Out pcopy:IUnknown):HResult;StdCall;
- End;
-
- IServerSecurity = Interface (IUnknown)
- ['{0000013E-0000-0000-C000-000000000046}']
- Function QueryBlanket ( out authnSvc,AuthzSvc : DWord; Out pServerPrincName : pOleStr; Out AuthnLevel, ImpLevel; :DWord; out Privs : Pointer; Var Capabilities :DWord):HResult;StdCall;
- Function ImpersonateClient:HResult;StdCall;
- Function RevertToSelf:HResult;StdCall;
- Function IsImpersonating:Bool;StdCall;
- End;
-
- IClassActivator = Interface (IUnknown)
- ['{00000140-0000-0000-C000-000000000046}']
- Function GetClassObject(Const rclsif : TClsID; ClassContext : DWord; locale : LCID; Const ridd : TIID; Out pv : Pointer):HResult;StdCall;
- End;
-
-
- IRpcOptions = Interface (IUnknown)
- ['{00000144-0000-0000-C000-000000000046}']
- Function xSet (prx : IUnknown;dwProperty : DWord; dwValue:ULONG_PTR):HResult; StdCall;
- Function Query (prx : IUnknown;dwProperty:Dword; dwValue:ULONG_PTR):HResult; StdCall;
- End;
-
-{$endif} {DCOM}
-
- IFillLockBytes = Interface (IUnknown)
- ['{99caf010-415e-11cf-8814-00aa00b569f5}']
- Function FillAppend(const pv : Pointer;cb:ULong; Out PcbWritten : ULong):HResult;StdCall;
- Function FillAt(ulOffset : ULarge_INTEGER;Const pv : Pointer;cb :ULong; Out pcbWritten:ULong):HResult;StdCall;
- Function SetFillSize ( ulSize :ULarge_Integer):HResult;StdCall;
- Function Terminate (bCanceled :Bool):HResult;StdCall;
- End;
-
- IProgressNotify = Interface (IUnknown)
- ['{a9d758a0-4617-11cf-95fc-00aa00680db4}']
- Function OnProgress (ProgressCurrent,ProgressMaximum :Dword; FAccurate,Fowner : Bool):HResult;StdCall;
- End;
-
- ILayoutStorage = Interface (IUnknown)
- ['{0e6d4d90-6738-11cf-9608-00aa00680db4}']
- {The methods in this interface all had "__stdcall" as modifier, while the other classes don't. ?!?!?}
- Function LayoutScript ( xStorageLayout : StorageLayout;nEntries,glfInterleaveFlag : Dword) :HResult; StdCall;
- Function BeginMonitor:HResult;StdCall;
- Function EndMonitor:HResult;StdCall;
- Function ReLayourDocFile(pwcsNewDFName :pOleStr):HResult;StdCall;
- Function ReLayoutDocfileOnILockBytes(LockBytes : ILockBytes):Hresult;StdCall;
- End;
-
- IBlockingLock = Interface (IUnknown)
- ['{30f3d47a-6447-11d1-8e3c-00c04fb9386d}']
- Function Lock (dwTimeOut : DWord) : HResult;Stdcall;
- Function Unlock : HResult;Stdcall;
- End;
-
- ITimeAndNoticeControl = Interface (IUnknown)
- ['{bc0bf6ae-8878-11d1-83e9-00c04fc2c6d4}']
- Function SuppressChanges(res1,res2 : Dword):HResult;StdCall;
- End;
-
- IOplockStorage = Interface (IUnknown)
- ['{8d19c834-8879-11d1-83e9-00c04fc2c6d4}']
- Function CreateStorageEx(wcsName : LPCWSTR;grfMode,StgFmt,GrfAtrrs :Dword;Const riid :Tiid; Out ppstgOpen : Pointer):HResult;StdCall;
- Function OpenStorageEx(wcsName : LPCWSTR;grfMode,StgFmt,GrfAtrrs :Dword;Const riid :Tiid; Out ppstgOpen : Pointer):HResult;StdCall;
- End;
-
- ISurrogate = Interface (IUnknown)
- ['{00000022-0000-0000-C000-000000000046}']
- Function LoadDllServer (Const ClsId : TClsId):HResult;StdCall;
- Function FreeSurrogate:HResult;StdCall;
- End;
-
- IGlobalInterfaceTable = Interface (IUnknown)
- ['{00000146-0000-0000-C000-000000000046}']
- Function RegisterInterfaceInGlobal(unk :IUnknown;Const riid : TIID; Out dwcookie :DWord):HResult;StdCall;
- Function RevokeInterfaceFromGlobal (dwCookie :DWord):HResult;StdCall;
- Function GetInterfaceFromGlobal (dwCookie :DWord;Const riid : TIID;out pv : Pointer):HResult;StdCall;
- End;
-
- IDirectWriterLock = Interface (IUnknown)
- ['{0e6d4d92-6738-11cf-9608-00aa00680db4}']
- Function WaitForWriteAccess (dwTimeOut : DWORD):HResult;StdCall;
- Function ReleaseWriteAccess:HResult;StdCall;
- Function HaveWriteAccess:HResult;StdCall;
- End;
-
- ISynchronize = Interface (IUnknown)
- ['{00000030-0000-0000-C000-000000000046}']
- Function Wait (dwFlags : DWord; dwMilliSeconds : DWord):HResult;StdCall;
- Function Signal : HResult;StdCall;
- Function Reset : HResult;StdCall;
- End;
-
- ISynchronizeHandle = Interface (IUnknown)
- ['{00000031-0000-0000-C000-000000000046}']
- Function GetHandle(Out ph : Handle):HResult;StdCall;
- End;
-
- ISynchronizeEvent = Interface (ISynchronizeHandle)
- ['{00000032-0000-0000-C000-000000000046}']
- Function SetEventHandle (Const ph : Handle):HResult; StdCall;
- End;
-
- ISynchronizeContainer = Interface (IUnknown)
- ['{00000033-0000-0000-C000-000000000046}']
- Function AddSynchronize(pSync : ISynchronize):HResult; StdCall;
- Function WaitMultiple(dwFlags : Dword; dwTimeOut : Dword; Out pSync : ISynchronize):HResult;StdCall;
- End;
-
- ISynchronizeMutex = Interface (ISynchronize)
- ['{00000025-0000-0000-C000-000000000046}']
- Function ReleaseMutex:HResult; StdCall;
- End;
-
- ICancelMethodCalls = Interface (IUnknown)
- ['{00000029-0000-0000-C000-000000000046}']
- Function Cancel(ulSeconds : ULong):HResult; StdCall;
- Function TestCancel:HResult;StdCall;
- End;
-
- IAsyncManager = Interface (IUnknown)
- ['{0000002A-0000-0000-C000-000000000046}']
- Function CompleteCall (xResult : HResult):HResult;StdCall;
- Function GetCallContext(Const iid :TIID; Out pInterface : Pointer):HResult;StdCall;
- Function GetState(Out pulStateFlags : ULong):HResult;StdCall;
- End;
-
- ICallFactory = Interface (IUnknown)
- ['{1c733a30-2a1c-11ce-ade5-00aa0044773d}']
- Function CreateCall(Const riid:TIID;CtrUnk : IUnknown;Const Riid2:TIID;Out Unknown : IUnknown):HResult;StdCall;
- End;
-
- IRpcHelper = Interface (IUnknown)
- ['{00000149-0000-0000-C000-000000000046}']
- Function GetDCOMProtocolVersion(Out ComVersion :DWord):HResult;StdCall;
- Function GettIIDFromOBJREF(ObjRef : Pointer;Out xIID : piid):HResult;StdCall;
- End;
-
- IReleaseMarshalBuffers = Interface (IUnknown)
- ['{eb0cb9e8-7996-11d2-872e-0000f8080859}']
- Function ReleaseMarshalBuffer(const pnsg : RPCOLEMESSAGE;dwFlags:DWord;Const pchn : IUnknown):HResult; StdCall;
- End;
-
- IWaitMultiple = Interface (IUnknown)
- ['{0000002B-0000-0000-C000-000000000046}']
- Function WaitMulitple(TImeout :DWord;out psync : ISynchronize):HResult; StdCall;
- Function AddSynchronize (const psync : ISynchronize):HResult;StdCall;
- End;
-
- IUrlMon = Interface (IUnknown)
- ['{00000026-0000-0000-C000-000000000046}']
- Function AsyncGetClassBits(CONST rclsif : TClsID; psztype,pzext : lpcwstr; dwfileversionMS,dwFileVersionLS : DWord; pzcodebase : LPCWSTR; Const pbc : IBindCTX; dwclasscontext : DWord; const Riid:TIID; flags :DWORD):HResult; StdCall;
- End;
-
- IForegroundTransfer = Interface (IUnknown)
- ['{00000145-0000-0000-C000-000000000046}']
- Function AllowForegroundTransfer(lpvReserved:Pointer):HResult; StdCall;
- End;
-
- IAddrTrackingControl = Interface (IUnknown)
- ['{00000147-0000-0000-C000-000000000046}']
- Function EnableCOMDynamicAddrTracking:HResult; StdCall;
- Function DisableCOMDynamicAddrTracking:HResult; StdCall;
- End;
-
- IAddrExclusionControl = Interface (IUnknown)
- ['{00000148-0000-0000-C000-000000000046}']
- Function GetCurrentAddrExclusionList(Const riid : TIID;out Enumerator : Pointer):HResult;StdCall;
- Function UpdateAddrExclusionList(Enumerator : IUnknown):HResult;StdCall;
- End;
-
-//****************************************************************************
-//* Pipe interfaces
-//****************************************************************************/
-
-// Doesn't look translatable. See objidl.idl
-
-//****************************************************************************
-//* Thumbnail generator interface
-//****************************************************************************/
-
- IThumbnailExtractor = Interface (IUnknown)
- ['{969dc708-5c76-11d1-8d86-0000f804b057}']
- Function ExtractThumbnail (pStg : IStorage; uLength,UHeight : ULong; Out uloutputlength,Height :ULong; Out OutputBitmap : HBITMAP): HResult; StdCall;
- Function OnFileUpdated (pStg : IStorage):HResult;
- End;
-
-//****************************************************************************
-//* Dummy Interface to force inclusion of HICON and HDC in proxy/stub code....
-//****************************************************************************/
-
- IDummyHICONIncluder = Interface (IUnknown)
- ['{947990de-cc28-11d2-a0f7-00805f858fb1}']
- Function Dummy (h1 : HICON; H2 :HDC):HResult;
- End;
-
- IComThreadingInfo = Interface (IUnknown)
- ['{000001ce-0000-0000-C000-000000000046}']
- Function GetCurrentApartmentType(out pAptType : DWord {APTTTYPE}):HResult;
- Function GetCurrentThreadType(Out ThreadType : Dword {THDTTYPE}):HResult;StdCall;
- Function GetCurrentLogicalThreadID(Out guidlogicalThreadId : TGUID):HResult;StdCall;
- Function SetCurrentLogicalThreadID(Const guidlogicalThreadId : TGUID):HResult;StdCall;
- End;
-
- IProcessInitControl = Interface (IUnknown)
- ['{72380d55-8d2b-43a3-8513-2b6ef31434e9}']
- Function ResetInitializerTimeout(dwSecondsRemaining:DWord):HResult; StdCall;
- End;
-
-
-// Interfaces from OAIDL.IDL
-
- ITypeInfo = Interface;
-
- ICreateTypeInfo = Interface (IUnknown)
- ['{00020405-0000-0000-C000-000000000046}']
- Function SetGuid(CONST guid: TGUID):HResult;StdCall;
- Function SetTypeFlags(uTypeFlags: UINT):HResult;StdCall;
- Function SetDocString(pStrDoc: pOleStr):HResult;StdCall;
- Function SetHelpContext(dwHelpContext: DWORD):HResult;StdCall;
- Function SetVersion(wMajorVerNum: WORD; wMinorVerNum: WORD):HResult;StdCall;
- Function AddRefTypeInfo(CONST pTInfo: ITypeInfo; CONST phRefType: HREFTYPE):HResult;StdCall;
- Function AddFuncDesc(index: UINT; CONST pFuncDesc: FUNCDESC):HResult;StdCall;
- Function AddImplType(index: UINT; hRefType: HREFTYPE):HResult;StdCall;
- Function SetImplTypeFlags(index: UINT; implTypeFlags: WINT):HResult;StdCall;
- Function SetAlignment(cbAlignment: WORD):HResult;StdCall;
- Function SetSchema(pStrSchema: pOleStr):HResult;StdCall;
- Function AddVarDesc(index: UINT; CONST pVarDesc: VARDESC):HResult;StdCall;
- Function SetFuncAndParamNames(index: UINT; CONST rgszNames: pOleStr; cNames: UINT):HResult;StdCall;
- Function SetVarName(index: UINT; szName: pOleStr):HResult;StdCall;
- Function SetTypeDescAlias(CONST pTDescAlias: TYPEDESC):HResult;StdCall;
- Function DefineFuncAsDllEntry(index: UINT; szDllName: pOleStr; szProcName: pOleStr):HResult;StdCall;
- Function SetFuncDocString(index: UINT; szDocString: pOleStr):HResult;StdCall;
- Function SetVarDocString(index: UINT; szDocString: pOleStr):HResult;StdCall;
- Function SetFuncHelpContext(index: UINT; dwHelpContext: DWORD):HResult;StdCall;
- Function SetVarHelpContext(index: UINT; dwHelpContext: DWORD):HResult;StdCall;
- Function SetMops(index: UINT; Const bstrMops: WideString):HResult;StdCall;
- Function SetTypeIdldesc(CONST pIdlDesc: IDLDESC):HResult;StdCall;
- Function LayOut():HResult;StdCall;
- End;
-
- ICreateTypeInfo2 = Interface (ICreateTypeInfo)
- ['{0002040E-0000-0000-C000-000000000046}']
- Function DeleteFuncDesc(index: UINT):HResult;StdCall;
- Function DeleteFuncDescByMemId(memid: MEMBERID; invKind: INVOKEKIND):HResult;StdCall;
- Function DeleteVarDesc(index: UINT):HResult;StdCall;
- Function DeleteVarDescByMemId(memid: MEMBERID):HResult;StdCall;
- Function DeleteImplType(index: UINT):HResult;StdCall;
- Function SetCustData(CONST guid: TGUID; CONST pVarVal: VARIANT):HResult;StdCall;
- Function SetFuncCustData(index: UINT; CONST guid: TGUID; CONST pVarVal: VARIANT):HResult;StdCall;
- Function SetParamCustData(indexFunc: UINT; indexParam: UINT; CONST guid: TGUID; CONST pVarVal: VARIANT):HResult;StdCall;
- Function SetVarCustData(index: UINT; CONST guid: TGUID; CONST pVarVal: VARIANT):HResult;StdCall;
- Function SetImplTypeCustData(index: UINT; CONST guid: TGUID; CONST pVarVal: VARIANT):HResult;StdCall;
- Function SetHelpStringContext(dwHelpStringContext: ULONG):HResult;StdCall;
- Function SetFuncHelpStringContext(index: UINT; dwHelpStringContext: ULONG):HResult;StdCall;
- Function SetVarHelpStringContext(index: UINT; dwHelpStringContext: ULONG):HResult;StdCall;
- Function Invalidate():HResult;StdCall;
- Function SetName(szName: pOleStr):HResult;StdCall;
- End;
-
- ICreateTypeLib = Interface (IUnknown)
- ['{00020406-0000-0000-C000-000000000046}']
- Function CreateTypeInfo(szName: pOleStr; tkind: TYPEKIND; OUT ppCTInfo: ICreateTypeInfo):HResult;StdCall;
- Function SetName(szName: pOleStr):HResult;StdCall;
- Function SetVersion(wMajorVerNum: WORD; wMinorVerNum: WORD):HResult;StdCall;
- Function SetGuid(CONST guid: TGUID):HResult;StdCall;
- Function SetDocString(szDoc: pOleStr):HResult;StdCall;
- Function SetHelpFileName(szHelpFileName: pOleStr):HResult;StdCall;
- Function SetHelpContext(dwHelpContext: DWORD):HResult;StdCall;
- Function SetLcid(lcid: LCID):HResult;StdCall;
- Function SetLibFlags(uLibFlags: UINT):HResult;StdCall;
- Function SaveAllChanges():HResult;StdCall;
- End;
-
- ICreateTypeLib2 = Interface (ICreateTypeLib)
- ['{0002040F-0000-0000-C000-000000000046}']
- Function DeleteTypeInfo(szName: pOleStr):HResult;StdCall;
- Function SetCustData(CONST guid: TGUID; CONST pVarVal: VARIANT):HResult;StdCall;
- Function SetHelpStringContext(dwHelpStringContext: ULONG):HResult;StdCall;
- Function SetHelpStringDll(szFileName: pOleStr):HResult;StdCall;
- End;
-
- IEnumVARIANT = Interface (IUnknown)
- ['{00020404-0000-0000-C000-000000000046}']
- {$ifndef Call_as}
- Function Next(celt: ULONG; OUT rgVar: VARIANT; pCeltFetched: pULONG=nil):HResult;StdCall;
- {$else}
- Function Next(celt: ULONG; OUT rgVar: VARIANT; pCeltFetched: pULONG=nil):HResult;StdCall;
- {$endif}
- Function Skip(celt: ULONG):HResult;StdCall;
- Function Reset():HResult;StdCall;
- Function Clone(OUT ppEnum: IEnumVARIANT):HResult;StdCall;
- End;
-
- ITypeComp = Interface (IUnknown)
- ['{00020403-0000-0000-C000-000000000046}']
- {$ifndef Call_as}
- Function Bind(szName: pOleStr; lHashVal: ULONG; wFlags: WORD; OUT ppTInfo: ITypeInfo; OUT pDescKind: DESCKIND; OUT pBindPtr: BINDPTR):HResult;StdCall;
- Function BindType(szName: pOleStr; lHashVal: ULONG; OUT ppTInfo: ITypeInfo; OUT ppTComp: ITypeComp):HResult;StdCall;
- {$else}
- Function Bind(szName: pOleStr; lHashVal: ULONG; wFlags: WORD; OUT ppTInfo: ITypeInfo; OUT pDescKind: DESCKIND; OUT ppFuncDesc: LPFUNCDESC; OUT ppVarDesc: LPVARDESC; O
- Function BindType(szName: pOleStr; lHashVal: ULONG; OUT ppTInfo: ITypeInfo):HResult;StdCall;
- {$endif}
- End;
-
- ITypeInfo = Interface (IUnknown)
- ['{00020401-0000-0000-C000-000000000046}']
- {$ifndef Call_as}
- Function GetTypeAttr(OUT ppTypeAttr: lpTYPEATTR):HResult;StdCall;
- {$else}
- Function GetTypeAttr(OUT ppTypeAttr: LPTYPEATTR; OUT pDummy: CLEANLOCALSTORAGE):HResult;StdCall;
- {$endif}
- Function GetTypeComp(OUT ppTComp: ITypeComp):HResult;StdCall;
- {$ifndef Call_as}
- Function GetFuncDesc(index: UINT; OUT ppFuncDesc: lpFUNCDESC):HResult;StdCall;
- Function GetVarDesc(index: UINT; OUT ppVarDesc: lpVARDESC):HResult;StdCall;
- Function GetNames(memid: MEMBERID; rgBstrNames: PBStrList; cMaxNames: UINT; OUT pcNames: UINT):HResult;StdCall;
- {$else}
- Function GetFuncDesc(index: UINT; OUT ppFuncDesc: LPFUNCDESC; OUT pDummy: CLEANLOCALSTORAGE):HResult;StdCall;
- Function GetVarDesc(index: UINT; OUT ppVarDesc: LPVARDESC; OUT pDummy: CLEANLOCALSTORAGE):HResult;StdCall;
- Function GetNames(memid: MEMBERID; rgBstrNames: PBStrList; cMaxNames: UINT; OUT pcNames: UINT):HResult;StdCall;
- {$endif}
- Function GetRefTypeOfImplType(index: UINT; OUT pRefType: HREFTYPE):HResult;StdCall;
- Function GetImplTypeFlags(index: UINT; OUT pImplTypeFlags: WINT):HResult;StdCall;
- {$ifndef Call_as}
- Function GetIDsOfNames(CONST rgszNames: pOleStr; cNames: UINT; OUT pMemId: MEMBERID):HResult;StdCall;
- {$else}
- Function LocalGetIDsOfNames():HResult;StdCall;
- {$endif}
- {$ifndef Call_as}
- Function Invoke(pvInstance: Pointer; memid: MEMBERID; wFlags: WORD; VAR pDispParams: DISPPARAMS; OUT pVarResult: VARIANT; OUT pExcepInfo: EXCEPINFO; OUT puArgErr: UINT):HResult;StdCall;
- {$else}
- Function LocalInvoke ():HResult;StdCall;
- {$endif}
- {$ifndef Call_as}
- //Function GetDocumentation(memid: MEMBERID; OUT pBstrName: WideString; OUT pBstrDocString: WideString; OUT pdwHelpContext: DWORD; OUT pBstrHelpFile: WideString):HResult;StdCall;
- Function GetDocumentation(memid: MEMBERID; pBstrName: PWideString; pBstrDocString: PWideString; pdwHelpContext: PDWORD; pBstrHelpFile: PWideString):HResult;StdCall;
- {$else}
- Function GetDocumentation(memid: MEMBERID; refPtrFlags: DWORD; OUT pBstrName: WideString; OUT pBstrDocString: WideString; OUT pdwHelpContext: DWORD; OUT pBstrHelpFile: WideString):HResult;StdCall;
- {$endif}
-
- {$ifndef Call_as}
- Function GetDllEntry(memid: MEMBERID; invKind: INVOKEKIND; OUT pBstrDllName: WideString; OUT pBstrName: WideString; OUT pwOrdinal: WORD):HResult;StdCall;
- {$else}
- Function GetDllEntry(memid: MEMBERID; invKind: INVOKEKIND; refPtrFlags: DWORD; OUT pBstrDllName: WideString; OUT pBstrName: WideString; OUT pwOrdinal: WORD):HResult;StdCall;
- {$endif}
-
- Function GetRefTypeInfo(hRefType: HREFTYPE; OUT ppTInfo: ITypeInfo):HResult;StdCall;
-
- {$ifndef Call_as}
- Function AddressOfMember(memid: MEMBERID; invKind: INVOKEKIND; OUT ppv: Pointer):HResult;StdCall;
- {$else}
- Function LocalAddressOfMember():HResult;StdCall;
- {$endif}
-
- {$ifndef Call_as}
- Function CreateInstance(CONST pUnkOuter: IUnknown; CONST riid: TIID; OUT ppvObj: Pointer):HResult;StdCall;
- {$else}
- Function CreateInstance(CONST riid: TIID; OUT ppvObj: pIUnknown):HResult;StdCall;
- {$endif}
- Function GetMops(memid: MEMBERID; OUT pBstrMops: WideString):HResult;StdCall;
- {$ifndef Call_as}
- Function GetContainingTypeLib(OUT ppTLib: ITypeLib; OUT pIndex: UINT):HResult;StdCall;
- {$else}
- Function GetContainingTypeLib(OUT ppTLib: ITypeLib; OUT pIndex: UINT):HResult;StdCall;
- {$endif}
- {$ifndef Call_as}
- Procedure ReleaseTypeAttr( pTypeAttr: pTypeAttr); StdCall;
- {$else}
- Function ReleaseTypeAttr():HResult;StdCall;
- {$endif}
-
- {$ifndef Call_as}
- Procedure ReleaseFuncDesc( pFuncDesc : lpFUNCDESC); StdCall;
- {$else}
- Function LocalReleaseFuncDesc():HResult;StdCall;
- {$endif}
- {$ifndef Call_as}
- Procedure ReleaseVarDesc( pVarDesc : lpVarDesc); stdcall;
- {$else}
- Function LocalReleaseVarDesc():HResult;StdCall;
- {$endif}
- End;
-
- ITypeInfo2 = Interface (ITypeInfo)
- ['{00020412-0000-0000-C000-000000000046}']
- Function GetTypeKind(OUT xpTypeKind: TYPEKIND):HResult;StdCall;
- Function GetTypeFlags(OUT pTypeFlags: ULONG):HResult;StdCall;
- Function GetFuncIndexOfMemId(memid: MEMBERID; invKind: INVOKEKIND; OUT pFuncIndex: UINT):HResult;StdCall;
- Function GetVarIndexOfMemId(memid: MEMBERID; OUT pVarIndex: UINT):HResult;StdCall;
- Function GetCustData(CONST guid: TGUID; OUT pVarVal: VARIANT):HResult;StdCall;
- Function GetFuncCustData(index: UINT; CONST guid: TGUID; OUT pVarVal: VARIANT):HResult;StdCall;
- Function GetParamCustData(indexFunc: UINT; indexParam: UINT; CONST guid: TGUID; OUT pVarVal: VARIANT):HResult;StdCall;
- Function GetVarCustData(index: UINT; CONST guid: TGUID; OUT pVarVal: VARIANT):HResult;StdCall;
- Function GetImplTypeCustData(index: UINT; CONST guid: TGUID; OUT pVarVal: VARIANT):HResult;StdCall;
- {$ifndef Call_as}
- Function GetDocumentation2(memid: MEMBERID; lcid: LCID; pbstrHelpString: PWideString; pdwHelpStringContext: PDWORD; pbstrHelpStringDll: PWideString):HResult;StdCall;
- {$else}
- Function GetDocumentation2(memid: MEMBERID; lcid: LCID; refPtrFlags: DWORD; pbstrHelpString: PWideString; pdwHelpStringContext: PDWORD; pbstrHelpStringDll: PWideString):HResult;StdCall;
- {$endif}
- Function GetAllCustData(OUT pCustData: CUSTDATA):HResult;StdCall;
- Function GetAllFuncCustData(index: UINT; OUT pCustData: CUSTDATA):HResult;StdCall;
- Function GetAllParamCustData(indexFunc: UINT; indexParam: UINT; OUT pCustData: CUSTDATA):HResult;StdCall;
- Function GetAllVarCustData(index: UINT; OUT pCustData: CUSTDATA):HResult;StdCall;
- Function GetAllImplTypeCustData(index: UINT; OUT pCustData: CUSTDATA):HResult;StdCall;
- End;
-
- ITypeLib = Interface (IUnknown)
- ['{00020402-0000-0000-C000-000000000046}']
- {$ifndef Call_as}
- Function GetTypeInfoCount:UINT; StdCall;
- {$else}
- Function GetTypeInfoCount(OUT pcTInfo: UINT):HResult;StdCall;
- {$endif}
- Function GetTypeInfo(index: UINT; OUT ppTInfo: ITypeInfo):HResult;StdCall;
- Function GetTypeInfoType(index: UINT; OUT pTKind: TYPEKIND):HResult;StdCall;
- Function GetTypeInfoOfGuid(CONST guid: TGUID; OUT ppTinfo: ITypeInfo):HResult;StdCall;
- {$ifndef Call_as}
- Function GetLibAttr(OUT ppTLibAttr: lpTLIBATTR):HResult;StdCall;
- {$else}
- Function GetLibAttr(OUT ppTLibAttr: LPTLIBATTR; OUT pDummy: CLEANLOCALSTORAGE):HResult;StdCall;
- {$endif}
-
- Function GetTypeComp(OUT ppTComp: ITypeComp):HResult;StdCall;
- {$ifndef Call_as}
- Function GetDocumentation(index: WINT; pBstrName: PWideString; pBstrDocString: PWideString; pdwHelpContext: PDWORD; pBstrHelpFile: PWideString):HResult;StdCall;
- {$else}
- Function GetDocumentation(index: WINT; refPtrFlags: DWORD; pBstrName: PWideString; pBstrDocString: PWideString; pdwHelpContext: PDWORD; pBstrHelpFile: PWideString):HResult;StdCall;
- {$endif}
-
- {$ifndef Call_as}
- Function IsName(szNameBuf: pOleStr; lHashVal: ULONG; OUT pfName: BOOL):HResult;StdCall;
- {$else}
- Function IsName(szNameBuf: pOleStr; lHashVal: ULONG; OUT pfName: BOOL; OUT pBstrLibName: WideString):HResult;StdCall;
- {$endif}
- {$ifndef Call_as}
- Function FindName(szNameBuf: pOleStr; lHashVal: ULONG; OUT ppTInfo: ITypeInfo; OUT rgMemId: MEMBERID; VAR pcFound: USHORT):HResult;StdCall;
- {$else}
- Function FindName(szNameBuf: pOleStr; lHashVal: ULONG; OUT ppTInfo: ITypeInfo; OUT rgMemId: MEMBERID; VAR pcFound: USHORT; OUT pBstrLibName: WideString):HResult;StdCall;
- {$endif}
- {$ifndef Call_as}
- Procedure ReleaseTLibAttr( pTLibAttr : LPTLIBATTR); StdCall;
- {$else}
- Function LocalReleaseTLibAttr:HResult;StdCall;
- {$endif}
- End;
-
- ITypeLib2 = Interface (ITypeLib)
- ['{00020411-0000-0000-C000-000000000046}']
- Function GetCustData(CONST guid: TGUID; OUT pVarVal: VARIANT):HResult;StdCall;
- {$ifndef Call_as}
- Function GetLibStatistics(OUT pcUniqueNames: ULONG; OUT pcchUniqueNames: ULONG):HResult;StdCall;
- {$else}
- Function GetLibStatistics(OUT pcUniqueNames: ULONG; OUT pcchUniqueNames: ULONG):HResult;StdCall;
- {$endif}
- {$ifndef Call_as}
- Function GetDocumentation2(index: WINT; lcid: LCID; pbstrHelpString: PWideString; pdwHelpStringContext: PDWORD; pbstrHelpStringDll: PWideString):HResult;StdCall;
- {$else}
- Function GetDocumentation2(index: WINT; lcid: LCID; refPtrFlags: DWORD; pbstrHelpString: PWideString; pdwHelpStringContext: PDWORD; pbstrHelpStringDll: PWideString):HResult;StdCall;
- {$endif}
- Function GetAllCustData(OUT pCustData: CUSTDATA):HResult;StdCall;
- End;
-
- ITypeChangeEvents= Interface (IUnknown)
- ['{00020410-0000-0000-C000-000000000046}']
- Function RequestTypeChange(changeKind: CHANGEKIND; CONST pTInfoBefore: ITypeInfo; pStrName: pOleStr; OUT pfCancel: WINT):HResult;StdCall;
- Function AfterTypeChange(changeKind: CHANGEKIND; CONST pTInfoAfter: ITypeInfo; pStrName: pOleStr):HResult;StdCall;
- End;
-
- IErrorInfo= Interface (IUnknown)
- ['{1CF2B120-547D-101B-8E65-08002B2BD119}']
- Function GetGUID(OUT pGUID: TGUID):HResult;StdCall;
- Function GetSource(OUT pBstrSource: WideString):HResult;StdCall;
- Function GetDescription(OUT pBstrDescription: WideString):HResult;StdCall;
- Function GetHelpFile(OUT pBstrHelpFile: WideString):HResult;StdCall;
- Function GetHelpContext(OUT pdwHelpContext: DWORD):HResult;StdCall;
- End;
-
- ICreateErrorInfo= Interface (IUnknown)
- ['{22F03340-547D-101B-8E65-08002B2BD119}']
- Function SetGUID(CONST rguid: TGUID):HResult;StdCall;
- Function SetSource(szSource: pOleStr):HResult;StdCall;
- Function SetDescription(szDescription: pOleStr):HResult;StdCall;
- Function SetHelpFile(szHelpFile: pOleStr):HResult;StdCall;
- Function SetHelpContext(dwHelpContext: DWORD):HResult;StdCall;
- End;
-
- ISupportErrorInfo= Interface (IUnknown)
- ['{DF0B3D60-548F-101B-8E65-08002B2BD119}']
- Function InterfaceSupportsErrorInfo(CONST riid: TIID):HResult;StdCall;
- End;
-
- ITypeFactory = Interface (IUnknown)
- ['{0000002E-0000-0000-C000-000000000046}']
- Function CreateFromTypeInfo(CONST pTypeInfo: ITypeInfo; CONST riid: TIID; OUT ppv: IUnknown):HResult;StdCall;
- End;
-
- ITypeMarshal = Interface (IUnknown)
- ['{0000002D-0000-0000-C000-000000000046}']
- Function Size(pvType: Pointer; dwDestContext: DWORD; pvDestContext: Pointer; OUT pSize: ULONG):HResult;StdCall;
- Function Marshal(pvType: Pointer; dwDestContext: DWORD; pvDestContext: Pointer; cbBufferLength: ULONG; OUT pBuffer: BYTE; OUT pcbWritten: ULONG):HResult;StdCall;
- Function Unmarshal(pvType: Pointer; dwFlags: DWORD; cbBufferLength: ULONG; CONST pBuffer: BYTE; OUT pcbRead: ULONG):HResult;StdCall;
- Function Free(pvType: Pointer):HResult;StdCall;
- End;
-
- IRecordInfo = Interface(IUnknown)
- ['{0000002F-0000-0000-C000-000000000046}']
- Function RecordInit(pvNew: Pointer):HResult;StdCall;
- Function RecordClear(pvExisting: Pointer):HResult;StdCall;
- Function RecordCopy(pvExisting: Pointer; pvNew: Pointer):HResult;StdCall;
- Function GetGuid(OUT pguid: TGUID):HResult;StdCall;
- Function GetName(OUT pbstrName: WideString):HResult;StdCall;
- Function GetSize(OUT pcbSize: ULONG):HResult;StdCall;
- Function GetTypeInfo(OUT ppTypeInfo: ITypeInfo):HResult;StdCall;
- Function GetField(pvData: Pointer; szFieldName: pOleStr; OUT pvarField: VARIANT):HResult;StdCall;
- Function GetFieldNoCopy(pvData: Pointer; szFieldName: pOleStr; OUT pvarField: VARIANT; OUT ppvDataCArray: Pointer):HResult;StdCall;
- Function PutField(wFlags: ULONG; pvData: Pointer; szFieldName: pOleStr; CONST pvarField: VARIANT):HResult;StdCall;
- Function PutFieldNoCopy(wFlags: ULONG; pvData: Pointer; szFieldName: pOleStr; CONST pvarField: VARIANT):HResult;StdCall;
- Function GetFieldNames(VAR pcNames: ULONG; OUT rgBstrNames: WideString):HResult;StdCall;
- Function IsMatchingType(CONST pRecordInfo : IRecordInfo):Bool;StdCall;
- Function RecordCreate : Pointer; StdCall;
- Function RecordCreateCopy(pvSource: Pointer; OUT ppvDest: Pointer):HResult;StdCall;
- Function RecordDestroy(pvRecord: Pointer):HResult;StdCall;
- End;
-
- IErrorLog = Interface (IUnknown)
- ['{3127CA40-446E-11CE-8135-00AA004BB851}']
- Function AddError(pszPropName: pOleStr; CONST pExcepInfo: EXCEPINFO):HResult;StdCall;
- End;
-
-
- IPropertyBag = Interface (IUnknown)
- ['{55272A00-42CB-11CE-8135-00AA004BB851}']
- {$ifndef Call_as}
- Function Read(pszPropName: pOleStr; VAR pVar: VARIANT; CONST pErrorLog: IErrorLog):HResult;StdCall;
- {$else}
- Function Read(pszPropName: pOleStr; OUT pVar: VARIANT; CONST pErrorLog: IErrorLog; varType: DWORD; CONST pUnkObj: IUnknown):HResult;StdCall;
- {$endif}
- Function Write(pszPropName: pOleStr; CONST pVar: VARIANT):HResult;StdCall;
- End;
-
- IEnumGUID = interface(IUnknown)
- ['{0002E000-0000-0000-C000-000000000046}']
- Function Next(celt: UINT; OUT rgelt: TGUID; pceltFetched: pUINT=nil):HResult;StdCall;
- Function Skip(celt:UINT):HResult;StdCall;
- Function Reset: HResult;StdCall;
- Function Clone(out ppenum: IEnumGUID):HResult;StdCall;
- End;
-
- IBindHost = interface(IUnknown)
- ['{FC4801A1-2BA9-11CF-A229-00AA003D7352}']
- End;
-
- IServiceProvider = interface(IUnknown)
- ['{6D5140C1-7436-11CE-8034-00AA006009FA}']
- Function QueryService(CONST rsid, iid: TGuid; OUT Obj):HResult;StdCall;
- End;
-
- PServiceProvider = ^IServiceProvider;
-
- IParseDisplayName = interface(IUnknown)
- ['{0000011A-0000-0000-C000-000000000046}']
- Function ParseDisplayName(CONST bc: IBindCtx; pszDisplayName: POleStr;OUT chEaten: Longint; OUT mkOut: IMoniker): HResult;StdCall;
- End;
-
- IOleContainer = interface(IParseDisplayName)
- ['{0000011B-0000-0000-C000-000000000046}']
- Function EnumObjects(grfFlags: Longint; OUT Enum: IEnumUnknown):HResult;StdCall;
- Function LockContainer(fLock: BOOL):HResult;StdCall;
- End;
-
- IOleClientSite = interface(IUnknown)
- ['{00000118-0000-0000-C000-000000000046}']
- Function SaveObject: HResult;StdCall;
- Function GetMoniker(dwAssign: Longint; dwWhichMoniker: Longint;OUT mk: IMoniker):HResult;StdCall;
- Function GetContainer(OUT container: IOleContainer):HResult;StdCall;
- Function ShowObject:HResult;StdCall;
- Function OnShowWindow(fShow: BOOL):HResult;StdCall;
- Function RequestNewObjectLayout:HResult;StdCall;
- End;
-
- IOleWindow = interface(IUnknown)
- ['{00000114-0000-0000-C000-000000000046}']
- function GetWindow(out wnd: HWnd): HResult; stdcall;
- function ContextSensitiveHelp(fEnterMode: BOOL): HResult; stdcall;
- end;
-
-
- tagOleMenuGroupWidths = record
- width : array[0..5] Of LONG;
- end;
- OLEMENUGROUPWIDTHS = tagOleMenuGroupWidths;
- TOleMenuGroupWidths = tagOleMenuGroupWidths;
- LPOLEMENUGROUPWIDTHS = ^OLEMENUGROUPWIDTHS;
- POleMenuGroupWidths = LPOLEMENUGROUPWIDTHS;
-
-
- IProvideClassInfo = Interface (IUnknown)
- ['{B196B283-BAB4-101A-B69C-00AA00341D07}']
- function GetClassInfo(out pptti : ITypeInfo):HResult; StdCall;
- end;
-
-
- IProvideClassInfo2 = Interface (IProvideClassInfo)
- ['{A6BC3AC0-DBAA-11CE-9DE3-00AA004BB851}']
- function GetGUID(dwguid:DWord;out pguid:TGUID):HResult; StdCall;
- end;
-
-{ ******************************************************************************************************************
- stuff from objbase.h
- ****************************************************************************************************************** }
-
- tagOIFI = record
- cb: UINT;
- fMDIApp: BOOL;
- hwndFrame: HWND;
- haccel: HAccel;
- cAccelEntries: UINT;
- end;
- TOleInPlaceFrameInfo = tagOIFI;
- POleInPlaceFrameInfo = ^TOleInPlaceFrameInfo;
- LPOleInPlaceFrameInfo = POleInPlaceFrameInfo;
- OLEINPLACEFRAMEINFO = tagOIFI;
-
-
-{ redefinitions }
- function CoCreateGuid(out _para1:TGUID):HRESULT;stdcall;external 'ole32.dll' name 'CoCreateGuid';
-
-{ additional definitions }
-{$ifndef wince}
- function IsEqualGUID(const guid1,guid2 : TGUID) : Boolean;stdcall;external 'ole32.dll' name 'IsEqualGUID';
- function IsEqualIID(const iid1,iid2 : TIID) : Boolean;stdcall;external 'ole32.dll' name 'IsEqualGUID';
- function IsEqualCLSID(const clsid1,clsid2 : TCLSID) : Boolean;stdcall;external 'ole32.dll' name 'IsEqualGUID';
-{$endif wince}
-
-{ OleIdl.h }
-type
- IOleInPlaceActiveObject = interface;
-
- IOleAdviseHolder = interface(IUnknown)
- ['{00000111-0000-0000-C000-000000000046}']
- function Advise(const advise: IAdviseSink; out dwConnection: DWORD): HResult;StdCall;
- function Unadvise(dwConnection: DWORD): HResult;StdCall;
- function EnumAdvise(out enumAdvise: IEnumStatData): HResult;StdCall;
- function SendOnRename(const mk: IMoniker): HResult;StdCall;
- function SendOnSave: HResult;StdCall;
- function SendOnClose: HResult;StdCall;
- end;
-
- IEnumOLEVERB = interface(IUnknown)
- ['{00000104-0000-0000-C000-000000000046}']
- function Next(celt: ULONG; out elt; pceltFetched: PULONG=nil): HResult;StdCall;
- function Skip(celt: ULONG): HResult;StdCall;
- function Reset: HResult;StdCall;
- function Clone(out ppenum: IEnumOLEVERB): HResult;StdCall;
- end;
-
- IDropSource = interface(IUnknown)
- ['{00000121-0000-0000-C000-000000000046}']
- function QueryContinueDrag(fEscapePressed: BOOL;
- grfKeyState: Longint):HResult;StdCall;
- function GiveFeedback(dwEffect: Longint): HResult;StdCall;
- end;
-
- IOleObject = interface(IUnknown)
- ['{00000112-0000-0000-C000-000000000046}']
- function SetClientSite(const clientSite: IOleClientSite): HResult;StdCall;
- function GetClientSite(out clientSite: IOleClientSite): HResult;StdCall;
- function SetHostNames(szContainerApp: POleStr; szContainerObj: POleStr): HResult;StdCall;
- function Close(dwSaveOption: DWORD): HResult;StdCall;
- function SetMoniker(dwWhichMoniker: DWORD; const mk: IMoniker): HResult;StdCall;
- function GetMoniker(dwAssign: DWORD; dwWhichMoniker: DWORD; out mk: IMoniker): HResult;StdCall;
- function InitFromData(const dataObject: IDataObject; fCreation: BOOL; dwReserved: DWORD): HResult;StdCall;
- function GetClipboardData(dwReserved: DWORD; out dataObject: IDataObject): HResult;StdCall;
- function DoVerb(iVerb: LONG; msg: PMsg; const activeSite: IOleClientSite; lindex: LONG; hwndParent: HWND; const posRect: TRect): HResult;StdCall;
- function EnumVerbs(out enumOleVerb: IEnumOleVerb): HResult;StdCall;
- function Update: HResult;StdCall;
- function IsUpToDate: HResult;StdCall;
- function GetUserClassID(out clsid: TCLSID): HResult;StdCall;
- function GetUserType(dwFormOfType: DWORD; out pszUserType: POleStr): HResult;StdCall;
- function SetExtent(dwDrawAspect: DWORD; const size: TPoint): HResult;StdCall;
- function GetExtent(dwDrawAspect: DWORD; out size: TPoint): HResult;StdCall;
- function Advise(const advSink: IAdviseSink; out dwConnection: Longint): HResult;StdCall;
- function Unadvise(dwConnection: DWORD): HResult;StdCall;
- function EnumAdvise(out enumAdvise: IEnumStatData): HResult;StdCall;
- function GetMiscStatus(dwAspect: DWORD; out dwStatus: DWORD): HResult;StdCall;
- function SetColorScheme(const logpal: TLogPalette): HResult;StdCall;
- end;
-
- IDropTarget = interface(IUnknown)
- ['{00000122-0000-0000-C000-000000000046}']
- function DragEnter(const dataObj: IDataObject; grfKeyState: DWORD; pt: TPoint; var dwEffect: DWORD): HResult;StdCall;
- function DragOver(grfKeyState: DWORD; pt: TPoint; var dwEffect: DWORD): HResult;StdCall;
- function DragLeave: HResult;StdCall;
- function Drop(const dataObj: IDataObject; grfKeyState: DWORD; pt: TPoint; var dwEffect: DWORD):HResult;StdCall;
- end;
-
- IOleInPlaceUIWindow = interface(IOleWindow)
- ['{00000115-0000-0000-C000-000000000046}']
- function GetBorder(out rectBorder: TRect):HResult;StdCall;
- function RequestBorderSpace(const borderwidths: TRect):HResult;StdCall;
- function SetBorderSpace(const borderwidths: TRect):HResult;StdCall;
- function SetActiveObject(const activeObject: IOleInPlaceActiveObject;pszObjName: POleStr):HResult;StdCall;
- end;
-
- IOleInPlaceActiveObject = interface(IOleWindow)
- ['{00000117-0000-0000-C000-000000000046}']
- function TranslateAccelerator(var msg: TMsg):HResult;StdCall;
- function OnFrameWindowActivate(fActivate: BOOL):HResult;StdCall;
- function OnDocWindowActivate(fActivate: BOOL):HResult;StdCall;
- function ResizeBorder(const rcBorder: TRect; const uiWindow: IOleInPlaceUIWindow; fFrameWindow: BOOL):HResult;StdCall;
- function EnableModeless(fEnable: BOOL):HResult;StdCall;
- end;
-
- IOleInPlaceFrame = interface(IOleInPlaceUIWindow)
- ['{00000116-0000-0000-C000-000000000046}']
- function InsertMenus(hmenuShared: HMenu; var menuWidths: TOleMenuGroupWidths): HResult;StdCall;
- function SetMenu(hmenuShared: HMenu; holemenu: HMenu; hwndActiveObject: HWnd): HResult;StdCall;
- function RemoveMenus(hmenuShared: HMenu): HResult;StdCall;
- function SetStatusText(pszStatusText: POleStr): HResult;StdCall;
- function EnableModeless(fEnable: BOOL): HResult;StdCall;
- function TranslateAccelerator(var msg: TMsg; wID: Word): HResult;StdCall;
- end;
-
- IOleLink = interface(IUnknown)
- ['{0000011d-0000-0000-C000-000000000046}']
- function SetUpdateOptions(dwupdateopt:dword):HResult; stdcall;
- function GetUpdateOptions(dwupdateopt:pdword):HResult; stdcall;
- function SetSourceMoniker(pmk : IMoniker;const clsid: TCLSID):HRESULT; stdcall;
- function GetSourceMoniker(out pmk : IMoniker):HRESULT; stdcall;
- function SetSourceDisplayName(ppszDisplayName:lpolestr):HResult; stdcall;
- function GetSourceDisplayName(out ppszDisplayName:lpolestr):HResult; stdcall;
- function BindToSource(bindflags:DWord;pbc: IBindCTX):HResult; stdcall;
- function BindIfRunning:HResult; stdcall;
- function GetBoundSource(out ppunk: IUnKnown):HResult; stdcall;
- function UnbindSource:HResult; stdcall;
- function Update(pbc:IBindCtx):HResult; stdcall;
- end;
-
- IOleInPlaceSite = interface(IOleWindow)
- ['{00000119-0000-0000-C000-000000000046}']
- function CanInPlaceActivate : HResult;
- function OnInPlaceActivate : HResult;
- function OnUIActivate : HResult;
- function GetWindowContext(out ppframe:IOleInPlaceFrame;out ppdoc:IOleInPlaceUIWindow;lprcposrect:LPRECT;lprccliprect:LPRECT;lpframeinfo:LPOLEINPLACEFRAMEINFO):hresult; stdcall;
- function Scroll(scrollExtant:TSIZE):hresult; stdcall;
- function OnUIDeactivate(fUndoable:BOOL):hresult; stdcall;
- function OnInPlaceDeactivate :hresult; stdcall;
- function DiscardUndoState :hresult; stdcall;
- function DeactivateAndUndo :hresult; stdcall;
- function OnPosRectChange(lprcPosRect:LPRect):hresult; stdcall;
- end;
-
- IOleInPlaceObject = interface(IOleWindow)
- ['{00000113-0000-0000-C000-000000000046}']
- function InPlaceDeactivate : HResult;
- function UIDeactivate : HResult;
- function SetObjectRects(lprcPosRect:LPRect;lprcClipRect:LPRect):hresult; stdcall;
- function ReactivateAndUndo : HResult;
- end;
-
- IOleDocumentView = interface(IUnknown)
- ['{b722bcc6-4e68-101b-a2bc-00aa00404770}']
- function SetInPlaceSite(ppipsite:IOleInPlaceSite):hresult; stdcall;
- function GetInPlaceSite(out ppipsite:IOleInPlaceSite):hresult; stdcall;
- function GetDocument(out ppipsite:Iunknown):hresult; stdcall;
- function SetRect(prcview:LPRect):hresult; stdcall;
- function Getrect(prcView:LPRect):hresult; stdcall;
- function SetRectComplex(prcview:LPRect;prcHScroll:LPRect;prcVScroll:LPRect;prcSizeBox:LPRect):hresult; stdcall;
- function Show(fshow:Bool) :hresult; stdcall;
- function UIActivate(fUIActive :BOOL): HResult;
- function Open :hresult; stdcall;
- function Closeview(dwreserved:DWORD):hresult; stdcall;
- function SaveViewState(pstm:IStream):hresult; stdcall;
- function ApplyViewState(pstm:IStream):hresult; stdcall;
- function Clone(pipsitenew: IOleInPlaceSite;out ppviewNew:IOleDocumentView):HResult;
- end;
-
- IEnumOleDocumentViews = Interface(IUnknown)
- ['{b722bcc8-4e68-101b-a2bc-00aa00404770}']
- function Next (CViews:ULONG; out rgpview:IOleDocumentView;pcfetched:pulong):hresult; stdcall;
- function Skip (CViews:ULong):hresult; stdcall;
- function Reset:HResult; stdcall;
- function Clone (out ppenum :IEnumOleDocumentViews) :HResult; stdcall;
- end;
-
- IOleDocument = interface(IUnknown)
- ['{b722bcc5-4e68-101b-a2bc-00aa00404770}']
- function CreateView(pipsite:IOleInPlaceSite;pstm:IStream;dwReserved:DWord;out ppview : IOleDocumentView):hresult; stdcall;
- function GetDocMiscStatus(pdwstatus:PDWord):hresult; stdcall;
- function EnumViews(out ppenum:IEnumOleDocumentViews;out ppview:IOleDocumentView):hresult; stdcall;
- end;
-
- IOleDocumentSite = interface(IUnknown)
- ['{b722bcc7-4e68-101b-a2bc-00aa00404770}']
- function ActivateMe(pviewtoactivate:IOleDocumentView):hresult; stdcall;
- end;
-
- IContinueCallback = interface(IUnknown)
- ['{b722bcca-4e68-101b-a2bc-00aa00404770}']
- function FContinue:HResult;Stdcall;
- function FContinuePrinting( nCntPrinted:LONG;nCurPage:Long;pwzprintstatus:polestr):HResult;Stdcall;
- end;
-
-
-{ ObjSafe.idl}
- IObjectSafety = interface(IUnknown)
- ['{CB5BDC81-93C1-11cf-8F20-00805F2CD064}']
- function GetInterfaceSafetyOptions(const riid:Tiid; out pdwsupportedoptions: dword;out pdwenabledoptions: dword):HRESULT; stdcall;
- function SetInterfaceSafetyOptions(const riid:Tiid; const dwoptionsetmask: dword;const dwenabledoptions : dword):HRESULT; stdcall;
- end;
-
- TContinueCallback = function (dwcontinue:ULONG_PTR):BOOL; stdcall;
-
-
- IViewObject = interface(IUnknown)
- ['{0000010d-0000-0000-C000-000000000046}']
- function Draw(dwDrawAspect:DWord;LIndex:Long;pvaspect:pointer;ptd:PDVTARGETDEVICE;hdcTargetDev:HDC; hdcDraw:HDC;lprcBounds:PRECTL;lprcWBounds:PRECTL;pfncontinue:TContinueCallback;dwcontinue:ULONG_PTR):HResult; stdcall;
- function GetColorSet(wDrawAspect:DWord;LIndex:Long;pvaspect:pointer;ptd:PDVTARGETDEVICE;hdcTargetDev:HDC;var ppcolorset:PLogPalette):HREsult; stdcall;
- function Freeze(dwDrawAspect:DWord;LIndex:Long;pvaspect:pointer;pdwfreeze:pdword):HResult;stdcall;
- function Unfreeze(dwfreeze:dword):HResult; stdcall;
- function SetAdvise(aspects:DWORD;advf:DWORD;padvSink:IAdviseSink):HRESULT;stdcall;
- function Getadvise(paspects:pdword;padvf:pdword;out ppadvsink: IADviseSink):HRESULT;stdcall;
- end;
-
- IViewObject2 = interface(IViewObject)
- ['{00000127-0000-0000-C000-000000000046}']
- function GetExtent(dwDrawAspect:dword;lindex:DWord;ptd:pDVTARGETDEVICE;lpsizel:LPSIZEL):HRESULT;stdcall;
- end;
-
-
-
-{ COMCAT}
-
-Const CATDESC_MAX = 128;
-
-Type
- CATID = TGUID;
- TCATID = TGUID;
- PCATID = PGUID;
- tagCATEGORYINFO = packed record
- catid : CATID;
- LCID : lcid;
- szDescription : array[0..CATDESC_MAX-1] of WideChar;
- end;
-
- CATEGORYINFO = tagCATEGORYINFO;
- TCATEGORYINFO = tagCATEGORYINFO;
- LPCATEGORYINFO = ^tagCATEGORYINFO;
- PCATEGORYINFO = LPCATEGORYINFO;
-
- IEnumCLSID = IEnumGUID;
- IEnumCategoryInfo = interface(IUnknown)
- ['{0002E011-0000-0000-C000-000000000046}']
- function Next(celt: ULONG; out rgelt: TCategoryInfo; out pceltFetched: ULONG): HResult; stdcall;
- function Skip(celt:ULONG):HResult; StdCall;
- function Reset:HResult; StdCall;
- function CLone(Out ppenum : IEnumCategoryInfo):HResult;StdCall;
- end;
-
- ICatRegister = interface (IUnknown)
- ['{0002E012-0000-0000-C000-000000000046}']
- function RegisterCategories (cCategories:ULONG;rgCategoryInfo : PCategoryInfo):HResult;Stdcall;
- function UnRegisterCategories (cCategories:ULONG;PCatid :PCATID):HResult;Stdcall;
- function RegisterClassImplCategories (const rclsid:TGUID;cCategories:ULONG; rgCatid :PCATID):HResult;Stdcall;
- function UnRegisterClassImplCategories (const rclsid:TGUID;cCategories:ULONG; rgCatid :PCATID):HResult;Stdcall;
- function RegisterClassReqCategories (const rclsid:TGUID;cCategories:ULONG; rgCatid :PCATID):HResult;Stdcall;
- function UnRegisterClassReqCategories (const rclsid:TGUID;cCategories:ULONG; rgCatid :PCATID):HResult;Stdcall;
- end;
-
- ICatInformation = interface(IUnknown)
- ['{0002E013-0000-0000-C000-000000000046}']
- function EnumCategories(lcid:lcid;out ppenumCategoryInfo : IEnumCategoryInfo):HResult; StdCall;
- function GetCategoryDesc(rcatid:PCATID;lcid:LCID;out pszdesc:lpwstr):HResult; StdCall;
- function EnumClassesOfCategories(cImplemented : ULong; rgcatidImpl:PCATID;cRequired:ULong; rgcatidreq:PCATID; out ppenumclsid : IEnumClsID):HResult; StdCall;
- function ISClassOfCategories(rclsid:pclsid;cImplemented:ULong;rgcatidimpl:PCATID;CRequired:ULONG;rgcatidreq : pcatid):HResult; StdCall;
- function EnumImplCategoriesOfClass(rclsid:pclsid;out ppenumclsid : IEnumClsID):HResult; StdCall;
- function EnumReqCategoriesOfClass(rclsid:pclsid;out ppenumclsid : IEnumClsID):HResult; StdCall;
- end;
-
- IPropertySetStorage = Interface(IUnknown)
- ['{0000013A-0000-0000-C000-000000000046}']
- function Create(const rfmtid:FMTID; const pclsid:CLSID; grfFlags:DWORD; grfMode:DWORD; out ppprstg:IPropertyStorage):HRESULT; StdCall;
- function Open(const fmtid:FMTID; grfMode:DWORD; out ppprstg:IPropertyStorage):HRESULT; StdCall;
- function Delete(const rfmtid:FMTID):HRESULT; StdCall;
- function Enum(out ppenum:IEnumSTATPROPSETSTG):HRESULT; StdCall;
- end;
-
- IEnumSTATPROPSTG = interface( IUnknown)
- ['{00000139-0000-0000-C000-000000000046}']
- function Next(celt:ULONG; var rgelt:STATPROPSTG; pceltFetched:pULONG):HRESULT; StdCall;
- function Skip(celt:ULONG):HRESULT; StdCall;
- function Reset:HRESULT; StdCall;
- function Clone(out ppenum:IEnumSTATPROPSTG):HRESULT; StdCall;
- end;
-
- IEnumSTATPROPSETSTG = interface( IUnknown)
- ['{0000013B-0000-0000-C000-000000000046}']
- function Next(celt:ULONG; var rgelt:STATPROPSETSTG; pceltFetched:pULONG):HRESULT; StdCall;
- function Skip(celt:ULONG):HRESULT; StdCall;
- function Reset:HRESULT; StdCall;
- function Clone(out ppenum:IEnumSTATPROPSETSTG):HRESULT; StdCall;
- end;
-
- IPropertyStorage = interface(IUnknown)
- ['{00000138-0000-0000-C000-000000000046}']
- function ReadMultiple(cpspec:ULONG; rgpspec:pPROPSPEC; rgpropvar:pPROPVARIANT):HRESULT; StdCall;
- function WriteMultiple(cpspec:ULONG; rgpspec:pPROPSPEC; rgpropvar:pPROPVARIANT; propidNameFirst:PROPID):HRESULT; StdCall;
- function DeleteMultiple(cpspec:ULONG; rgpspec:pPROPSPEC):HRESULT; StdCall;
- function ReadPropertyNames(cpspec:ULONG; rgpropid:pPROPID; rgpropvar:plpolestr):HRESULT; StdCall;
- function WritePropertyNames(cpspec:ULONG; rgpspec:pPROPID; rgpropvar:plpolestr):HRESULT; StdCall;
- function DeletePropertyNames(cpspec:ULONG; rgpspec:pPROPid):HRESULT; StdCall;
- function Commit(grfCommitFlags:DWORD):HRESULT; StdCall;
- function Revert:HRESULT; StdCall;
- function Enum(out ppenum:IEnumSTATPROPSTG):HRESULT; StdCall;
- function SetTimes(pctime:PFILETIME; patime:PFILETIME; pmtime:PFILETIME):HRESULT; StdCall;
- function SetClass(clsid:pCLSID):HRESULT; StdCall;
- function Stat(pstatpsstg:pSTATPROPSETSTG):HRESULT; StdCall;
- end;
-
-{ ole2.h }
-
- type
- WINOLEAPI = HResult;
- TLCID = DWORD; // is this needed (duplicate from windows?)
-
- const
- OLEIVERB_PRIMARY = 0;
- OLEIVERB_SHOW = -(1);
- OLEIVERB_OPEN = -(2);
- OLEIVERB_HIDE = -(3);
- OLEIVERB_UIACTIVATE = -(4);
- OLEIVERB_INPLACEACTIVATE = -(5);
- OLEIVERB_DISCARDUNDOSTATE = -(6);
- { for OleCreateEmbeddingHelper flags; roles low word; options high word }
- EMBDHLP_INPROC_HANDLER = $0000;
- EMBDHLP_INPROC_SERVER = $0001;
- EMBDHLP_CREATENOW = $00000000;
- EMBDHLP_DELAYCREATE = $00010000;
- { extended create function flags }
- OLECREATE_LEAVERUNNING = $00000001;
- { pull the MIDL generated header }
-{$ifndef wince}
- function OleBuildVersion:DWORD;stdcall;external 'ole32.dll' name 'OleBuildVersion';
-{$endif wince}
- { helper functions }
- function ReadClassStg(pStg:IStorage; pclsid:PCLSID):WINOLEAPI;stdcall;external 'ole32.dll' name 'ReadClassStg';
- function WriteClassStg(pStg:IStorage;const rclsid:TCLSID):WINOLEAPI;stdcall;external 'ole32.dll' name 'WriteClassStg';
- function ReadClassStm(pStm:IStream; pclsid:PCLSID):WINOLEAPI;stdcall;external 'ole32.dll' name 'ReadClassStm';
- function WriteClassStm(pStm:IStream;const rclsid:TCLSID):WINOLEAPI;stdcall;external 'ole32.dll' name 'WriteClassStm';
-{$ifndef wince}
- function WriteFmtUserTypeStg(pstg:IStorage; cf:CLIPFORMAT; lpszUserType:LPOLESTR):WINOLEAPI;stdcall;external 'ole32.dll' name 'WriteFmtUserTypeStg';
- function ReadFmtUserTypeStg(pstg:IStorage; pcf:PCLIPFORMAT;out lplpszUserType:POleStr):WINOLEAPI;stdcall;external 'ole32.dll' name 'ReadFmtUserTypeStg';
-
- { init/term }
- function OleInitialize(pvReserved:LPVOID):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleInitialize';
- procedure OleUninitialize;stdcall;external 'ole32.dll' name 'OleUninitialize';
-
- { APIs to query whether (Embedded/Linked) object can be created from
- the data object }
- function OleQueryLinkFromData(pSrcDataObject:IDataObject):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleQueryLinkFromData';
- function OleQueryCreateFromData(pSrcDataObject:IDataObject):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleQueryCreateFromData';
-{$endif wince}
- { Object creation APIs }
- function OleCreate(const rclsid:TCLSID; const riid:TIID;
- renderopt:DWORD; pFormatEtc:LPFORMATETC; pClientSite:IOleClientSite;
- pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name
- 'OleCreate';
-{$ifndef wince}
- function OleCreateEx(const rclsid:TCLSID; const riid:TIID; dwFlags:DWORD; renderopt:DWORD; cFormats:ULONG;
- rgAdvf:PDWORD; rgFormatEtc:LPFORMATETC; lpAdviseSink:IAdviseSink; rgdwConnection:PDWORD; pClientSite:IOleClientSite;
- pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateEx';
-
- function OleCreateFromData(pSrcDataObj:IDataObject; const riid:TIID; renderopt:DWORD; pFormatEtc:LPFORMATETC; pClientSite:IOleClientSite;
- pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateFromData';
-
- function OleCreateFromDataEx(pSrcDataObj:IDataObject; const riid:TIID; dwFlags:DWORD; renderopt:DWORD; cFormats:ULONG;
- rgAdvf:PDWORD; rgFormatEtc:LPFORMATETC; lpAdviseSink:IAdviseSink; rgdwConnection:PDWORD; pClientSite:IOleClientSite;
- pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateFromDataEx';
-
- function OleCreateLinkFromData(pSrcDataObj:IDataObject; const riid:TIID; renderopt:DWORD; pFormatEtc:LPFORMATETC; pClientSite:IOleClientSite;
- pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateLinkFromData';
-
- function OleCreateLinkFromDataEx(pSrcDataObj:IDataObject; const riid:TIID; dwFlags:DWORD; renderopt:DWORD; cFormats:ULONG;
- rgAdvf:PDWORD; rgFormatEtc:LPFORMATETC; lpAdviseSink:IAdviseSink; rgdwConnection:PDWORD; pClientSite:IOleClientSite;
- pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateLinkFromDataEx';
-
- function OleCreateStaticFromData(pSrcDataObj:IDataObject; const iid:TIID; renderopt:DWORD; pFormatEtc:LPFORMATETC; pClientSite:IOleClientSite;
- pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateStaticFromData';
-
- function OleCreateLink(pmkLinkSrc:IMoniker; const riid:TIID; renderopt:DWORD; lpFormatEtc:LPFORMATETC; pClientSite:IOleClientSite;
- pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateLink';
-
- function OleCreateLinkEx(pmkLinkSrc:IMoniker; const riid:TIID; dwFlags:DWORD; renderopt:DWORD; cFormats:ULONG;
- rgAdvf:PDWORD; rgFormatEtc:LPFORMATETC; lpAdviseSink:IAdviseSink; rgdwConnection:PDWORD; pClientSite:IOleClientSite;
- pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateLinkEx';
-
- function OleCreateLinkToFile(lpszFileName:POleStr; const riid:TIID; renderopt:DWORD; lpFormatEtc:LPFORMATETC; pClientSite:IOleClientSite;
- pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateLinkToFile';
-
- function OleCreateLinkToFileEx(lpszFileName:POleStr; const riid:TIID; dwFlags:DWORD; renderopt:DWORD; cFormats:ULONG;
- rgAdvf:PDWORD; rgFormatEtc:LPFORMATETC; lpAdviseSink:IAdviseSink; rgdwConnection:PDWORD; pClientSite:IOleClientSite;
- pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateLinkToFileEx';
-
- function OleCreateFromFile(const rclsid:TCLSID; lpszFileName:POleStr; const riid:TIID; renderopt:DWORD; lpFormatEtc:LPFORMATETC;
- pClientSite:IOleClientSite; pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateFromFile';
-
- function OleCreateFromFileEx(const rclsid:TCLSID; lpszFileName:POleStr; const riid:TIID; dwFlags:DWORD; renderopt:DWORD;
- cFormats:ULONG; rgAdvf:PDWORD; rgFormatEtc:LPFORMATETC; lpAdviseSink:IAdviseSink; rgdwConnection:PDWORD;
- pClientSite:IOleClientSite; pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateFromFileEx';
-
- function OleLoad(pStg:IStorage; const riid:TIID; pClientSite:IOleClientSite; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleLoad';
- function OleLoadFromStream(pStm:IStream; const iidInterface:TIID; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleLoadFromStream';
- function OleSaveToStream(pPStm:IPersistStream; pStm:IStream):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleSaveToStream';
- function OleNoteObjectVisible(pUnknown:IUnknown; fVisible:BOOL):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleNoteObjectVisible';
-{$endif wince}
- function OleSave(pPS:IPersistStorage; pStg:IStorage; fSameAsLoad:BOOL):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleSave';
- function OleSetContainedObject(pUnknown:IUnknown; fContained:BOOL):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleSetContainedObject';
-
- { Drag/Drop APIs }
-{$ifndef wince}
- function RegisterDragDrop(hwnd:HWND; pDropTarget:IDropTarget):WINOLEAPI;stdcall;external 'ole32.dll' name 'RegisterDragDrop';
- function RevokeDragDrop(hwnd:HWND):WINOLEAPI;stdcall;external 'ole32.dll' name 'RevokeDragDrop';
- function DoDragDrop(pDataObj:IDataObject; pDropSource:IDropSource; dwOKEffects:DWORD; pdwEffect:LPDWORD):WINOLEAPI;stdcall;external 'ole32.dll' name 'DoDragDrop';
-
- { Clipboard APIs }
- function OleSetClipboard(pDataObj:IDataObject):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleSetClipboard';
- function OleGetClipboard(out ppDataObj:IDataObject):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleGetClipboard';
- function OleFlushClipboard:WINOLEAPI;stdcall;external 'ole32.dll' name 'OleFlushClipboard';
- function OleIsCurrentClipboard(pDataObj:IDataObject):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleIsCurrentClipboard';
-{$endif wince}
-
-type
- HOLEMENU = HMenu;
-
- { InPlace Editing APIs }
-{$ifndef wince}
- function OleCreateMenuDescriptor(hmenuCombined:HMENU; lpMenuWidths:LPOLEMENUGROUPWIDTHS):HOLEMENU;stdcall;external 'ole32.dll' name 'OleCreateMenuDescriptor';
- function OleDestroyMenuDescriptor(holemenu:HOLEMENU):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleDestroyMenuDescriptor';
- function OleTranslateAccelerator(lpFrame:IOleInPlaceFrame; lpFrameInfo:TOleInPlaceFrameInfo; lpmsg:LPMSG):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleTranslateAccelerator';
-{$endif wince}
- function OleSetMenuDescriptor(holemenu:HOLEMENU; hwndFrame:HWND; hwndActiveObject:HWND; lpFrame:IOleInPlaceFrame; lpActiveObj:IOleInPlaceActiveObject):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleSetMenuDescriptor';
-
- { Helper APIs }
-{$ifndef wince}
- function OleDuplicateData(hSrc:HANDLE; cfFormat:CLIPFORMAT; uiFlags:UINT):HANDLE;stdcall;external 'ole32.dll' name 'OleDuplicateData';
- function OleLockRunning(pUnknown:IUnknown; fLock:BOOL; fLastUnlockCloses:BOOL):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleLockRunning';
- function OleCreateDefaultHandler(const clsid:TCLSID; pUnkOuter:IUnknown; const riid:TIID; out lplpObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateDefaultHandler';
- function OleCreateEmbeddingHelper(const clsid:TCLSID; pUnkOuter:IUnknown; flags:DWORD; pCF:IClassFactory; const riid:TIID;
- out lplpObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateEmbeddingHelper';
- function IsAccelerator(hAccel:HACCEL; cAccelEntries:longint; lpMsg:LPMSG; lpwCmd:PWORD):BOOL;stdcall;external 'ole32.dll' name 'IsAccelerator';
-{$endif wince}
- function OleDraw(pUnknown:IUnknown; dwAspect:DWORD; hdcDraw:HDC;const lprcBounds:TRect):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleDraw';
- function OleRun(pUnknown:IUnknown):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleRun';
- function OleIsRunning(pObject:IOleObject):BOOL;stdcall;external 'ole32.dll' name 'OleIsRunning';
-
- procedure ReleaseStgMedium(var _para1:STGMEDIUM);stdcall;external 'ole32.dll' name 'ReleaseStgMedium';
- procedure ReleaseStgMedium(_para1:LPSTGMEDIUM);stdcall;external 'ole32.dll' name 'ReleaseStgMedium';
- function CreateOleAdviseHolder(out ppOAHolder:IOleAdviseHolder):WINOLEAPI;stdcall;external 'ole32.dll' name 'CreateOleAdviseHolder';
-
- { Icon extraction Helper APIs }
-{$ifndef wince}
- function OleGetIconOfFile(lpszPath:LPOLESTR; fUseFileAsLabel:BOOL):HGLOBAL;stdcall;external 'ole32.dll' name 'OleGetIconOfFile';
- function OleGetIconOfClass(const rclsid:TCLSID; lpszLabel:LPOLESTR; fUseTypeAsLabel:BOOL):HGLOBAL;stdcall;external 'ole32.dll' name 'OleGetIconOfClass';
- function OleMetafilePictFromIconAndLabel(hIcon:HICON; lpszLabel:LPOLESTR; lpszSourceFile:LPOLESTR; iIconIndex:UINT):HGLOBAL;stdcall;external 'ole32.dll' name 'OleMetafilePictFromIconAndLabel';
-{$endif wince}
-
- { Registration Database Helper APIs }
-{$ifndef wince}
- function OleRegGetUserType(const clsid:TCLSID; dwFormOfType:DWORD;out pszUserType:POleStr):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleRegGetUserType';
- function OleRegGetMiscStatus(const clsid:TCLSID; dwAspect:DWORD; pdwStatus:PDWORD):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleRegGetMiscStatus';
- function OleRegEnumFormatEtc(const clsid:TCLSID; dwDirection:DWORD;out ppenum:IEnumFormatEtc):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleRegEnumFormatEtc';
- function OleRegEnumVerbs(const clsid:TCLSID;out ppenum:IEnumOLEVERB):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleRegEnumVerbs';
-{$endif wince}
-
-{$ifdef _MAC}
- { WlmOLE helper APIs }
-
- function WlmOleCheckoutMacInterface(pUnk:IUnknown; out ppv):WINOLEAPI;stdcall;external 'ole32.dll' name 'WlmOleCheckoutMacInterface';
-
- function WlmOleCheckinMacInterface(pUnk:IUnknown):WINOLEAPI;stdcall;external 'ole32.dll' name 'WlmOleCheckinMacInterface';
-
- function WlmOleWrapMacInterface(pUnk:IUnknown; const riid:TIID; out ppv):WINOLEAPI;stdcall;external 'ole32.dll' name 'WlmOleWrapMacInterface';
-
- function WlmOleUnwrapMacInterface(pv:LPVOID):WINOLEAPI;stdcall;external 'ole32.dll' name 'WlmOleUnwrapMacInterface';
-
- function WlmOleCheckoutWinInterface(pUnk:LPVOID; ppv:PIUnknown):WINOLEAPI;stdcall;external 'ole32.dll' name 'WlmOleCheckoutWinInterface';
-
- function WlmOleCheckinWinInterface(pUnk:LPVOID):WINOLEAPI;stdcall;external 'ole32.dll' name 'WlmOleCheckinWinInterface';
-
- function WlmOleWrapWinInterface(pUnk:LPVOID; const riid:TIID; ppv:PIUnknown):WINOLEAPI;stdcall;external 'ole32.dll' name 'WlmOleWrapWinInterface';
-
- function WlmOleUnwrapWinInterface(pv:LPVOID):WINOLEAPI;stdcall;external 'ole32.dll' name 'WlmOleUnwrapWinInterface';
-
- procedure WlmOleVersion;stdcall;external 'ole32.dll' name 'WlmOleVersion';
-
- procedure WlmOleSetInPlaceWindow(hwnd:HWND);stdcall;external 'ole32.dll' name 'WlmOleSetInPlaceWindow';
-
- { typedef HRESULT (STDAPICALLTYPE* OLEWRAPPROC) (TIID riid, LPVOID* ppvWin, LPVOID* ppvMac); }
- function WlmOleRegisterUserWrap(procNew:OLEWRAPPROC; pprocOld:POLEWRAPPROC):WINOLEAPI;stdcall;external 'ole32.dll' name 'WlmOleRegisterUserWrap';
-
-{$endif}
- { OLE 1.0 conversion APIS }
- {**** OLE 1.0 OLESTREAM declarations ************************************ }
-
- type
- LPOLESTREAM = ^_OLESTREAM;
- _OLESTREAMVTBL = record
- Get : function (p : POleStr;out o;dw : DWORD) : DWORD;
- Put : function (p : POleStr;const o;dw : DWORD) : DWORD;
- end;
- OLESTREAMVTBL = _OLESTREAMVTBL;
-
- LPOLESTREAMVTBL = OLESTREAMVTBL;
-
- _OLESTREAM = record
- lpstbl : LPOLESTREAMVTBL;
- end;
- OLESTREAM = _OLESTREAM;
-(* Const before type ignored *)
-
-{$ifndef wince}
- function OleConvertOLESTREAMToIStorage(_lpolestream:LPOLESTREAM; pstg:IStorage; ptd:PDVTARGETDEVICE):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleConvertOLESTREAMToIStorage';
- function OleConvertIStorageToOLESTREAM(pstg:IStorage; lpolestream:LPOLESTREAM):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleConvertIStorageToOLESTREAM';
-{$endif wince}
-
- { Storage Utility APIs }
- function GetHGlobalFromILockBytes(plkbyt:ILockBytes;out phglobal:HGLOBAL):WINOLEAPI;stdcall;external 'ole32.dll' name 'GetHGlobalFromILockBytes';
- function CreateStreamOnHGlobal(hGlobal:HGLOBAL; fDeleteOnRelease:BOOL;out stm:IStream):WINOLEAPI;stdcall;external 'ole32.dll' name 'CreateStreamOnHGlobal';
-{$ifndef wince}
- function CreateILockBytesOnHGlobal(hGlobal:HGLOBAL; fDeleteOnRelease:BOOL;out pplkbyt:ILockBytes):WINOLEAPI;stdcall;external 'ole32.dll' name 'CreateILockBytesOnHGlobal';
- function GetHGlobalFromStream(pstm:IStream;out phglobal:HGLOBAL):WINOLEAPI;stdcall;external 'ole32.dll' name 'GetHGlobalFromStream';
-{$endif wince}
-
- { ConvertTo APIS }
-{$ifndef wince}
- function OleDoAutoConvert(pStg:IStorage; pClsidNew:LPCLSID):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleDoAutoConvert';
- function OleGetAutoConvert(const clsidOld:TCLSID; pClsidNew:LPCLSID):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleGetAutoConvert';
- function OleSetAutoConvert(const clsidOld:TCLSID; clsidNew:TCLSID):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleSetAutoConvert';
- function GetConvertStg(pStg:IStorage):WINOLEAPI;stdcall;external 'ole32.dll' name 'GetConvertStg';
- function SetConvertStg(pStg:IStorage; fConvert:BOOL):WINOLEAPI;stdcall;external 'ole32.dll' name 'SetConvertStg';
-
- { Presentation data to OLESTREAM }
- { format }
- { width }
- { height }
- { size bytes }
- { bits }
- function OleConvertIStorageToOLESTREAMEx(pstg:IStorage; cfFormat:CLIPFORMAT; lWidth:LONG; lHeight:LONG; dwSize:DWORD;
- pmedium:LPSTGMEDIUM; polestm:LPOLESTREAM):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleConvertIStorageToOLESTREAMEx';
-
- { Presentation data from OLESTREAM }
- { format }
- { width }
- { height }
- { size bytes }
- function OleConvertOLESTREAMToIStorageEx(polestm:LPOLESTREAM; pstg:IStorage; pcfFormat:PCLIPFORMAT; plwWidth:PLONG; plHeight:PLONG;
- pdwSize:PDWORD; pmedium:LPSTGMEDIUM):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleConvertOLESTREAMToIStorageEx';
-{$endif wince}
-
-const
- DROPEFFECT_NONE = 0;
- DROPEFFECT_COPY = 1;
- DROPEFFECT_MOVE = 2;
- DROPEFFECT_LINK = 4;
- DROPEFFECT_SCROLL = dword($80000000);
-
-
-type
- BORDERWIDTHS = TRect;
- LPBORDERWIDTHS = PRect;
- LPCBORDERWIDTHS = PRect;
-
- TBorderWidths = TRect;
- PBorderWidths = PRect;
-
- function CoInitializeEx(_para1:LPVOID; _para2:DWORD):HRESULT;stdcall; external 'ole32.dll' name 'CoInitializeEx';
- procedure CoUninitialize;stdcall; external 'ole32.dll' name 'CoUninitialize';
- function CoGetClassObject(const _para1:TCLSID; _para2:DWORD; _para3:PVOID; const _para4:TIID; out _para5):HRESULT;stdcall; external 'ole32.dll' name 'CoGetClassObject';
- function CoLoadLibrary(_para1:LPOLESTR; _para2:BOOL):THandle;stdcall; external 'ole32.dll' name 'CoLoadLibrary';
- procedure CoFreeLibrary(_para1:THandle);stdcall; external 'ole32.dll' name 'CoFreeLibrary';
- procedure CoFreeUnusedLibraries;stdcall; external 'ole32.dll' name 'CoFreeUnusedLibraries';
- function CoCreateInstance(const _para1:TCLSID; _para2:IUnknown; _para3:DWORD;const _para4:TIID;out _para5):HRESULT;stdcall; external 'ole32.dll' name 'CoCreateInstance';
- function StringFromCLSID(const _para1:TCLSID; out _para2:POLESTR):HRESULT;stdcall; external 'ole32.dll' name 'StringFromCLSID';
- function CLSIDFromString(_para1:LPOLESTR; _para2:LPCLSID):HRESULT;stdcall; external 'ole32.dll' name 'CLSIDFromString';
- function StringFromIID(const _para1:TIID; out _para2:POLESTR):HRESULT;stdcall; external 'ole32.dll' name 'StringFromIID';
- function ProgIDFromCLSID(para:PCLSID; out _para2:POLESTR):HRESULT;stdcall; external 'ole32.dll' name 'ProgIDFromCLSID';
- function ProgIDFromCLSID(const _para1:TCLSID; out _para2:POLESTR):HRESULT;stdcall; external 'ole32.dll' name 'ProgIDFromCLSID';
- function CLSIDFromProgID(_para1:POLESTR; _para2:LPCLSID):HRESULT;stdcall; external 'ole32.dll' name 'CLSIDFromProgID';
- function CLSIDFromProgID(_para1:POLESTR; out _para2:TCLSID):HRESULT;stdcall; external 'ole32.dll' name 'CLSIDFromProgID';
- function StringFromGUID2(const _para1:TGUID; _para2:LPOLESTR; _para3:longint):longint;stdcall; external 'ole32.dll' name 'StringFromGUID2';
- function CoCreateGuid(_para1:PGUID):HRESULT;stdcall; external 'ole32.dll' name 'CoCreateGuid';
-{$ifndef wince}
- function CoBuildVersion:DWORD;stdcall; external 'ole32.dll' name 'CoBuildVersion';
- function CoInitialize(_para1:PVOID):HRESULT;stdcall; external 'ole32.dll' name 'CoInitialize';
- function CoGetMalloc(_para1:DWORD; out _para2:IMalloc):HRESULT;stdcall; external 'ole32.dll' name 'CoGetMalloc';
- function CoGetCurrentProcess:DWORD;stdcall; external 'ole32.dll' name 'CoGetCurrentProcess';
- function CoRegisterMallocSpy(_para1:IMallocSpy):HRESULT;stdcall; external 'ole32.dll' name 'CoRegisterMallocSpy';
- function CoRevokeMallocSpy:HRESULT;stdcall; external 'ole32.dll' name 'CoRevokeMallocSpy';
- function CoCreateStandardMalloc(_para1:DWORD; out _para2:IMalloc):HRESULT;stdcall; external 'ole32.dll' name 'CoGetMalloc';
- function CoRegisterClassObject(const _para1:TCLSID; _para2:IUnknown; _para3:DWORD; _para4:DWORD; _para5:PDWORD):HRESULT;stdcall; external 'ole32.dll' name 'CoRegisterClassObject';
- function CoRevokeClassObject(_para1:DWORD):HRESULT;stdcall; external 'ole32.dll' name 'CoRevokeClassObject';
- function CoGetMarshalSizeMax(_para1:PULONG;const _para2:TIID; _para3:IUnknown; _para4:DWORD; _para5:PVOID;
- _para6:DWORD):HRESULT;stdcall; external 'ole32.dll' name 'CoGetMarshalSizeMax';
- function CoMarshalInterface(_para1:IStream;const _para2:TIID; _para3:IUnknown; _para4:DWORD; _para5:PVOID;
- _para6:DWORD):HRESULT;stdcall; external 'ole32.dll' name 'CoMarshalInterface';
- function CoUnmarshalInterface(_para1:IStream;const _para2:TIID; out _para3):HRESULT;stdcall; external 'ole32.dll' name 'CoUnmarshalInterface';
- function CoMarshalHresult(_para1:IStream; _para2:HRESULT):HRESULT;stdcall; external 'ole32.dll' name 'CoMarshalHresult';
- function CoUnmarshalHresult(_para1:IStream; _para2:HRESULT):HRESULT;stdcall; external 'ole32.dll' name 'CoUnmarshalHresult';
- function CoReleaseMarshalData(_para1:IStream):HRESULT;stdcall; external 'ole32.dll' name 'CoReleaseMarshalData';
- function CoDisconnectObject(_para1:IUnknown; _para2:DWORD):HRESULT;stdcall; external 'ole32.dll' name 'CoDisconnectObject';
- function CoLockObjectExternal(_para1:IUnknown; _para2:BOOL; _para3:BOOL):HRESULT;stdcall; external 'ole32.dll' name 'CoLockObjectExternal';
- function CoGetStandardMarshal(const _para1:TIID; _para2:IUnknown; _para3:DWORD; _para4:PVOID; _para5:DWORD;
- out _para6:IMarshal):HRESULT;stdcall; external 'ole32.dll' name 'CoGetStandardMarshal';
- function CoGetStdMarshalEx(_para1:IUnknown; _para2:DWORD; out _para3:IUnknown):HRESULT;stdcall; external 'ole32.dll' name 'CoGetStdMarshalEx';
- function CoIsHandlerConnected(_para1:IUnknown):BOOL;stdcall; external 'ole32.dll' name 'CoIsHandlerConnected';
- function CoHasStrongExternalConnections(_para1:IUnknown):BOOL;stdcall; external 'ole32.dll' name 'CoHasStrongExternalConnections';
- function CoMarshalInterThreadInterfaceInStream(const _para1:TIID; _para2:IUnknown; out _para3:IStream):HRESULT;stdcall; external 'ole32.dll' name 'CoMarshalInterThreadInterfaceInStream';
- function CoGetInterfaceAndReleaseStream(_para1:IStream;const _para2:TIID; out _para3):HRESULT;stdcall; external 'ole32.dll' name 'CoGetInterfaceAndReleaseStream';
- function CoCreateFreeThreadedMarshaler(_para1:IUnknown; out _para2:IUnknown):HRESULT;stdcall; external 'ole32.dll' name 'CoCreateFreeThreadedMarshaler';
- procedure CoFreeAllLibraries;stdcall; external 'ole32.dll' name 'CoFreeAllLibraries';
- function CoCreateInstanceEx(const _para1:TCLSID; _para2:IUnknown; _para3:DWORD; _para4:PCOSERVERINFO; _para5:DWORD;
- _para6:PMULTI_QI):HRESULT;stdcall; external 'ole32.dll' name 'CoCreateInstanceEx';
- function IIDFromString(_para1:LPOLESTR; out _para2:TIID):HRESULT;stdcall; external 'ole32.dll' name 'IIDFromString';
- function CoIsOle1Class(const _para1:TCLSID):BOOL;stdcall; external 'ole32.dll' name 'CoIsOle1Class';
- function CoFileTimeToDosDateTime(_para1:PFILETIME; _para2:LPWORD; _para3:LPWORD):BOOL;stdcall; external 'ole32.dll' name 'CoFileTimeToDosDateTime';
- function CoDosDateTimeToFileTime(_para1:WORD; _para2:WORD; _para3:PFILETIME):BOOL;stdcall; external 'ole32.dll' name 'CoDosDateTimeToFileTime';
- function CoFileTimeNow(_para1:PFILETIME):HRESULT;stdcall; external 'ole32.dll' name 'CoFileTimeNow';
- function CoRegisterMessageFilter(_para1:IMessageFilter;out _para2:IMessageFilter):HRESULT;stdcall; external 'ole32.dll' name 'CoRegisterMessageFilter';
- function CoGetTreatAsClass(const _para1:TCLSID; _para2:LPCLSID):HRESULT;stdcall; external 'ole32.dll' name 'CoGetTreatAsClass';
- function CoTreatAsClass(const _para1:TCLSID; const _para2:TCLSID):HRESULT;stdcall; external 'ole32.dll' name 'CoTreatAsClass';
-{$endif wince}
-
- type
- LPFNGETCLASSOBJECT = function (const _para1:TCLSID; const _para2:TIID;out _para3):HRESULT;stdcall;
- LPFNCANUNLOADNOW = function:HRESULT;stdcall;
-
-{$ifndef wince}
- function DllGetClassObject(const _para1:TCLSID; const _para2:TIID; out _para3):HRESULT;stdcall; external 'ole32.dll' name 'DllGetClassObject';
- function DllCanUnloadNow:HRESULT;stdcall; external 'ole32.dll' name 'DllCanUnloadNow';
-{$endif wince}
- function CoTaskMemAlloc(_para1:ULONG):PVOID;stdcall; external 'ole32.dll' name 'CoTaskMemAlloc';
- function CoTaskMemRealloc(_para1:PVOID; _para2:ULONG):PVOID;stdcall; external 'ole32.dll' name 'CoTaskMemRealloc';
- procedure CoTaskMemFree(_para1:PVOID);stdcall; external 'ole32.dll' name 'CoTaskMemFree';
-
-{$ifndef wince}
- function CreateDataAdviseHolder(_para1:IDataAdviseHolder):HRESULT;stdcall; external 'ole32.dll' name 'CreateDataAdviseHolder';
- function CreateDataCache(_para1:IUnknown; const _para2:TCLSID; const _para3:TIID; out _para4):HRESULT;stdcall; external 'ole32.dll' name 'CreateDataCache';
-{$endif wince}
-
-(* Const before type ignored *)
- function StgCreateDocfile(_para1:POLESTR; _para2:DWORD; _para3:DWORD; out _para4:IStorage):HRESULT;stdcall; external 'ole32.dll' name 'StgCreateDocfile';
- function StgCreateDocfileOnILockBytes(_para1:ILockBytes; _para2:DWORD; _para3:DWORD; out _para4:IStorage):HRESULT;stdcall; external 'ole32.dll' name 'StgCreateDocfileOnILockBytes';
-
-(* Const before type ignored *)
- function StgOpenStorage(_para1:POLESTR; _para2:IStorage; _para3:DWORD; _para4:SNB; _para5:DWORD;
- out _para6:IStorage):HRESULT;stdcall; external 'ole32.dll' name 'StgOpenStorage';
- function StgOpenStorageOnILockBytes(_para1:ILockBytes; _para2:IStorage; _para3:DWORD; _para4:SNB; _para5:DWORD;
- out _para6:IStorage):HRESULT;stdcall; external 'ole32.dll' name 'StgOpenStorageOnILockBytes';
-{$ifndef wince}
- function StgIsStorageFile(_para1:POLESTR):HRESULT;stdcall; external 'ole32.dll' name 'StgIsStorageFile';
- function StgIsStorageILockBytes(_para1:ILockBytes):HRESULT;stdcall; external 'ole32.dll' name 'StgIsStorageILockBytes';
- function StgSetTimes(_para1:POLESTR; _para2:PFILETIME; _para3:PFILETIME; _para4:PFILETIME):HRESULT;stdcall; external 'ole32.dll' name 'StgSetTimes';
- function CoGetObject(pszname:lpwstr; bndop:PBind_Opts; const riid:TIID; out ppv):HRESULT; stdcall; external 'ole32.dll' name 'CoGetObject';
- function BindMoniker(_para1:IMoniker; _para2:DWORD; const _para3:TIID; out _para4):HRESULT;stdcall; external 'ole32.dll' name 'BindMoniker';
- function MkParseDisplayName(_para1:IBindCtx; _para2:POLESTR; out _para3:PULONG; out _para4:IMoniker):HRESULT;stdcall; external 'ole32.dll' name 'MkParseDisplayName';
- function MonikerRelativePathTo(_para1:IMoniker; _para2:IMoniker; out _para3:IMoniker; _para4:BOOL):HRESULT;stdcall; external 'ole32.dll' name 'MonikerRelativePathTo';
- function MonikerCommonPrefixWith(_para1:IMoniker; _para2:IMoniker; _para3:PIMoniker):HRESULT;stdcall; external 'ole32.dll' name 'MonikerCommonPrefixWith';
-{$endif wince}
- function CreateBindCtx(_para1:DWORD;out _para2:IBindCtx):HRESULT;stdcall; external 'ole32.dll' name 'CreateBindCtx';
- function GetClassFile(_para1:POLESTR; out _para2:TCLSID):HRESULT;stdcall; external 'ole32.dll' name 'GetClassFile';
-{$ifndef wince}
- function CreateGenericComposite(_para1:IMoniker; _para2:IMoniker; out _para3:IMoniker):HRESULT;stdcall; external 'ole32.dll' name 'CreateGenericComposite';
- function CreateFileMoniker(_para1:POLESTR; out _para2:IMoniker):HRESULT;stdcall; external 'ole32.dll' name 'CreateFileMoniker';
- function CreateItemMoniker(_para1:POLESTR; _para2:POLESTR;out _para3:IMoniker):HRESULT;stdcall; external 'ole32.dll' name 'CreateItemMoniker';
- function CreateAntiMoniker(_para1:PIMoniker):HRESULT;stdcall; external 'ole32.dll' name 'CreateAntiMoniker';
- function CreatePointerMoniker(_para1:IUnknown; out _para2:IMoniker):HRESULT;stdcall; external 'ole32.dll' name 'CreatePointerMoniker';
- function GetRunningObjectTable(_para1:DWORD; _para2:IRunningObjectTable):HRESULT;stdcall; external 'ole32.dll' name 'GetRunningObjectTable';
- function CoInitializeSecurity(_para1:PSECURITY_DESCRIPTOR; _para2:LONG; _para3:PSOLE_AUTHENTICATION_SERVICE; _para4:pointer; _para5:DWORD;
- _para6:DWORD; _para7:pointer; _para8:DWORD; _para9:pointer):HRESULT;stdcall; external 'ole32.dll' name 'CoInitializeSecurity';
- function CoGetCallContext(const _para1:TIID; _para2:Ppointer):HRESULT;stdcall; external 'ole32.dll' name 'CoGetCallContext';
- function CoQueryProxyBlanket(_para1:IUnknown; _para2:PDWORD; _para3:PDWORD; _para4:POLESTR; _para5:PDWORD;
- _para6:PDWORD; _para7:Pointer; _para8:PDWORD):HRESULT;stdcall; external 'ole32.dll' name 'CoQueryProxyBlanket';
- function CoSetProxyBlanket(_para1:IUnknown; _para2:DWORD; _para3:DWORD; _para4:POLESTR; _para5:DWORD;
- _para6:DWORD; _para7:pointer; _para8:DWORD):HRESULT;stdcall; external 'ole32.dll' name 'CoSetProxyBlanket';
- function CoCopyProxy(_para1:IUnknown; var _para2:IUnknown):HRESULT;stdcall; external 'ole32.dll' name 'CoCopyProxy';
- function CoQueryClientBlanket(_para1:PDWORD; _para2:PDWORD; _para3:POLESTR; _para4:PDWORD; _para5:PDWORD;
- _para6:pointer; _para7:PDWORD):HRESULT;stdcall; external 'ole32.dll' name 'CoQueryClientBlanket';
- function CoImpersonateClient:HRESULT;stdcall; external 'ole32.dll' name 'CoImpersonateClient';
- function CoRevertToSelf:HRESULT;stdcall; external 'ole32.dll' name 'CoRevertToSelf';
- function CoQueryAuthenticationServices(_para1:PDWORD; _para2:PSOLE_AUTHENTICATION_SERVICE):HRESULT;stdcall; external 'ole32.dll' name 'CoQueryAuthenticationServices';
- function CoSwitchCallContext(_para1:IUnknown; var _para2:IUnknown):HRESULT;stdcall; external 'ole32.dll' name 'CoSwitchCallContext';
- function CoGetInstanceFromFile(_para1:PCOSERVERINFO; _para2:PCLSID; _para3:IUnknown; _para4:DWORD; _para5:DWORD;
- _para6:POLESTR; _para7:DWORD; _para8:PMULTI_QI):HRESULT;stdcall; external 'ole32.dll' name 'CoGetInstanceFromFile';
- function CoGetInstanceFromIStorage(_para1:PCOSERVERINFO; _para2:PCLSID; _para3:IUnknown; _para4:DWORD; _para5:IStorage;
- _para6:DWORD; _para7:PMULTI_QI):HRESULT;stdcall; external 'ole32.dll' name 'CoGetInstanceFromIStorage';
-{$endif wince}
-
- type
- TDispID = DISPID;
-
- TDispIDList = array[0..65535] of TDispID;
- PDispIDList = ^TDispIDList;
-
- REFIID = TIID;
- TREFIID = TIID;
-
-{$ifndef wince}
- function SetErrorInfo(dwReserved:ULONG;errinfo:IErrorInfo):HResult;stdcall; external 'ole32.dll' name 'SetErrorInfo';
- function GetErrorInfo(dwReserved:ULONG;out errinfo:IErrorInfo):HResult;stdcall; external 'ole32.dll' name 'GetErrorInfo';
- function CreateErrorInfo(out errinfo:ICreateErrorInfo):HResult;stdcall; external 'ole32.dll' name 'CreateErrorInfo';
-{$endif wince}
-
- const
- oleaut32dll = 'oleaut32.dll';
-
- function SysAllocString(psz: pointer): TBStr; stdcall; external oleaut32dll name 'SysAllocString';
- function SysAllocStringLen(psz: pointer; len:dword): Integer; stdcall; external oleaut32dll name 'SysAllocStringLen';
- procedure SysFreeString(bstr:pointer); stdcall; external oleaut32dll name 'SysFreeString';
- function SysStringLen(bstr:pointer):UINT; stdcall; external oleaut32dll name 'SysStringLen';
- function SysStringByteLen(bstr:pointer):UINT; stdcall; external oleaut32dll name 'SysStringByteLen';
- function SysReAllocString(var bstr:pointer;psz: pointer): Integer; stdcall; external oleaut32dll name 'SysReAllocString';
- function SysReAllocStringLen(var bstr:pointer;psz: pointer; len:dword): Integer; stdcall; external oleaut32dll name 'SysReAllocStringLen';
-
- { Active object registration API }
-{$ifndef wince}
- const
- ACTIVEOBJECT_STRONG = 0;
- ACTIVEOBJECT_WEAK = 1;
-
- function RegisterActiveObject(unk: IUnknown; const clsid: TCLSID; dwFlags: DWORD; out dwRegister: culong): HResult; stdcall; external oleaut32dll name 'RegisterActiveObject';
- function RevokeActiveObject(dwRegister: culong; pvReserved: Pointer) : HResult; stdcall; external oleaut32dll name 'RevokeActiveObject';
- function GetActiveObject(const clsid: TCLSID; pvReserved: Pointer; out unk: IUnknown) : HResult; stdcall; external oleaut32dll name 'GetActiveObject';
-{$endif wince}
-
-function Succeeded(Res: HResult) : Boolean;inline;
-function Failed(Res: HResult) : Boolean;inline;
-function ResultCode(Res: HResult) : Longint;inline;
-function ResultFacility(Res: HResult): Longint;inline;
-function ResultSeverity(Res: HResult): Longint;inline;
-function MakeResult(Severity, Facility, Code: Longint): HResult;inline;
-
-function LoadTypeLib(szfile : lpolestr; var pptlib: ITypelib):HResult; stdcall; external oleaut32dll name 'LoadTypeLib';
-function LoadRegTypeLib(const rguid:TGUID;wVerMajor:ushort;wVerMinor:ushort;_lcid:lcid;out pptlib:ITypeLib):HResult; stdcall; external oleaut32dll name 'LoadRegTypeLib';
-function RegisterTypeLib(const ptrlib :ITypeLib;szfullpath:lpolestr;szhelpdir:lpolestr):HResult; stdcall; external oleaut32dll name 'RegisterTypeLib';
-function CreateTypeLib2(sysk:TSysKind;szfile:lpolestr;out ppctlib:ICreateTypeLib2):HResult; stdcall; external oleaut32dll name 'CreateTypeLib2';
-function DispInvoke(this:pointer;const ptinfo: ITypeInfo;dispidMember:TDISPID;wflags:ushort;pparams:pDISPParams;var pvarresult:OLEVARIANT;pexcepinfo:EXCEPINFO;puArgErr:puint):HRESULT; stdcall; external oleaut32dll name 'CreateTypeLib2';
-{$ifndef wince}
-function LoadTypeLibEx(szfile : lpolestr; regk:tregkind; var pptlib: ITypelib):HResult; stdcall; external oleaut32dll name 'LoadTypeLibEx';
-function QueryPathOfRegTypeLib(const guid:TGUID;wVerMajor:ushort;wVerMinor:ushort;_lcid:lcid;lpbstr:LPolestr):HResult; stdcall; external oleaut32dll name 'QueryPathOfRegTypeLib';
-function UnRegisterTypeLib(const libid:TGUID; wVerMajor:ushort;wVerMinor:ushort;_lcid:lcid;sysk:TSysKind):HResult; stdcall; external oleaut32dll name 'UnRegisterTypeLib';
-function CreateTypeLib(sysk:TSysKind;szfile:lpolestr;out ppctlib:ICreateTypeLib):HResult; stdcall; external oleaut32dll name 'CreateTypeLib';
-
-function DosDateTimeToVariantTime( wDosDate: ushort; wDosTime:ushort;pvtime:pdouble):longint; stdcall; external oleaut32dll name 'DosDateTimeToVariantTime';
-function VariantTimeToDosDateTime( vtime:DOUBLE;pwdosdate:PUSHORT;pwDosTime:PUSHORT):longint; stdcall; external oleaut32dll name 'VariantTimeToDosDateTime';
-{$endif wince}
-
-function SystemTimeToVariantTime(var lpsystemtime:TSystemTime;out pvtime: TOleDate):LONGINT; stdcall; external oleaut32dll name 'SystemTimeToVariantTime';
-function VariantTimeToSystemTime(vtime:TOleDate; out lpsystemtime: TSystemTime):LONGINT; stdcall; external oleaut32dll name 'VariantTimeToSystemTime';
-
-
-{--------------------------------------------------------------------- }
-{ VARTYPE Coercion API }
-{--------------------------------------------------------------------- }
-{ Note: The routines that convert *from* a string are defined
- * to take a OLECHAR* rather than a BSTR because no allocation is
- * required, and this makes the routines a bit more generic.
- * They may of course still be passed a BSTR as the strIn param.
- }
-
-function VarUI1FromI2(sIn:SHORT; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromI2';
-function VarUI1FromI4(lIn:LONG; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromI4';
-function VarUI1FromI8(i64In:LONG64; pbOut:PBYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromI8';
-function VarUI1FromR4(fltIn:Single; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromR4';
-function VarUI1FromR8(dblIn:DOUBLE; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromR8';
-function VarUI1FromCy(cyIn:CY; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromCy';
-function VarUI1FromDate(dateIn:DATE; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromDate';
-function VarUI1FromStr(strIn:pOLECHAR; lcid:LCID; dwFlags:ULONG; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromStr';
-function VarUI1FromDisp(pdispIn:IDispatch; lcid:LCID; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromDisp';
-function VarUI1FromBool(boolIn:VARIANT_BOOL; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromBool';
-function VarUI1FromI1(cIn:CHAR; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromI1';
-function VarUI1FromUI2(uiIn:USHORT; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromUI2';
-function VarUI1FromUI4(ulIn:ULONG; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromUI4';
-function VarUI1FromUI8(ui64In:ULONG64; pbOut:PBYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromUI8';
-function VarUI1FromDec(var pdecIn:TDecimal; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromDec';
-function VarI2FromUI1(bIn:BYTE; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromUI1';
-function VarI2FromI4(lIn:LONG; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromI4';
-
-function VarI2FromI8(i64In:LONG64; psOut:PSHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromI8';
-function VarI2FromR4(fltIn:Single; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromR4';
-function VarI2FromR8(dblIn:DOUBLE; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromR8';
-function VarI2FromCy(cyIn:CY; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromCy';
-function VarI2FromDate(dateIn:DATE; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromDate';
-function VarI2FromStr(strIn:pOLECHAR; lcid:LCID; dwFlags:ULONG; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromStr';
-function VarI2FromDisp(pdispIn:IDispatch; lcid:LCID; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromDisp';
-function VarI2FromBool(boolIn:VARIANT_BOOL; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromBool';
-function VarI2FromI1(cIn:CHAR; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromI1';
-function VarI2FromUI2(uiIn:USHORT; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromUI2';
-function VarI2FromUI4(ulIn:ULONG; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromUI4';
-
-function VarI2FromUI8(ui64In:ULONG64; psOut:PSHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromUI8';
-function VarI2FromDec(var pdecIn:TDecimal; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromDec';
-function VarI4FromUI1(bIn:BYTE; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromUI1';
-function VarI4FromI2(sIn:SHORT; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromI2';
-
-function VarI4FromI8(i64In:LONG64; plOut:PLONG):HResult;stdcall;external oleaut32dll name 'VarI4FromI8';
-function VarI4FromR4(fltIn:Single; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromR4';
-function VarI4FromR8(dblIn:DOUBLE; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromR8';
-function VarI4FromCy(cyIn:CY; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromCy';
-function VarI4FromDate(dateIn:DATE; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromDate';
-function VarI4FromStr(strIn:pOLECHAR; lcid:LCID; dwFlags:ULONG; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromStr';
-function VarI4FromDisp(dispIn:IDispatch; lcid:LCID; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromDisp';
-function VarI4FromBool(boolIn:VARIANT_BOOL; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromBool';
-function VarI4FromI1(cIn:CHAR; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromI1';
-function VarI4FromUI2(uiIn:USHORT; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromUI2';
-function VarI4FromUI4(ulIn:ULONG; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromUI4';
-
-function VarI4FromUI8(ui64In:ULONG64; plOut:PLONG):HResult;stdcall;external oleaut32dll name 'VarI4FromUI8';
-function VarI4FromDec(var pdecIn:TDecimal; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromDec';
-function VarI4FromInt(intIn:cint; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromInt';
-
-function VarI8FromUI1(bIn:BYTE; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromUI1';
-function VarI8FromI2(sIn:SHORT; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromI2';
-function VarI8FromI4(lIn:LONG; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromI4';
-function VarI8FromR4(fltIn:Single; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromR4';
-function VarI8FromR8(dblIn:DOUBLE; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromR8';
-function VarI8FromCy(cyIn:CY; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromCy';
-function VarI8FromDate(dateIn:DATE; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromDate';
-function VarI8FromStr(strIn:POLECHAR; lcid:LCID; dwFlags:dword; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromStr';
-function VarI8FromDisp(pdispIn:IDispatch; lcid:LCID; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromDisp';
-function VarI8FromBool(boolIn:VARIANT_BOOL; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromBool';
-function VarI8FromI1(cIn:CHAR; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromI1';
-
-function VarI8FromUI2(uiIn:USHORT; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromUI2';
-function VarI8FromUI4(ulIn:ULONG; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromUI4';
-function VarI8FromUI8(ui64In:ULONG64; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromUI8';
-function VarI8FromDec(var pdecIn:TDecimal; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromDec';
-function VarI8FromInt(intIn:cint; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromInt';
-
-{******************* }
-function VarR4FromUI1(bIn:BYTE; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromUI1';
-function VarR4FromI2(sIn:SHORT; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromI2';
-function VarR4FromI4(lIn:LONG; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromI4';
-
-function VarR4FromI8(i64In:LONG64; pfltOut:PSingle):HResult;stdcall;external oleaut32dll name 'VarR4FromI8';
-function VarR4FromR8(dblIn:DOUBLE; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromR8';
-function VarR4FromCy(cyIn:CY; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromCy';
-function VarR4FromDate(dateIn:DATE; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromDate';
-function VarR4FromStr(strIn:pOLECHAR; lcid:LCID; dwFlags:ULONG; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromStr';
-function VarR4FromDisp(pdispIn:IDispatch; lcid:LCID; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromDisp';
-function VarR4FromBool(boolIn:VARIANT_BOOL; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromBool';
-function VarR4FromI1(cIn:CHAR; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromI1';
-function VarR4FromUI2(uiIn:USHORT; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromUI2';
-function VarR4FromUI4(ulIn:ULONG; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromUI4';
-
-function VarR4FromUI8(ui64In:ULONG64; pfltOut:PSingle):HResult;stdcall;external oleaut32dll name 'VarR4FromUI8';
-function VarR4FromDec(var pdecIn:TDecimal; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromDec';
-function VarR8FromUI1(bIn:BYTE; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromUI1';
-function VarR8FromI2(sIn:SHORT; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromI2';
-function VarR8FromI4(lIn:LONG; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromI4';
-
-function VarR8FromI8(i64In:LONG64; pdblOut:PDOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromI8';
-function VarR8FromR4(fltIn:Single; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromR4';
-function VarR8FromCy(cyIn:CY; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromCy';
-function VarR8FromDate(dateIn:DATE; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromDate';
-function VarR8FromStr(strIn:pOLECHAR; lcid:LCID; dwFlags:ULONG; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromStr';
-function VarR8FromDisp(pdispIn:IDispatch; lcid:LCID; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromDisp';
-function VarR8FromBool(boolIn:VARIANT_BOOL; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromBool';
-function VarR8FromI1(cIn:CHAR; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromI1';
-function VarR8FromUI2(uiIn:USHORT; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromUI2';
-function VarR8FromUI4(ulIn:ULONG; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromUI4';
-
-function VarR8FromUI8(ui64In:ULONG64; pdblOut:PDOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromUI8';
-function VarR8FromDec(var pdecIn:TDecimal; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromDec';
-function VarDateFromUI1(bIn:BYTE; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromUI1';
-function VarDateFromI2(sIn:SHORT; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromI2';
-function VarDateFromI4(lIn:LONG; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromI4';
-
-function VarDateFromI8(i64In:LONG64; pdateOut:PDATE):HResult;stdcall;external oleaut32dll name 'VarDateFromI8';
-function VarDateFromR4(fltIn:Single; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromR4';
-function VarDateFromR8(dblIn:DOUBLE; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromR8';
-function VarDateFromCy(cyIn:CY; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromCy';
-function VarDateFromStr(strIn:pOLECHAR; lcid:LCID; dwFlags:ULONG; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromStr';
-
-function VarDateFromDisp(pdispIn:IDispatch; lcid:LCID; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromDisp';
-function VarDateFromBool(boolIn:VARIANT_BOOL; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromBool';
-function VarDateFromI1(cIn:CHAR; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromI1';
-function VarDateFromUI2(uiIn:USHORT; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromUI2';
-function VarDateFromUI4(ulIn:ULONG; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromUI4';
-
-function VarDateFromUI8(ui64In:ULONG64; pdateOut:PDATE):HResult;stdcall;external oleaut32dll name 'VarDateFromUI8';
-function VarDateFromDec(var pdecIn:TDecimal; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromDec';
-function VarCyFromUI1(bIn:BYTE; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromUI1';
-function VarCyFromI2(sIn:SHORT; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromI2';
-function VarCyFromI4(lIn:LONG; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromI4';
-
-function VarCyFromI8(i64In:LONG64; pcyOut:PCurrency):HResult;stdcall;external oleaut32dll name 'VarCyFromI8';
-function VarCyFromR4(fltIn:Single; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromR4';
-function VarCyFromR8(dblIn:DOUBLE; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromR8';
-function VarCyFromDate(dateIn:DATE; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromDate';
-function VarCyFromStr(strIn:pOLECHAR; lcid:LCID; dwFlags:ULONG; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromStr';
-function VarCyFromDisp(pdispIn:IDispatch; lcid:LCID; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromDisp';
-function VarCyFromBool(boolIn:VARIANT_BOOL; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromBool';
-function VarCyFromI1(cIn:CHAR; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromI1';
-function VarCyFromUI2(uiIn:USHORT; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromUI2';
-function VarCyFromUI4(ulIn:ULONG; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromUI4';
-
-function VarCyFromUI8(ui64In:ULONG64; pcyOut:PCurrency):HResult;stdcall;external oleaut32dll name 'VarCyFromUI8';
-function VarCyFromDec(var pdecIn:TDecimal; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromDec';
-function VarBstrFromUI1(bVal:BYTE; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromUI1';
-function VarBstrFromI2(iVal:SHORT; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromI2';
-function VarBstrFromI4(lIn:LONG; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromI4';
-
-function VarBstrFromI8(i64In:LONG64; lcid:LCID; dwFlags:dword; pbstrOut:PBSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromI8';
-function VarBstrFromR4(fltIn:Single; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromR4';
-function VarBstrFromR8(dblIn:DOUBLE; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromR8';
-function VarBstrFromCy(cyIn:CY; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromCy';
-function VarBstrFromDate(dateIn:DATE; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromDate';
-function VarBstrFromDisp(pdispIn:IDispatch; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromDisp';
-function VarBstrFromBool(boolIn:VARIANT_BOOL; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromBool';
-function VarBstrFromI1(cIn:CHAR; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromI1';
-function VarBstrFromUI2(uiIn:USHORT; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromUI2';
-function VarBstrFromUI4(ulIn:ULONG; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromUI4';
-
-function VarBstrFromUI8(ui64In:ULONG64; lcid:LCID; dwFlags:dword; pbstrOut:PBSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromUI8';
-function VarBstrFromDec(var pdecIn:TDecimal; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromDec';
-function VarBoolFromUI1(bIn:BYTE; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromUI1';
-function VarBoolFromI2(sIn:SHORT; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromI2';
-function VarBoolFromI4(lIn:LONG; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromI4';
-
-function VarBoolFromI8(i64In:LONG64; pboolOut:PVARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromI8';
-function VarBoolFromR4(fltIn:Single; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromR4';
-function VarBoolFromR8(dblIn:DOUBLE; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromR8';
-function VarBoolFromDate(dateIn:DATE; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromDate';
-function VarBoolFromCy(cyIn:CY; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromCy';
-function VarBoolFromStr(strIn:pOLECHAR; lcid:LCID; dwFlags:ULONG; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromStr';
-function VarBoolFromDisp(pdispIn:IDispatch; lcid:LCID; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromDisp';
-function VarBoolFromI1(cIn:CHAR; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromI1';
-function VarBoolFromUI2(uiIn:USHORT; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromUI2';
-function VarBoolFromUI4(ulIn:ULONG; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromUI4';
-
-function VarBoolFromUI8(i64In:ULONG64; pboolOut:PVARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromUI8';
-function VarBoolFromDec(var pdecIn:TDecimal; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromDec';
-function VarI1FromUI1(bIn:BYTE; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromUI1';
-function VarI1FromI2(uiIn:SHORT; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromI2';
-function VarI1FromI4(lIn:LONG; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromI4';
-function VarI1FromI8(i64In:LONG64; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromI8';
-function VarI1FromR4(fltIn:Single; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromR4';
-function VarI1FromR8(dblIn:DOUBLE; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromR8';
-function VarI1FromDate(dateIn:DATE; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromDate';
-function VarI1FromCy(cyIn:CY; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromCy';
-function VarI1FromStr(strIn:pOLECHAR; lcid:LCID; dwFlags:ULONG; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromStr';
-function VarI1FromDisp(pdispIn:IDispatch; lcid:LCID; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromDisp';
-function VarI1FromBool(boolIn:VARIANT_BOOL; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromBool';
-function VarI1FromUI2(uiIn:USHORT; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromUI2';
-function VarI1FromUI4(ulIn:ULONG; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromUI4';
-function VarI1FromUI8(i64In:ULONG64; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromUI8';
-function VarI1FromDec(var pdecIn:TDecimal; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromDec';
-function VarUI2FromUI1(bIn:BYTE; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromUI1';
-function VarUI2FromI2(uiIn:SHORT; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromI2';
-function VarUI2FromI4(lIn:LONG; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromI4';
-
-function VarUI2FromI8(i64In:LONG64; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromI8';
-function VarUI2FromR4(fltIn:Single; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromR4';
-function VarUI2FromR8(dblIn:DOUBLE; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromR8';
-function VarUI2FromDate(dateIn:DATE; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromDate';
-function VarUI2FromCy(cyIn:CY; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromCy';
-function VarUI2FromStr(strIn:pOLECHAR; lcid:LCID; dwFlags:ULONG; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromStr';
-function VarUI2FromDisp(pdispIn:IDispatch; lcid:LCID; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromDisp';
-function VarUI2FromBool(boolIn:VARIANT_BOOL; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromBool';
-function VarUI2FromI1(cIn:CHAR; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromI1';
-function VarUI2FromUI4(ulIn:ULONG; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromUI4';
-function VarUI2FromUI8(i64In:ULONG64; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromUI8';
-function VarUI2FromDec(var pdecIn:TDecimal; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromDec';
-function VarUI4FromUI1(bIn:BYTE; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromUI1';
-function VarUI4FromI2(uiIn:SHORT; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromI2';
-function VarUI4FromI4(lIn:LONG; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromI4';
-function VarUI4FromI8(i64In:LONG64; var plOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromI8';
-function VarUI4FromR4(fltIn:Single; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromR4';
-function VarUI4FromR8(dblIn:DOUBLE; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromR8';
-function VarUI4FromDate(dateIn:DATE; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromDate';
-function VarUI4FromCy(cyIn:CY; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromCy';
-function VarUI4FromStr(strIn:pOLECHAR; lcid:LCID; dwFlags:ULONG; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromStr';
-function VarUI4FromDisp(pdispIn:IDispatch; lcid:LCID; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromDisp';
-function VarUI4FromBool(boolIn:VARIANT_BOOL; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromBool';
-function VarUI4FromI1(cIn:CHAR; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromI1';
-function VarUI4FromUI2(uiIn:USHORT; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromUI2';
-function VarUI4FromUI8(ui64In:ULONG64; var plOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromUI8';
-function VarUI4FromDec(var pdecIn:TDecimal; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromDec';
-
-{**************************************** }
-function VarUI8FromUI1(bIn:BYTE; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromUI1';
-function VarUI8FromI2(sIn:SHORT; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromI2';
-function VarUI8FromI4(lIn:LONG; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromI4';
-function VarUI8FromI8(ui64In:LONG64; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromI8';
-function VarUI8FromR4(fltIn:Single; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromR4';
-function VarUI8FromR8(dblIn:DOUBLE; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromR8';
-function VarUI8FromCy(cyIn:CY; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromCy';
-function VarUI8FromDate(dateIn:DATE; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromDate';
-function VarUI8FromStr(strIn:POLECHAR; lcid:LCID; dwFlags:dword; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromStr';
-function VarUI8FromDisp(pdispIn:IDispatch; lcid:LCID; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromDisp';
-function VarUI8FromBool(boolIn:VARIANT_BOOL; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromBool';
-function VarUI8FromI1(cIn:CHAR; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromI1';
-function VarUI8FromUI2(uiIn:USHORT; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromUI2';
-function VarUI8FromUI4(ulIn:ULONG; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromUI4';
-function VarUI8FromDec(var pdecIn:TDecimal; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromDec';
-function VarUI8FromInt(intIn:cint; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromInt';
-
-implementation
-
-function Succeeded(Res: HResult) : Boolean;inline;
- begin
- Result := Res and $80000000 = 0;
- end;
-
-
-function Failed(Res: HResult) : Boolean;inline;
- begin
- Result := Res and $80000000 <> 0;
- end;
-
-
-function ResultCode(Res: HResult) : Longint;inline;
- begin
- Result := Res and $0000FFFF;
- end;
-
-
-function ResultFacility(Res: HResult): Longint;inline;
- begin
- Result := (Res shr 16) and $00001FFF;
- end;
-
-
-function ResultSeverity(Res: HResult): Longint;inline;
- begin
- Result := Res shr 31;
- end;
-
-
-function MakeResult(Severity, Facility, Code: Longint): HResult;inline;
- begin
- Result := (Severity shl 31) or (Facility shl 16) or Code;
- end;
-
-
-end.
diff --git a/plugins/mRadio/commctrl.pp b/plugins/mRadio/commctrl.pp
deleted file mode 100644
index 56c995c210..0000000000
--- a/plugins/mRadio/commctrl.pp
+++ /dev/null
@@ -1,13751 +0,0 @@
-{
- This file is part of the Free Pascal run time library.
- Copyright (c) 1999-2004 by Marco van de Voort
- member of the Free Pascal development team.
-
- See the file COPYING.FPC, included in this distribution,
- for details about the copyright.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Original copyright statement follows.
-
- **************************************************************************
- * *
- * commctrl.h - - Interface for the Windows Common Controls *
- * *
- * Version 1.2 *
- * *
- * Copyright (c) Microsoft Corporation. All rights reserved. *
- * *
- **************************************************************************
-
- Note: This is an initial translation, and probably _full_ of bugs, this
- is because my conversion tool was flawed, and a lot of postediting
- was needed, which is bound to introduce bugs and inconsequencies
-
- This is an huge unit, and its maintenance and compability is not
- a top-priority.
- I prefer patches as bugfix over bugreports, and
- preferably patches with lots of fixes at once.
-
- If you can't make a patch, at least research the bug thoroughly,
- and provide as much info as possible (which windows version,
- the C prototype from the sdk, etc)
-
- Help the FPC team, and try to do as much as possible yourself.
-}
-
-
-Unit CommCtrl;
-Interface
-
-{$Mode ObjFPC}
-Uses Windows,CTypes;
-
-// --------------------
-
-// --------------------
-CONST CommCtrlDLL = 'comctl32.dll';
-
-// Some reasonal defaults.
-// for XP only set NT to $%0501 and IE to $0600
-//
-// The NT conditional is only used for XP/no XP.
-
-{$DEFINE WIN32_IE=$0500}
-{$DEFINE IE3PLUS}
-{$DEFINE IE4PLUS}
-{$define IE5plus}
-{$define WIN32XP}
-{$define win32vista} // till WC_STATICA
-{$define ie501plus}
-{$ifdef win32}
- {$define _win32}
-{$endif win32}
-{$define ie6plus}
-{$define ntddi_vista}
-{$define NTDDI_WIN7}
-
-{$ifdef win64}
- {$define _win32}
-{$endif win64}
-
-{$DEFINE WIN32_WINNT=0} // NO XP
-{.$DEFINE __IStream_INTERFACE_DEFINED__} // lpstream defined in activex afaik.
-
-// Sanity check in source. Not translated:
-//if (WIN32_IE < $0400) && defined(WIN32_WINNT) && (WIN32_WINNT >= $0500)}
-// #error _WIN32_IE setting conflicts with _WIN32_WINNT setting
-
-//
-// Users of this header may define any number of these constants to avoid
-// the definitions of each functional group.
-//
-// NOTOOLBAR Customizable bitmap-button toolbar control.
-// NOUPDOWN Up and Down arrow increment/decrement control.
-// NOSTATUSBAR Status bar control.
-// NOMENUHELP APIs to help manage menus, especially with a status bar.
-// NOTRACKBAR Customizable column-width tracking control.
-// NODRAGLIST APIs to make a listbox source and sink drag&drop actions.
-// NOPROGRESS Progress gas gauge.
-// NOHOTKEY HotKey control
-// NOHEADER Header bar control.
-// NOIMAGEAPIS ImageList apis.
-// NOLISTVIEW ListView control.
-// NOTREEVIEW TreeView control.
-// NOTABCONTROL Tab control.
-// NOANIMATE Animate control.
-// NOBUTTON Button control.
-// NOSTATIC Static control.
-// NOEDIT Edit control.
-// NOLISTBOX Listbox control.
-// NOCOMBOBOX Combobox control.
-// NOSCROLLBAR Scrollbar control.
-//
-//=============================================================================
-// Moved items due to forward defining limitations
-
-Const
- MAX_LINKID_TEXT = 48;
- L_MAX_URL_LENGTH = (2048 + 32 + length('://'));
-Type
- tagLITEM = Record
- mask : UINT;
- iLink : cint;
- state : UINT;
- stateMask : UINT;
- szID : Array [0..MAX_LINKID_TEXT-1] OF WCHAR;
- szUrl : Array [0..L_MAX_URL_LENGTH-1] OF WCHAR;
- END;
- LITEM = tagLITEM;
- PLITEM = ^tagLITEM;
- TLITEM = tagLITEM;
-// PLITEM = ^tagLITEM;
-
-
-
-// include <prsht.h>
-
-Procedure InitCommonControls; stdcall; external commctrldll name 'InitCommonControls';
-
-{$ifdef ie3plus}
-TYPE
-
- tagINITCOMMONCONTROLSEX = Record
- dwSize : DWORD; // size of this structure
- dwICC : DWORD; // flags indicating which classes to be initialized
- END;
- _INITCOMMONCONTROLSEX = tagINITCOMMONCONTROLSEX;
- LPINITCOMMONCONTROLSEX = ^tagINITCOMMONCONTROLSEX;
- TINITCOMMONCONTROLSEX = tagINITCOMMONCONTROLSEX;
- PINITCOMMONCONTROLSEX = ^tagINITCOMMONCONTROLSEX;
-
-CONST
- ICC_LISTVIEW_CLASSES = $00000001; // listview, header
- ICC_TREEVIEW_CLASSES = $00000002; // treeview, tooltips
- ICC_BAR_CLASSES = $00000004; // toolbar, statusbar, trackbar, tooltips
- ICC_TAB_CLASSES = $00000008; // tab, tooltips
- ICC_UPDOWN_CLASS = $00000010; // updown
- ICC_PROGRESS_CLASS = $00000020; // progress
- ICC_HOTKEY_CLASS = $00000040; // hotkey
- ICC_ANIMATE_CLASS = $00000080; // animate
- ICC_WIN95_CLASSES = $000000FF;
- ICC_DATE_CLASSES = $00000100; // month picker, date picker, time picker, updown
- ICC_USEREX_CLASSES = $00000200; // comboex
- ICC_COOL_CLASSES = $00000400; // rebar (coolbar) control
-{$ifdef ie4plus}
- ICC_INTERNET_CLASSES = $00000800;
- ICC_PAGESCROLLER_CLASS = $00001000; // page scroller
- ICC_NATIVEFNTCTL_CLASS = $00002000; // native font control
-{$ENDIF}
-{$ifdef WIN32XP}
- ICC_STANDARD_CLASSES = $00004000;
- ICC_LINK_CLASS = $00008000;
-{$ENDIF}
-
-function InitCommonControlsEx(var rec : TINITCOMMONCONTROLSEX):BOOL; stdcall; external commctrldll name 'InitCommonControlsEx';
-{$ENDIF} // _WIN32_IE >= 0x0300
-
-CONST
- ODT_HEADER = 100;
- ODT_TAB = 101;
- ODT_LISTVIEW = 102;
-
-//====== WM_NOTIFY codes (NMHDR.code values) ==================================
-
-
-CONST
- NM_FIRST = (0- 0); // generic to all controls
- NM_LAST = (0- 99);
-
- LVN_FIRST = (0-100); // listview
- LVN_LAST = (0-199);
-
-// Property sheet reserved (0U-200U) - (0U-299U) - see prsht.h
-
- HDN_FIRST = (0-300); // header
- HDN_LAST = (0-399);
-
- TVN_FIRST = (0-400); // treeview
- TVN_LAST = (0-499);
-
- TTN_FIRST = (0-520); // tooltips
- TTN_LAST = (0-549);
-
- TCN_FIRST = (0-550); // tab control
- TCN_LAST = (0-580);
-
-// Shell reserved (0U-580U) - (0U-589U)
-
- CDN_FIRST = (0-601); // common dialog (new)
- CDN_LAST = (0-699);
-
- TBN_FIRST = (0-700); // toolbar
- TBN_LAST = (0-720);
-
- UDN_FIRST = (0-721); // updown
- UDN_LAST = (0-740);
-{$ifdef ie3plus}
- MCN_FIRST = (0-750); // monthcal
- MCN_LAST = (0-759);
-
- DTN_FIRST = (0-760); // datetimepick
- DTN_LAST = (0-799);
-
- CBEN_FIRST = (0-800); // combo box ex
- CBEN_LAST = (0-830);
-
- RBN_FIRST = (0-831); // rebar
- RBN_LAST = (0-859);
-{$ENDIF}
-
-{$ifdef ie4plus}
- IPN_FIRST = (0-860); // internet address
- IPN_LAST = (0-879); // internet address
-
- SBN_FIRST = (0-880); // status bar
- SBN_LAST = (0-899);
-
- PGN_FIRST = (0-900); // Pager Control
- PGN_LAST = (0-950);
-
-{$ENDIF}
-
-{$ifdef ie5plus}
-{$IFNDEF WMN_FIRST}
- WMN_FIRST = (0-1000);
- WMN_LAST = (0-1200);
-{$ENDIF}
-{$ENDIF}
-
-{$ifdef Win32XP}
- BCN_FIRST = (0-1250);
- BCN_LAST = (0-1350);
-{$ENDIF}
-
-{$ifdef win32vista}
- TRBN_FIRST = cardinal(0-1501); // trackbar
- TRBN_LAST = cardinal(0-1519);
-{$endif}
- MSGF_COMMCTRL_BEGINDRAG = $4200;
- MSGF_COMMCTRL_SIZEHEADER = $4201;
- MSGF_COMMCTRL_DRAGSELECT = $4202;
- MSGF_COMMCTRL_TOOLBARCUST = $4203;
-
-//====== Ranges for control message IDs =======================================
-
- LVM_FIRST = $1000; // ListView messages
- TV_FIRST = $1100; // TreeView messages
- HDM_FIRST = $1200; // Header messages
- TCM_FIRST = $1300; // Tab control messages
-
-{$ifdef ie4plus}
- PGM_FIRST = $1400; // Pager control messages
-{$ifdef win32xp}// actually 0x501=2003 or some sp?
- ECM_FIRST = $1500; // Edit control messages
- BCM_FIRST = $1600; // Button control messages
- CBM_FIRST = $1700; // Combobox control messages
-{$ENDIF}
- CCM_FIRST = $2000; // Common control shared messages
- CCM_LAST = (CCM_FIRST + $200);
-
-
- CCM_SETBKCOLOR = (CCM_FIRST + 1); // lParam is bkColor
-
-TYPE
- tagCOLORSCHEME = Record
- dwSize : DWORD;
- clrBtnHighlight : COLORREF; // highlight color
- clrBtnShadow : COLORREF; // shadow color
- END;
- COLORSCHEME = tagCOLORSCHEME;
- LPCOLORSCHEME = ^tagCOLORSCHEME;
- TCOLORSCHEME = tagCOLORSCHEME;
- PCOLORSCHEME = ^tagCOLORSCHEME;
-
-CONST
- CCM_SETCOLORSCHEME = (CCM_FIRST + 2); // lParam is color scheme
- CCM_GETCOLORSCHEME = (CCM_FIRST + 3); // fills in COLORSCHEME pointed to by lParam
- CCM_GETDROPTARGET = (CCM_FIRST + 4);
- CCM_SETUNICODEFORMAT = (CCM_FIRST + 5);
- CCM_GETUNICODEFORMAT = (CCM_FIRST + 6);
-
-{$ifdef ie5plus}
-{$ifdef win32xp}
- COMCTL32_VERSION = 6;
-{$ELSE}
- COMCTL32_VERSION = 5;
-{$ENDIF}
-
- CCM_SETVERSION = (CCM_FIRST + $7);
- CCM_GETVERSION = (CCM_FIRST + $8);
- CCM_SETNOTIFYWINDOW = (CCM_FIRST + $9); // wParam == hwndParent.
-{$ifdef win32xp}
- CCM_SETWINDOWTHEME = (CCM_FIRST + $b);
- CCM_DPISCALE = (CCM_FIRST + $c); // wParam == Awareness
-{$ENDIF}
-{$ENDIF} // (_WIN32_IE >= 0x0500)
-
-{$ENDIF} // (_WIN32_IE >= 0x0400)
-
-{$ifdef ie4plus}
-// for tooltips
- INFOTIPSIZE = 1024;
-{$ENDIF}
-
-//====== WM_NOTIFY Macros =====================================================
-
-// Macro 8
-Procedure HANDLE_WM_NOTIFY( hwnd : hwnd; wParam : cint;var _lParam : NMHDR ;fn :Pointer);
-
-// Macro 9
-Function FORWARD_WM_NOTIFY( hwnd : hwnd; idFrom : cint;var pnmhdr : NMHDR ; fn :pointer ):LRESULT;
-
-//====== Generic WM_NOTIFY notification codes =================================
-
-
-CONST
- NM_OUTOFMEMORY = (NM_FIRST-1);
- NM_CLICK = (NM_FIRST-2); // uses NMCLICK struct
- NM_DBLCLK = (NM_FIRST-3);
- NM_RETURN = (NM_FIRST-4);
- NM_RCLICK = (NM_FIRST-5); // uses NMCLICK struct
- NM_RDBLCLK = (NM_FIRST-6);
- NM_SETFOCUS = (NM_FIRST-7);
- NM_KILLFOCUS = (NM_FIRST-8);
-{$ifdef ie3plus}
- NM_CUSTOMDRAW = (NM_FIRST-12);
- NM_HOVER = (NM_FIRST-13);
-{$ENDIF}
-{$ifdef ie4plus}
- NM_NCHITTEST = (NM_FIRST-14); // uses NMMOUSE struct
- NM_KEYDOWN = (NM_FIRST-15); // uses NMKEY struct
- NM_RELEASEDCAPTURE = (NM_FIRST-16);
- NM_SETCURSOR = (NM_FIRST-17); // uses NMMOUSE struct
- NM_CHAR = (NM_FIRST-18); // uses NMCHAR struct
-{$ENDIF}
-{$ifdef ie401plus}
- NM_TOOLTIPSCREATED = (NM_FIRST-19); // notify of when the tooltips window is create
-{$ENDIF}
-{$ifdef ie5plus}
- NM_LDOWN = (NM_FIRST-20);
- NM_RDOWN = (NM_FIRST-21);
- NM_THEMECHANGED = (NM_FIRST-22);
-{$ENDIF}
-{$ifdef win32vista}
- NM_FONTCHANGED = (NM_FIRST-23);
- NM_CUSTOMTEXT = (NM_FIRST-24); // uses NMCUSTOMTEXT struct
- NM_TVSTATEIMAGECHANGING = (NM_FIRST-24); // uses NMTVSTATEIMAGECHANGING struct, defined after HTREEITEM
-{$endif}
-
-{$IFNDEF CCSIZEOF_STRUCT}
-
-// Macro 10
-// #define CCSIZEOF_STRUCT(structname, member) (((int)((LPBYTE)(&((structname*)0)->member) - ((LPBYTE)((structname*)0)))) + sizeof(((structname*)0)->member))
-{$ENDIF}
-
-//====== Generic WM_NOTIFY notification structures ============================
-{$ifdef ie401plus}
-
-TYPE
-
- tagNMTOOLTIPSCREATED = Record
- hdr : NMHDR;
- hwndToolTips : HWND;
- END;
- NMTOOLTIPSCREATED = tagNMTOOLTIPSCREATED;
- LPNMTOOLTIPSCREATED = ^tagNMTOOLTIPSCREATED;
- TNMTOOLTIPSCREATED = tagNMTOOLTIPSCREATED;
- PNMTOOLTIPSCREATED = ^tagNMTOOLTIPSCREATED;
-
-{$ENDIF}
-
-{$ifdef ie4plus}
-Type
- tagNMMOUSE = Record
- hdr : NMHDR;
- dwItemSpec : DWORD_PTR;
- dwItemData : DWORD_PTR;
- pt : POINT;
- dwHitInfo : LPARAM; // any specifics about where on the item or control the mouse is
- END;
- NMMOUSE = tagNMMOUSE;
- LPNMMOUSE = ^tagNMMOUSE;
- TNMMOUSE = tagNMMOUSE;
- PNMMOUSE = ^tagNMMOUSE;
-
-
- NMCLICK = NMMOUSE;
- LPNMCLICK = LPNMMOUSE;
-
-// Generic structure to request an object of a specific type.
-
- tagNMOBJECTNOTIFY = Record
- hdr : NMHDR;
- iItem : cint;
-{$IFDEF __IID_DEFINED__}
- piid : PIID;
-{$ELSE}
- piid : Pointer;
-{$ENDIF}
- pObject : Pointer;
- hResult : HRESULT;
- dwFlags : DWORD; // control specific flags (hints as to where in iItem it hit)
- END;
- NMOBJECTNOTIFY = tagNMOBJECTNOTIFY;
- LPNMOBJECTNOTIFY = ^tagNMOBJECTNOTIFY;
- TNMOBJECTNOTIFY = tagNMOBJECTNOTIFY;
- PNMOBJECTNOTIFY = ^tagNMOBJECTNOTIFY;
-
-
-// Generic structure for a key
-
- tagNMKEY = Record
- hdr : NMHDR;
- nVKey : UINT;
- uFlags : UINT;
- END;
- NMKEY = tagNMKEY;
- LPNMKEY = ^tagNMKEY;
- TNMKEY = tagNMKEY;
- PNMKEY = ^tagNMKEY;
-
-
-// Generic structure for a character
-
- tagNMCHAR = Record
- hdr : NMHDR;
- ch : UINT;
- dwItemPrev : DWORD; // Item previously selected
- dwItemNext : DWORD; // Item to be selected
- END;
- NMCHAR = tagNMCHAR;
- LPNMCHAR = ^tagNMCHAR;
- TNMCHAR = tagNMCHAR;
- PNMCHAR = ^tagNMCHAR;
-
-{$ifdef win32vista}
- tagNMCUSTOMTEXT = Record
- hdr : NMHDR;
- hDC : HDC;
- lpString : LPCWSTR;
- nCount : cint;
- lpRect : LPRECT;
- uFormat : UINT;
- fLink : bool;
- end;
-
- NMCUSTOMTEXT = tagNMCUSTOMTEXT;
- LPNMCUSTOMTEXT = ^tagNMCUSTOMTEXT;
- TNMCUSTOMTEXT = tagNMCUSTOMTEXT;
- PNMCUSTOMTEXT = LPNMCUSTOMTEXT;
-{$endif}
-{$ENDIF} // _WIN32_IE >= 0x0400
-
-
-{$ifdef ie3plus}
-//==================== CUSTOM DRAW ==========================================
-
-// custom draw return flags
-// values under 0x00010000 are reserved for global custom draw values.
-// above that are for specific controls
-CONST
- CDRF_DODEFAULT = $00000000;
- CDRF_NEWFONT = $00000002;
- CDRF_SKIPDEFAULT = $00000004;
-
-
- CDRF_NOTIFYPOSTPAINT = $00000010;
- CDRF_NOTIFYITEMDRAW = $00000020;
-{$ifdef ie4plus}
- CDRF_NOTIFYSUBITEMDRAW = $00000020; // flags are the same, we can distinguish by context
-{$ENDIF}
- CDRF_NOTIFYPOSTERASE = $00000040;
- CDRF_NOTIFYITEMERASE = $00000080; // according to lazarus headers. Can't find in sdk 6.0 (Vista sdk)
-
-
-// drawstage flags
-// values under 0x00010000 are reserved for global custom draw values.
-// above that are for specific controls
- CDDS_PREPAINT = $00000001;
- CDDS_POSTPAINT = $00000002;
- CDDS_PREERASE = $00000003;
- CDDS_POSTERASE = $00000004;
-// the 0x000010000 bit means it's individual item specific
- CDDS_ITEM = $00010000;
- CDDS_ITEMPREPAINT = (CDDS_ITEM OR CDDS_PREPAINT);
- CDDS_ITEMPOSTPAINT = (CDDS_ITEM OR CDDS_POSTPAINT);
- CDDS_ITEMPREERASE = (CDDS_ITEM OR CDDS_PREERASE);
- CDDS_ITEMPOSTERASE = (CDDS_ITEM OR CDDS_POSTERASE);
-{$ifdef ie4plus}
- CDDS_SUBITEM = $00020000;
-{$ENDIF}
-
-// itemState flags
- CDIS_SELECTED = $0001;
- CDIS_GRAYED = $0002;
- CDIS_DISABLED = $0004;
- CDIS_CHECKED = $0008;
- CDIS_FOCUS = $0010;
- CDIS_DEFAULT = $0020;
- CDIS_HOT = $0040;
- CDIS_MARKED = $0080;
- CDIS_INDETERMINATE = $0100;
-{$ifdef win32xp}
- CDIS_SHOWKEYBOARDCUES = $0200;
-{$ENDIF}
-{$ifdef win32vista}
- CDIS_NEARHOT = $0400;
- CDIS_OTHERSIDEHOT = $0800;
- CDIS_DROPHILITED = $1000;
-{$endif}
-
-TYPE
-
- tagNMCUSTOMDRAWINFO = Record
- hdr : NMHDR;
- dwDrawStage : DWORD;
- hdc : HDC;
- rc : RECT;
- dwItemSpec : DWORD_PTR; // this is control specific, but it's how to specify an item. valid only with CDDS_ITEM bit set
- uItemState : UINT;
- lItemlParam : LPARAM;
- END;
- NMCUSTOMDRAW = tagNMCUSTOMDRAWINFO;
- LPNMCUSTOMDRAW = ^tagNMCUSTOMDRAWINFO;
- TNMCUSTOMDRAWINFO = tagNMCUSTOMDRAWINFO;
- PNMCUSTOMDRAWINFO = ^tagNMCUSTOMDRAWINFO;
- PNMCustomDraw = PNMCUSTOMDRAWINFO;
- TNMCustomDraw = tagNMCUSTOMDRAWINFO;
-
- tagNMTTCUSTOMDRAW = Record
- nmcd : NMCUSTOMDRAW;
- uDrawFlags : UINT;
- END;
- NMTTCUSTOMDRAW = tagNMTTCUSTOMDRAW;
- LPNMTTCUSTOMDRAW = ^tagNMTTCUSTOMDRAW;
- TNMTTCUSTOMDRAW = tagNMTTCUSTOMDRAW;
- PNMTTCUSTOMDRAW = ^tagNMTTCUSTOMDRAW;
-
-
-{$ENDIF} // _WIN32_IE >= 0x0300
-
-
-//====== IMAGE APIS ===========================================================
-
-{$IFNDEF NOIMAGEAPIS}
-
-
-CONST
- CLR_NONE = DWORD($FFFFFFFF);
- CLR_DEFAULT = DWORD($FF000000);
-
-
-{$IFNDEF IMAGELISTDRAWPARAMS}
-{$ifdef ie3plus}
-TYPE
- _IMAGELISTDRAWPARAMS = Record
- cbSize : DWORD;
- himl : HIMAGELIST;
- i : cint;
- hdcDst : HDC;
- x : cint;
- y : cint;
- cx : cint;
- cy : cint;
- xBitmap : cint; // x offest from the upperleft of bitmap
- yBitmap : cint; // y offset from the upperleft of bitmap
- rgbBk : COLORREF;
- rgbFg : COLORREF;
- fStyle : UINT;
- dwRop : DWORD;
-{$ifdef win32xp}
- fState : DWORD;
- Frame : DWORD;
- crEffect : COLORREF;
-{$ENDIF}
- END;
- tagIMAGELISTDRAWPARAMS = _IMAGELISTDRAWPARAMS;
- IMAGELISTDRAWPARAMS = _IMAGELISTDRAWPARAMS;
- LPIMAGELISTDRAWPARAMS = ^_IMAGELISTDRAWPARAMS;
- TIMAGELISTDRAWPARAMS = _IMAGELISTDRAWPARAMS;
- PIMAGELISTDRAWPARAMS = ^_IMAGELISTDRAWPARAMS;
-
-// #define IMAGELISTDRAWPARAMS_V3_SIZE CCSIZEOF_STRUCT(IMAGELISTDRAWPARAMS, dwRop)
-
-{$ENDIF} // _WIN32_IE >= 0x0300
-{$ENDIF}
-
-
-CONST
- ILC_MASK = $00000001;
- ILC_COLOR = $00000000;
- ILC_COLORDDB = $000000FE;
- ILC_COLOR4 = $00000004;
- ILC_COLOR8 = $00000008;
- ILC_COLOR16 = $00000010;
- ILC_COLOR24 = $00000018;
- ILC_COLOR32 = $00000020;
- ILC_PALETTE = $00000800; // (not implemented)
-{$ifdef win32xp}
- ILC_MIRROR = $00002000; // Mirror the icons contained, if the process is mirrored
- ILC_PERITEMMIRROR = $00008000; // Causes the mirroring code to mirror each item when inserting a set of images, verses the whole strip
-{$ENDIF}
-{$ifdef win32vista}
- ILC_ORIGINALSIZE = $00010000; // Imagelist should accept smaller than set images and apply OriginalSize based on image added
- ILC_HIGHQUALITYSCALE = $00020000; // Imagelist should enable use of the high quality scaler.
-{$endif}
-
-function ImageList_Create(cx:cint;cy:cint;flags:UINT;cInitial:cint;cGrow:cint):HIMAGELIST; stdcall; external commctrldll name 'ImageList_Create';
-function ImageList_Destroy(himl:HIMAGELIST):BOOL; stdcall; external commctrldll name 'ImageList_Destroy';
-
-function ImageList_GetImageCount(himl:HIMAGELIST):cint; stdcall; external commctrldll name 'ImageList_GetImageCount';
-{$ifdef ie3plus}
-function ImageList_SetImageCount(himl:HIMAGELIST;uNewCount:UINT):BOOL; stdcall; external commctrldll name 'ImageList_SetImageCount';
-{$ENDIF}
-
-function ImageList_Add(himl:HIMAGELIST;hbmImage:HBITMAP;hbmMask:HBITMAP):cint; stdcall; external commctrldll name 'ImageList_Add';
-
-function ImageList_ReplaceIcon(himl:HIMAGELIST;i:cint;hicon:HICON):cint; stdcall; external commctrldll name 'ImageList_ReplaceIcon';
-function ImageList_SetBkColor(himl:HIMAGELIST;clrBk:COLORREF):COLORREF; stdcall; external commctrldll name 'ImageList_SetBkColor';
-function ImageList_GetBkColor(himl:HIMAGELIST):COLORREF; stdcall; external commctrldll name 'ImageList_GetBkColor';
-function ImageList_SetOverlayImage(himl:HIMAGELIST;iImage:cint;iOverlay:cint):BOOL; stdcall; external commctrldll name 'ImageList_SetOverlayImage';
-
-// Macro 11
-Function ImageList_AddIcon(Himl:HIMAGELIST;hicon:HICON):cint;
-
-CONST
- ILD_NORMAL = $00000000;
- ILD_TRANSPARENT = $00000001;
- ILD_MASK = $00000010;
- ILD_IMAGE = $00000020;
-{$ifdef ie3plus}
- ILD_ROP = $00000040;
-{$ENDIF}
- ILD_BLEND25 = $00000002;
- ILD_BLEND50 = $00000004;
- ILD_OVERLAYMASK = $00000F00;
-
-// Macro 12
-// #define INDEXTOOVERLAYMASK(i) ((i) << 8)
-
-CONST
- ILD_PRESERVEALPHA = $00001000; // This preserves the alpha channel in dest
- ILD_SCALE = $00002000; // Causes the image to be scaled to cx, cy instead of clipped
- ILD_DPISCALE = $00004000;
-{$ifdef win32vista}
- ILD_ASYNC = $00008000;
-{$endif}
-
- ILD_SELECTED = ILD_BLEND50;
- ILD_FOCUS = ILD_BLEND25;
- ILD_BLEND = ILD_BLEND50;
- CLR_HILIGHT = CLR_DEFAULT;
-
- ILS_NORMAL = $00000000;
- ILS_GLOW = $00000001;
- ILS_SHADOW = $00000002;
- ILS_SATURATE = $00000004;
- ILS_ALPHA = $00000008;
-
-{$ifdef win32vista}
- ILGT_NORMAL = $00000000;
- ILGT_ASYNC = $00000001;
-{$endif}
-
-function ImageList_Draw(himl:HIMAGELIST;i:cint;hdcDst:HDC;x:cint;y:cint;fStyle:UINT):BOOL; stdcall; external commctrldll name 'ImageList_Draw';
-
-
-{$IFDEF _WIN32}
-
-{$ifdef win32vista}
-const
- HBITMAP_CALLBACK =HBITMAP(-1); // only for SparseImageList
-{$endif}
-function ImageList_Replace(himl:HIMAGELIST;i:cint;hbmImage:HBITMAP;hbmMask:HBITMAP):BOOL; stdcall; external commctrldll name 'ImageList_Replace';
-
-function ImageList_AddMasked(himl:HIMAGELIST;hbmImage:HBITMAP;crMask:COLORREF):cint; stdcall; external commctrldll name 'ImageList_AddMasked';
-function ImageList_DrawEx(himl:HIMAGELIST;i:cint;hdcDst:HDC;x:cint;y:cint;dx:cint;dy:cint;rgbBk:COLORREF;rgbFg:COLORREF;fStyle:UINT):BOOL; stdcall; external commctrldll name 'ImageList_DrawEx';
-{$ifdef ie3plus}
-function ImageList_DrawIndirect(pimldp:PIMAGELISTDRAWPARAMS):BOOL; stdcall; external commctrldll name 'ImageList_DrawIndirect';
-{$ENDIF}
-function ImageList_Remove(himl:HIMAGELIST;i:cint):BOOL; stdcall; external commctrldll name 'ImageList_Remove';
-function ImageList_GetIcon(himl:HIMAGELIST;i:cint;flags:UINT):HICON; stdcall; external commctrldll name 'ImageList_GetIcon';
-function ImageList_LoadImageA(hi:HINST;lpbmp:LPCSTR;cx:cint;cGrow:cint;crMask:COLORREF;uType:UINT;uFlags:UINT):HIMAGELIST; stdcall; external commctrldll name 'ImageList_LoadImageA';
-function ImageList_LoadImageW(hi:HINST;lpbmp:LPCWSTR;cx:cint;cGrow:cint;crMask:COLORREF;uType:UINT;uFlags:UINT):HIMAGELIST; stdcall; external commctrldll name 'ImageList_LoadImageW';
-function ImageList_LoadImage(hi:HINST;lpbmp:LPCSTR;cx:cint;cGrow:cint;crMask:COLORREF;uType:UINT;uFlags:UINT):HIMAGELIST; stdcall; external commctrldll name 'ImageList_LoadImageA';
-function ImageList_LoadImage(hi:HINST;lpbmp:LPCWSTR;cx:cint;cGrow:cint;crMask:COLORREF;uType:UINT;uFlags:UINT):HIMAGELIST; stdcall; external commctrldll name 'ImageList_LoadImageW';
-
-{$IFDEF UNICODE}
-// function ImageList_LoadImageW(hi:HINSTANCE;lpbmp:LPCWSTR;cx:cint;cGrow:cint;crMask:COLORREF;uType:UINT;uFlags:UINT):HIMAGELIST; external commctrldll name 'ImageList_LoadImageW';
-{$ELSE}
-// function ImageList_LoadImageA(hi:HINSTANCE;lpbmp:LPCSTR;cx:cint;cGrow:cint;crMask:COLORREF;uType:UINT;uFlags:UINT):HIMAGELIST; external commctrldll name 'ImageList_LoadImageA';
-{$ENDIF}
-
-{$ifdef ie3plus}
-
-CONST
- ILCF_MOVE = ($00000000);
- ILCF_SWAP = ($00000001);
-
-function ImageList_Copy(himlDst:HIMAGELIST;iDst:cint;himlSrc:HIMAGELIST;iSrc:cint;uFlags:UINT):BOOL; stdcall; external commctrldll name 'ImageList_Copy';
-{$ENDIF}
-
-function ImageList_BeginDrag(himlTrack:HIMAGELIST;iTrack:cint;dxHotspot:cint;dyHotspot:cint):BOOL; stdcall; external commctrldll name 'ImageList_BeginDrag';
-function ImageList_EndDrag:BOOL; stdcall; external commctrldll name 'ImageList_EndDrag';
-function ImageList_DragEnter(hwndLock:HWND;x:cint;y:cint):BOOL; stdcall; external commctrldll name 'ImageList_DragEnter';
-function ImageList_DragLeave(hwndLock:HWND):BOOL; stdcall; external commctrldll name 'ImageList_DragLeave';
-function ImageList_DragMove(x:cint;y:cint):BOOL; stdcall; external commctrldll name 'ImageList_DragMove';
-function ImageList_SetDragCursorImage(himlDrag:HIMAGELIST;iDrag:cint;dxHotspot:cint;dyHotspot:cint):BOOL; stdcall; external commctrldll name 'ImageList_SetDragCursorImage';
-
-function ImageList_DragShowNolock(fShow:BOOL):BOOL; stdcall; external commctrldll name 'ImageList_DragShowNolock';
-function ImageList_GetDragImage(ppt:PPOINT;pptHotspot:PPOINT):HIMAGELIST; stdcall; external commctrldll name 'ImageList_GetDragImage';
-
-// Macro 13
-Procedure ImageList_RemoveAll(himl:HIMAGELIST);
-
-// Macro 14
-function ImageList_ExtractIcon(hi:longint; himl:HIMAGELIST;i:longint):HICON;
-
-
-// Macro 15
-Procedure ImageList_LoadBitmap(hi:HInst;bmp:LPCTSTR;cx:cint;cGrow:cint;crMask:COLORREF);
-
-{$IFDEF __IStream_INTERFACE_DEFINED__}
-
-function ImageList_Read(pstm:ISTREAM):HIMAGELIST; stdcall; external commctrldll name 'ImageList_Read';
-function ImageList_Write(himl:HIMAGELIST;pstm:ISTREAM):BOOL; stdcall; external commctrldll name 'ImageList_Write';
-
-{$ifdef Win32XP}
-
-CONST
- ILP_NORMAL = 0; // Writes or reads the stream using new sematics for this version of comctl32
- ILP_DOWNLEVEL = 1; // Write or reads the stream using downlevel sematics.
-
-
-function ImageList_ReadEx(dwFlags:DWORD;pstm:ISTREAM;riid:TIID;ppv:PPointer):HRESULT; stdcall; external commctrldll name 'ImageList_ReadEx';
-function ImageList_WriteEx(himl:HIMAGELIST;dwFlags:DWORD;pstm:ISTREAM):HRESULT; stdcall; external commctrldll name 'ImageList_WriteEx';
-{$ENDIF}
-
-{$ENDIF}
-
-{$IFNDEF IMAGEINFO}
-TYPE
-
- _IMAGEINFO = Record
- hbmImage : HBITMAP;
- hbmMask : HBITMAP;
- Unused1 : cint;
- Unused2 : cint;
- rcImage : RECT;
- END;
- IMAGEINFO = _IMAGEINFO;
- LPIMAGEINFO = ^_IMAGEINFO;
- TIMAGEINFO = _IMAGEINFO;
- PIMAGEINFO = ^_IMAGEINFO;
-
-{$ENDIF}
-
-function ImageList_GetIconSize(himl:HIMAGELIST;cx:Pint;cy:Pint):BOOL; stdcall; external commctrldll name 'ImageList_GetIconSize';
-function ImageList_GetIconSize(himl:HIMAGELIST;var cx:cint;var cy:cint):BOOL; stdcall; external commctrldll name 'ImageList_GetIconSize';
-function ImageList_SetIconSize(himl:HIMAGELIST;cx:cint;cy:cint):BOOL; stdcall; external commctrldll name 'ImageList_SetIconSize';
-function ImageList_GetImageInfo(himl:HIMAGELIST;i:cint;pImageInfo:PIMAGEINFO):BOOL; stdcall; external commctrldll name 'ImageList_GetImageInfo';
-function ImageList_GetImageInfo(himl:HIMAGELIST;i:cint;var pImageInfo:_IMAGEINFO):BOOL; stdcall; external commctrldll name 'ImageList_GetImageInfo';
-function ImageList_Merge(himl1:HIMAGELIST;i1:cint;himl2:HIMAGELIST;i2:cint;dx:cint;dy:cint):HIMAGELIST; stdcall; external commctrldll name 'ImageList_Merge';
-{$ifdef ie4plus}
-function ImageList_Duplicate(himl:HIMAGELIST):HIMAGELIST; stdcall; external commctrldll name 'ImageList_Duplicate';
-{$ENDIF}
-
-
-{$ENDIF}
-
-
-{$ENDIF}
-
-
-//====== HEADER CONTROL =======================================================
-
-{$IFNDEF NOHEADER}
-
-{$IFDEF _WIN32}
-
-CONST
- WC_HEADERA = 'SysHeader32';
- WC_HEADERW = {L}'SysHeader32';
-{$IFDEF UNICODE}
- WC_HEADER = WC_HEADERW;
-{$ELSE}
- WC_HEADER = WC_HEADERA;
-{$ENDIF}
-
-{$ELSE}
-
-CONST
- WC_HEADER = 'SysHeader';
-{$ENDIF}
-
-CONST
-
-// begin_r_commctrl
-
- HDS_HORZ = $0000;
- HDS_BUTTONS = $0002;
-{$ifdef ie3plus}
- HDS_HOTTRACK = $0004;
-{$ENDIF}
- HDS_HIDDEN = $0008;
-
-{$ifdef ie3plus}
- HDS_DRAGDROP = $0040;
- HDS_FULLDRAG = $0080;
-{$ENDIF}
-{$ifdef ie5plus}
- HDS_FILTERBAR = $0100;
-{$ENDIF}
-
-{$ifdef win32xp}
- HDS_FLAT = $0200;
-{$ENDIF}
-{$ifdef win32vista}
- HDS_CHECKBOXES = $0400;
- HDS_NOSIZING = $0800;
- HDS_OVERFLOW = $1000;
-{$endif}
-// end_r_commctrl
-
-{$ifdef ie5plus}
-
- HDFT_ISSTRING = $0000; // HD_ITEM.pvFilter points to a HD_TEXTFILTER
- HDFT_ISNUMBER = $0001; // HD_ITEM.pvFilter points to a INT
-
- HDFT_HASNOVALUE = $8000; // clear the filter, by setting this bit
-
-TYPE
-
-
- _HD_TEXTFILTERA = Record
- pszText : LPSTR; // [in] pointer to the buffer containing the filter (ANSI)
- cchTextMax : cint; // [in] max size of buffer/edit control buffer
- END;
- HD_TEXTFILTERA = _HD_TEXTFILTERA;
- LPHD_TEXTFILTERA = ^_HD_TEXTFILTERA;
- THD_TEXTFILTERA = _HD_TEXTFILTERA;
- PHD_TEXTFILTERA = ^_HD_TEXTFILTERA;
-
-
- _HD_TEXTFILTERW = Record
- pszText : LPWSTR; // [in] pointer to the buffer contiaining the filter (UNICODE)
- cchTextMax : cint; // [in] max size of buffer/edit control buffer
- END;
- HD_TEXTFILTERW = _HD_TEXTFILTERW;
- LPHD_TEXTFILTERW = ^_HD_TEXTFILTERW;
- THD_TEXTFILTERW = _HD_TEXTFILTERW;
- PHD_TEXTFILTERW = ^_HD_TEXTFILTERW;
-
-{$IFDEF UNICODE}
- HD_TEXTFILTER = HD_TEXTFILTERW;
- HDTEXTFILTER = HD_TEXTFILTERW;
- LPHD_TEXTFILTER = LPHD_TEXTFILTERW;
- LPHDTEXTFILTER = LPHD_TEXTFILTERW;
-{$ELSE}
- HD_TEXTFILTER = HD_TEXTFILTERA;
- HDTEXTFILTER = HD_TEXTFILTERA;
- LPHD_TEXTFILTER = LPHD_TEXTFILTERA;
- LPHDTEXTFILTER = LPHD_TEXTFILTERA;
-{$ENDIF}
-
-
-{$ENDIF} // _WIN32_IE >= 0x0500
-
-TYPE
-
-
- _HD_ITEMA = Record
- mask : UINT;
- cxy : cint;
- pszText : LPSTR;
- hbm : HBITMAP;
- cchTextMax : cint;
- fmt : cint;
- lParam : LPARAM;
-{$ifdef ie3plus}
- iImage : cint; // index of bitmap in ImageList
- iOrder : cint; // where to draw this item
-{$ENDIF}
-{$ifdef ie5plus}
- _type : UINT; // [in] filter type (defined what pvFilter is a pointer to)
- pvFilter : Pointer; // [in] fillter data see above
-{$ENDIF}
-{$ifdef win32vista}
- state : UINT;
-{$endif}
- END;
- HDITEMA = _HD_ITEMA;
- pHDITEMA = ^_HD_ITEMA;
-
- LPHDITEMA = ^_HD_ITEMA;
- THD_ITEMA = _HD_ITEMA;
- PHD_ITEMA = ^_HD_ITEMA;
- THDItem = THD_ITEMA;
- PHDItem = PHD_ITEMA;
-
-
-// #define HDITEMA_V1_SIZE CCSIZEOF_STRUCT(HDITEMA, lParam)
-// #define HDITEMW_V1_SIZE CCSIZEOF_STRUCT(HDITEMW, lParam)
-
-
- _HD_ITEMW = Record
- mask : UINT;
- cxy : cint;
- pszText : LPWSTR;
- hbm : HBITMAP;
- cchTextMax : cint;
- fmt : cint;
- lParam : LPARAM;
-{$ifdef ie3plus}
- iImage : cint; // index of bitmap in ImageList
- iOrder : cint;
-{$ENDIF}
-{$ifdef ie5plus}
- _type : UINT; // [in] filter type (defined what pvFilter is a pointer to)
- pvFilter : Pointer; // [in] fillter data see above
-{$ENDIF}
-{$ifdef win32vista}
- state : UINT;
-{$endif}
- END;
- HDITEMW = _HD_ITEMW;
- pHDITEMW = ^_HD_ITEMW;
- LPHDITEMW = ^_HD_ITEMW;
- THD_ITEMW = _HD_ITEMW;
- PHD_ITEMW = ^_HD_ITEMW;
-
-
-TYPE
-{$IFDEF UNICODE}
- HDITEM = HDITEMW;
- LPHDITEM = LPHDITEMW;
-// HDITEM_V1_SIZE = HDITEMW_V1_SIZE;
-{$ELSE}
-
- HDITEM = HDITEMA;
- LPHDITEM = LPHDITEMA;
-// HDITEM_V1_SIZE = HDITEMA_V1_SIZE;
-{$ENDIF}
-
- HD_ITEM = HDITEM;
-
-
-CONST
-
- HDI_WIDTH = $0001;
- HDI_HEIGHT = HDI_WIDTH;
- HDI_TEXT = $0002;
- HDI_FORMAT = $0004;
- HDI_LPARAM = $0008;
- HDI_BITMAP = $0010;
-{$ifdef ie3plus}
- HDI_IMAGE = $0020;
- HDI_DI_SETITEM = $0040;
- HDI_ORDER = $0080;
-{$ENDIF}
-{$ifdef ie5plus}
- HDI_FILTER = $0100;
-{$ENDIF}
-{$ifdef win32vista}
- HDI_STATE = $0200;
-{$endif}
-
- HDF_LEFT = $0000;
- HDF_RIGHT = $0001;
- HDF_CENTER = $0002;
- HDF_JUSTIFYMASK = $0003;
- HDF_RTLREADING = $0004;
-
- HDF_OWNERDRAW = $8000;
- HDF_STRING = $4000;
- HDF_BITMAP = $2000;
-{$ifdef ie3plus}
- HDF_BITMAP_ON_RIGHT = $1000;
- HDF_IMAGE = $0800;
-{$ENDIF}
-
-{$ifdef win32xp}
- HDF_SORTUP = $0400;
- HDF_SORTDOWN = $0200;
-{$ENDIF}
-{$ifdef win32vista}
- HDF_CHECKBOX = $0040;
- HDF_CHECKED = $0080;
- HDF_FIXEDWIDTH = $0100; // Can't resize the column; same as LVCFMT_FIXED_WIDTH
- HDF_SPLITBUTTON = $1000000; // Column is a split button; same as LVCFMT_SPLITBUTTON
-{$endif}
-
-{$ifdef win32vista}
- HDIS_FOCUSED = $00000001;
-{$endif}
-
-
- HDM_GETITEMCOUNT = (HDM_FIRST + 0);
-
-// Macro 16
-Function Header_GetItemCount( hwndHD : hwnd):cint;
-
-CONST
- HDM_INSERTITEMA = (HDM_FIRST + 1);
- HDM_INSERTITEMW = (HDM_FIRST + 10);
-
-{$IFDEF UNICODE}
- HDM_INSERTITEM = HDM_INSERTITEMW;
-{$ELSE}
- HDM_INSERTITEM = HDM_INSERTITEMA;
-{$ENDIF}
-
-// Macro 17
-Function Header_InsertItem( hwndHD : hwnd; i : cint;const phdi : HD_ITEM ):cint;
-
-
-CONST
- HDM_DELETEITEM = (HDM_FIRST + 2);
-
-// Macro 18
-Function Header_DeleteItem( hwndHD : hwnd; i : cint):BOOL;
-
-CONST
- HDM_GETITEMA = (HDM_FIRST + 3);
- HDM_GETITEMW = (HDM_FIRST + 11);
-
-{$IFDEF UNICODE}
- HDM_GETITEM = HDM_GETITEMW;
-{$ELSE}
- HDM_GETITEM = HDM_GETITEMA;
-{$ENDIF}
-
-// Macro 19
-Function Header_GetItem( hwndHD : hwnd; i : cint;var phdi : HD_ITEM ):BOOL;
-
-CONST
- HDM_SETITEMA = (HDM_FIRST + 4);
- HDM_SETITEMW = (HDM_FIRST + 12);
-
-{$IFDEF UNICODE}
- HDM_SETITEM = HDM_SETITEMW;
-{$ELSE}
- HDM_SETITEM = HDM_SETITEMA;
-{$ENDIF}
-
-// Macro 20
-Function Header_SetItem( hwndHD : hwnd; i : cint;const phdi : HD_ITEM ):BOOL;
-
-TYPE
-
- _HD_LAYOUT = Record
- prc : PRECT;
- pwpos : PWINDOWPOS;
- END;
- HDLAYOUT = _HD_LAYOUT;
- LPHDLAYOUT = ^_HD_LAYOUT;
- THD_LAYOUT = _HD_LAYOUT;
- PHD_LAYOUT = ^_HD_LAYOUT;
-
-CONST
- HDM_LAYOUT = (HDM_FIRST + 5);
-
-{$ifdef ie3plus}
-TYPE
- HD_LAYOUT = HDLAYOUT;
-{$ELSE}
-// HDLAYOUT = HD_LAYOUT;
-{$ENDIF}
-
-
-// Macro 21
-Function Header_Layout( hwndHD : hwnd;var playout : HD_LAYOUT ):BOOL;
-
-CONST
- HHT_NOWHERE = $0001;
- HHT_ONHEADER = $0002;
- HHT_ONDIVIDER = $0004;
- HHT_ONDIVOPEN = $0008;
-{$ifdef ie5plus}
- HHT_ONFILTER = $0010;
- HHT_ONFILTERBUTTON = $0020;
-{$ENDIF}
- HHT_ABOVE = $0100;
- HHT_BELOW = $0200;
- HHT_TORIGHT = $0400;
- HHT_TOLEFT = $0800;
-{$ifdef win32vista}
- HHT_ONITEMSTATEICON = $1000;
- HHT_ONDROPDOWN = $2000;
- HHT_ONOVERFLOW = $4000;
-{$endif}
-
-TYPE
- _HD_HITTESTINFO = Record
- case integer of
- 1: (pt : POINT;flags : UINT;iItem : cint);
- { delphi }
- 2: (point : POINT;dummyflags : UINT;Item : cint);
- END;
- HDHITTESTINFO = _HD_HITTESTINFO;
- HD_HITTESTINFO = _HD_HITTESTINFO;
- LPHDHITTESTINFO = ^_HD_HITTESTINFO;
- THD_HITTESTINFO = _HD_HITTESTINFO;
- PHD_HITTESTINFO = ^_HD_HITTESTINFO;
- THDHitTestInfo = THD_HITTESTINFO;
- PHDHitTestInfo = LPHDHITTESTINFO;
-
-
-CONST
- HDM_HITTEST = (HDM_FIRST + 6);
-
-{$ifdef ie3plus}
-
- HDM_GETITEMRECT = (HDM_FIRST + 7);
-
-// Macro 22
-Function Header_GetItemRect( hwnd : hwnd; iItem : WPARAM; lprc : LPARAM):BOOL;
-
-CONST
- HDM_SETIMAGELIST = (HDM_FIRST + 8);
-
-// Macro 23
-Function Header_SetImageList( hwnd : hwnd; himl : LPARAM):HIMAGELIST;
-
-CONST
- HDM_GETIMAGELIST = (HDM_FIRST + 9);
-
-// Macro 24
-Function Header_GetImageList( hwnd : hwnd):HIMAGELIST;
-
-CONST
- HDM_ORDERTOINDEX = (HDM_FIRST + 15);
-
-// Macro 25
-Function Header_OrderToIndex( hwnd : hwnd; i : WPARAM):cint;
-
-CONST
- HDM_CREATEDRAGIMAGE = (HDM_FIRST + 16); // wparam = which item (by index)
-
-// Macro 26
-Function Header_CreateDragImage( hwnd : hwnd; i : WPARAM):HIMAGELIST;
-
-CONST
- HDM_GETORDERARRAY = (HDM_FIRST + 17);
-
-// Macro 27
-Function Header_GetOrderArray( hwnd : hwnd; iCount : WPARAM; lpi : LPARAM):BOOL;
-
-CONST
- HDM_SETORDERARRAY = (HDM_FIRST + 18);
-
-// Macro 28
-Function Header_SetOrderArray( hwnd : hwnd; iCount : WPARAM; lpi : PInteger):BOOL;inline;
-
-// lparam = int array of size HDM_GETITEMCOUNT
-// the array specifies the order that all items should be displayed.
-// e.g. { 2, 0, 1}
-// says the index 2 item should be shown in the 0ths position
-// index 0 should be shown in the 1st position
-// index 1 should be shown in the 2nd position
-
-
-CONST
- HDM_SETHOTDIVIDER = (HDM_FIRST + 19);
-
-// Macro 29
-Function Header_SetHotDivider( hwnd : hwnd; fPos : WPARAM; dw : LPARAM):cint;
-
-// convenience message for external dragdrop
-// wParam = BOOL specifying whether the lParam is a dwPos of the cursor
-// position or the index of which divider to hotlight
-// lParam = depends on wParam (-1 and wParm = FALSE turns off hotlight)
-{$ENDIF} // _WIN32_IE >= 0x0300
-
-{$ifdef ie5plus}
-CONST
- HDM_SETBITMAPMARGIN = (HDM_FIRST + 20);
-
-// Macro 30
-Function Header_SetBitmapMargin( hwnd : hwnd; iWidth : WPARAM):cint;
-
-CONST
- HDM_GETBITMAPMARGIN = (HDM_FIRST + 21);
-
-// Macro 31
-Function Header_GetBitmapMargin( hwnd : hwnd):cint;
-
-{$ENDIF}
-
-
-{$ifdef ie4plus}
-
-CONST
- HDM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT;
-
-// Macro 32
-Function Header_SetUnicodeFormat( hwnd : hwnd; fUnicode : WPARAM):BOOL;
-
-CONST
- HDM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT;
-
-// Macro 33
-Function Header_GetUnicodeFormat( hwnd : hwnd):BOOL;
-
-{$ENDIF}
-
-{$ifdef ie5plus}
-CONST
- HDM_SETFILTERCHANGETIMEOUT = (HDM_FIRST+22);
-
-// Macro 34
-Function Header_SetFilterChangeTimeout( hwnd : hwnd; i : LPARAM):cint;
-
-CONST
- HDM_EDITFILTER = (HDM_FIRST+23);
-
-// Macro 35
-Function Header_EditFilter( hwnd : hwnd; i : WPARAM; fDiscardChanges :cint ):cint;
-
-
-// Clear filter takes -1 as a column value to indicate that all
-// the filter should be cleared. When this happens you will
-// only receive a single filter changed notification.
-
-CONST
- HDM_CLEARFILTER = (HDM_FIRST+24);
-
-// Macro 36
-Function Header_ClearFilter( hwnd : hwnd; i : WPARAM):cint;
-
-// Macro 37
-Function Header_ClearAllFilters( hwnd : hwnd):cint;
-
-{$ENDIF}
-
-{$ifdef win32vista}
-// HDM_TRANSLATEACCELERATOR = CCM_TRANSLATEACCELERATOR; // CCM_* not defined anywhere yet in w7 sdk
-
-const
- HDM_GETITEMDROPDOWNRECT = (HDM_FIRST+25);
- HDM_GETOVERFLOWRECT = (HDM_FIRST+26);
- HDM_GETFOCUSEDITEM = (HDM_FIRST+27);
- HDM_SETFOCUSEDITEM = (HDM_FIRST+28);
-
-// macro 37a through 37d
-function Header_GetItemDropDownRect(hwnd : hwnd;iItem:cint; lprc:lprect):bool;
-function Header_GetOverflowRect( hwnd : hwnd; lprc:lprect):bool;
-function Header_GetFocusedItem (hwnd : hwnd):cint;
-function Header_SetFocusedItem (hwnd:hwnd; iItem:cint):BOOL;
-{$endif}
-
-CONST
- HDN_ITEMCHANGINGA = (HDN_FIRST-0);
- HDN_ITEMCHANGINGW = (HDN_FIRST-20);
- HDN_ITEMCHANGEDA = (HDN_FIRST-1);
- HDN_ITEMCHANGEDW = (HDN_FIRST-21);
- HDN_ITEMCLICKA = (HDN_FIRST-2);
- HDN_ITEMCLICKW = (HDN_FIRST-22);
- HDN_ITEMDBLCLICKA = (HDN_FIRST-3);
- HDN_ITEMDBLCLICKW = (HDN_FIRST-23);
- HDN_DIVIDERDBLCLICKA = (HDN_FIRST-5);
- HDN_DIVIDERDBLCLICKW = (HDN_FIRST-25);
- HDN_BEGINTRACKA = (HDN_FIRST-6);
- HDN_BEGINTRACKW = (HDN_FIRST-26);
- HDN_ENDTRACKA = (HDN_FIRST-7);
- HDN_ENDTRACKW = (HDN_FIRST-27);
- HDN_TRACKA = (HDN_FIRST-8);
- HDN_TRACKW = (HDN_FIRST-28);
-{$ifdef ie3plus}
- HDN_GETDISPINFOA = (HDN_FIRST-9);
- HDN_GETDISPINFOW = (HDN_FIRST-29);
- HDN_BEGINDRAG = (HDN_FIRST-10);
- HDN_ENDDRAG = (HDN_FIRST-11);
-{$ENDIF}
-{$ifdef ie5plus}
- HDN_FILTERCHANGE = (HDN_FIRST-12);
- HDN_FILTERBTNCLICK = (HDN_FIRST-13);
-{$ENDIF}
-{$ifdef win32vista}
- HDN_BEGINFILTEREDIT = (HDN_FIRST-14);
- HDN_ENDFILTEREDIT = (HDN_FIRST-15);
-
- HDN_ITEMSTATEICONCLICK = (HDN_FIRST-16);
- HDN_ITEMKEYDOWN = (HDN_FIRST-17);
- HDN_DROPDOWN = (HDN_FIRST-18);
- HDN_OVERFLOWCLICK = (HDN_FIRST-19);
-{$endif}
-
-{$IFDEF UNICODE}
- HDN_ITEMCHANGING = HDN_ITEMCHANGINGW;
- HDN_ITEMCHANGED = HDN_ITEMCHANGEDW;
- HDN_ITEMCLICK = HDN_ITEMCLICKW;
- HDN_ITEMDBLCLICK = HDN_ITEMDBLCLICKW;
- HDN_DIVIDERDBLCLICK = HDN_DIVIDERDBLCLICKW;
- HDN_BEGINTRACK = HDN_BEGINTRACKW;
- HDN_ENDTRACK = HDN_ENDTRACKW;
- HDN_TRACK = HDN_TRACKW;
-{$ifdef ie3plus}
- HDN_GETDISPINFO = HDN_GETDISPINFOW;
-{$ENDIF}
-{$ELSE}
- HDN_ITEMCHANGING = HDN_ITEMCHANGINGA;
- HDN_ITEMCHANGED = HDN_ITEMCHANGEDA;
- HDN_ITEMCLICK = HDN_ITEMCLICKA;
- HDN_ITEMDBLCLICK = HDN_ITEMDBLCLICKA;
- HDN_DIVIDERDBLCLICK = HDN_DIVIDERDBLCLICKA;
- HDN_BEGINTRACK = HDN_BEGINTRACKA;
- HDN_ENDTRACK = HDN_ENDTRACKA;
- HDN_TRACK = HDN_TRACKA;
-{$ifdef ie3plus}
- HDN_GETDISPINFO = HDN_GETDISPINFOA;
-{$ENDIF}
-{$ENDIF}
-
-TYPE
- tagNMHEADERA = Record
- hdr : NMHDR;
- case integer of
- 1: (iItem : cint;iButton : cint;pitem : PHDITEMA);
- { delphi: }
- 2: (Item : cint;Button : cint);
- END;
- NMHEADERA = tagNMHEADERA;
- LPNMHEADERA = ^tagNMHEADERA;
- TNMHEADERA = tagNMHEADERA;
- PNMHEADERA = ^tagNMHEADERA;
-
- tagNMHEADERW = Record
- hdr : NMHDR;
- iItem : cint;
- iButton : cint;
- pitem : PHDITEMW;
- END;
- NMHEADERW = tagNMHEADERW;
- LPNMHEADERW = ^tagNMHEADERW;
- TNMHEADERW = tagNMHEADERW;
- PNMHEADERW = ^tagNMHEADERW;
-
-
-{$IFDEF UNICODE}
- NMHEADER = NMHEADERW;
- LPNMHEADER = LPNMHEADERW;
-{$ELSE}
- NMHEADER = NMHEADERA;
- LPNMHEADER = LPNMHEADERA;
-{$ENDIF}
-
-
-{$ifdef ie3plus}
- HD_NOTIFYA = NMHEADERA;
- HD_NOTIFYW = NMHEADERW;
-{$ELSE}
-// tagNMHEADERA = _HD_NOTIFY;
-// NMHEADERA = HD_NOTIFYA;
-// tagHMHEADERW = _HD_NOTIFYW;
-// NMHEADERW = HD_NOTIFYW;
-{$ENDIF}
-
- HD_NOTIFY = NMHEADER;
- THDNotify = HD_NOTIFY;
- PHDNotify = ^HD_NOTIFY;
-
- tagNMHDDISPINFOW = Record
- hdr : NMHDR;
- iItem : cint;
- mask : UINT;
- pszText : LPWSTR;
- cchTextMax : cint;
- iImage : cint;
- lParam : LPARAM;
- END;
- NMHDDISPINFOW = tagNMHDDISPINFOW;
- LPNMHDDISPINFOW = ^tagNMHDDISPINFOW;
- TNMHDDISPINFOW = tagNMHDDISPINFOW;
- PNMHDDISPINFOW = ^tagNMHDDISPINFOW;
-
-
- tagNMHDDISPINFOA = Record
- hdr : NMHDR;
- iItem : cint;
- mask : UINT;
- pszText : LPSTR;
- cchTextMax : cint;
- iImage : cint;
- lParam : LPARAM;
- END;
- NMHDDISPINFOA = tagNMHDDISPINFOA;
- LPNMHDDISPINFOA = ^tagNMHDDISPINFOA;
- TNMHDDISPINFOA = tagNMHDDISPINFOA;
- PNMHDDISPINFOA = ^tagNMHDDISPINFOA;
-
-
-
-{$IFDEF UNICODE}
- NMHDDISPINFO = NMHDDISPINFOW;
- LPNMHDDISPINFO = LPNMHDDISPINFOW;
-{$ELSE}
- NMHDDISPINFO = NMHDDISPINFOA;
- LPNMHDDISPINFO = LPNMHDDISPINFOA;
-{$ENDIF}
-
-{$ifdef ie5plus}
- tagNMHDFILTERBTNCLICK = Record
- hdr : NMHDR;
- iItem : cint;
- rc : RECT;
- END;
- NMHDFILTERBTNCLICK = tagNMHDFILTERBTNCLICK;
- LPNMHDFILTERBTNCLICK = ^tagNMHDFILTERBTNCLICK;
- TNMHDFILTERBTNCLICK = tagNMHDFILTERBTNCLICK;
- PNMHDFILTERBTNCLICK = ^tagNMHDFILTERBTNCLICK;
-
-{$ENDIF}
-
-{$ENDIF} // NOHEADER
-
-
-//====== TOOLBAR CONTROL ======================================================
-
-{$IFNDEF NOTOOLBAR}
-
-{$IFDEF _WIN32}
-
-CONST
- TOOLBARCLASSNAMEW = {L}'ToolbarWindow32';
- TOOLBARCLASSNAMEA = 'ToolbarWindow32';
-
-{$IFDEF UNICODE}
- TOOLBARCLASSNAME = TOOLBARCLASSNAMEW;
-{$ELSE}
- TOOLBARCLASSNAME = TOOLBARCLASSNAMEA;
-{$ENDIF}
-
-{$ELSE}
-CONST
- TOOLBARCLASSNAME = 'ToolbarWindow';
-{$ENDIF}
-
-TYPE
-
- _TBBUTTON = Record
- iBitmap : cint;
- idCommand : cint;
- fsState : BYTE;
- fsStyle : BYTE;
-{$IFDEF _WIN64}
- bReserved : ARRAY[0..5] OF BYTE; // padding for alignment
-{$ELSE}
-{$IFDEF _WIN32}
- bReserved : ARRAY[0..1] OF BYTE; // padding for alignment
-{$ENDIF}
-{$ENDIF}
- dwData : DWORD_PTR;
- iString : INT_PTR;
- END;
- TBBUTTON = _TBBUTTON;
- PTBBUTTON = {NEAR} ^_TBBUTTON; // ???
- LPTBBUTTON = ^_TBBUTTON;
- TTBBUTTON = _TBBUTTON;
-// PTBBUTTON = ^_TBBUTTON;
-
- LPCTBBUTTON = {const} ^TBBUTTON;
-
-
- _COLORMAP = Record
- xfrom : COLORREF;
- xto : COLORREF;
- END;
- COLORMAP = _COLORMAP;
- LPCOLORMAP = ^_COLORMAP;
- TCOLORMAP = _COLORMAP;
- PCOLORMAP = ^_COLORMAP;
-
-function CreateToolbarEx(hwnd:HWND;ws:DWORD;wID:UINT;nBitmaps:cint;
- hBMInst:HINST;
- wBMID:UINT_PTR;lpButtons:LPCTBBUTTON;iNumButtons:cint;dxButton:cint;
- dyButton:cint;dxBitmap:cint;dyBitmap:cint;uStructSize:UINT):HWND; stdcall; external commctrldll name 'CreateToolbarEx';
-
-function CreateMappedBitmap(hInstance:HINST;idBitmap:INT_PTR;wFlags:UINT;lpColorMap:LPCOLORMAP;iNumMaps:cint):HBITMAP; stdcall; external commctrldll name 'CreateMappedBitmap';
-
-CONST
- CMB_MASKED = $02;
- TBSTATE_CHECKED = $01;
- TBSTATE_PRESSED = $02;
- TBSTATE_ENABLED = $04;
- TBSTATE_HIDDEN = $08;
- TBSTATE_INDETERMINATE = $10;
- TBSTATE_WRAP = $20;
-{$ifdef ie3plus}
- TBSTATE_ELLIPSES = $40;
-{$ENDIF}
-{$ifdef ie4plus}
- TBSTATE_MARKED = $80;
-{$ENDIF}
-
- TBSTYLE_BUTTON = $0000; // obsolete; use BTNS_BUTTON instead
- TBSTYLE_SEP = $0001; // obsolete; use BTNS_SEP instead
- TBSTYLE_CHECK = $0002; // obsolete; use BTNS_CHECK instead
- TBSTYLE_GROUP = $0004; // obsolete; use BTNS_GROUP instead
- TBSTYLE_CHECKGROUP = (TBSTYLE_GROUP OR TBSTYLE_CHECK);// obsolete; use BTNS_CHECKGROUP instead
-{$ifdef ie3plus}
- TBSTYLE_DROPDOWN = $0008; // obsolete; use BTNS_DROPDOWN instead
-{$ENDIF}
-{$ifdef ie4plus}
- TBSTYLE_AUTOSIZE = $0010; // obsolete; use BTNS_AUTOSIZE instead
- TBSTYLE_NOPREFIX = $0020; // obsolete; use BTNS_NOPREFIX instead
-{$ENDIF}
-
- TBSTYLE_TOOLTIPS = $0100;
- TBSTYLE_WRAPABLE = $0200;
- TBSTYLE_ALTDRAG = $0400;
-{$ifdef ie3plus}
- TBSTYLE_FLAT = $0800;
- TBSTYLE_LIST = $1000;
- TBSTYLE_CUSTOMERASE = $2000;
-{$ENDIF}
-{$ifdef ie4plus}
- TBSTYLE_REGISTERDROP = $4000;
- TBSTYLE_TRANSPARENT = $8000;
- TBSTYLE_EX_DRAWDDARROWS = $00000001;
-{$ENDIF}
-
-{$ifdef ie5plus}
- BTNS_BUTTON = TBSTYLE_BUTTON; // 0x0000
- BTNS_SEP = TBSTYLE_SEP; // 0x0001
- BTNS_CHECK = TBSTYLE_CHECK; // 0x0002
- BTNS_GROUP = TBSTYLE_GROUP; // 0x0004
- BTNS_CHECKGROUP = TBSTYLE_CHECKGROUP; // (TBSTYLE_GROUP | TBSTYLE_CHECK)
- BTNS_DROPDOWN = TBSTYLE_DROPDOWN; // 0x0008
- BTNS_AUTOSIZE = TBSTYLE_AUTOSIZE; // 0x0010; automatically calculate the cx of the button
- BTNS_NOPREFIX = TBSTYLE_NOPREFIX; // 0x0020; this button should not have accel prefix
-{$ifdef ie501plus}
- BTNS_SHOWTEXT = $0040; // ignored unless TBSTYLE_EX_MIXEDBUTTONS is set
-{$ENDIF} // 0x0501
- BTNS_WHOLEDROPDOWN = $0080; // draw drop-down arrow, but without split arrow section
-{$ENDIF}
-
-{$ifdef ie501plus}
- TBSTYLE_EX_MIXEDBUTTONS = $00000008;
- TBSTYLE_EX_HIDECLIPPEDBUTTONS = $00000010; // don't show partially obscured buttons
-{$ENDIF} // 0x0501
-
-
-{$ifdef win32xp}
- TBSTYLE_EX_DOUBLEBUFFER = $00000080; // Double Buffer the toolbar
-{$ENDIF}
-
-{$ifdef ie4plus}
-// Custom Draw Structure
-TYPE
-
- _NMTBCUSTOMDRAW = Record
- nmcd : NMCUSTOMDRAW;
- hbrMonoDither : HBRUSH;
- hbrLines : HBRUSH; // For drawing lines on buttons
- hpenLines : HPEN; // For drawing lines on buttons
- clrText : COLORREF; // Color of text
- clrMark : COLORREF; // Color of text bk when marked. (only if TBSTATE_MARKED)
- clrTextHighlight : COLORREF; // Color of text when highlighted
- clrBtnFace : COLORREF; // Background of the button
- clrBtnHighlight : COLORREF; // 3D highlight
- clrHighlightHotTrack : COLORREF; // In conjunction with fHighlightHotTrack
-
- rcText : RECT; // Rect for text
- nStringBkMode : cint;
- nHLStringBkMode : cint;
-{$ifdef win32xp}
- iListGap : cint;
-{$ENDIF}
- END;
- NMTBCUSTOMDRAW = _NMTBCUSTOMDRAW;
- LPNMTBCUSTOMDRAW = ^_NMTBCUSTOMDRAW;
- TNMTBCUSTOMDRAW = _NMTBCUSTOMDRAW;
- PNMTBCUSTOMDRAW = ^_NMTBCUSTOMDRAW;
-
-
-// Toolbar custom draw return flags
-
-CONST
- TBCDRF_NOEDGES = $00010000; // Don't draw button edges
- TBCDRF_HILITEHOTTRACK = $00020000; // Use color of the button bk when hottracked
- TBCDRF_NOOFFSET = $00040000; // Don't offset button if pressed
- TBCDRF_NOMARK = $00080000; // Don't draw default highlight of image/text for TBSTATE_MARKED
- TBCDRF_NOETCHEDEFFECT = $00100000; // Don't draw etched effect for disabled items
-{$ENDIF}
-
-{$ifdef ie5plus}
- TBCDRF_BLENDICON = $00200000; // Use ILD_BLEND50 on the icon image
- TBCDRF_NOBACKGROUND = $00400000; // Use ILD_BLEND50 on the icon image
-{$ENDIF}
-{$ifdef win32vista}
- TBCDRF_USECDCOLORS = $00800000; // Use CustomDrawColors to RenderText regardless of VisualStyle
-{$endif}
-
-CONST
- TB_ENABLEBUTTON = (WM_USER + 1);
- TB_CHECKBUTTON = (WM_USER + 2);
- TB_PRESSBUTTON = (WM_USER + 3);
- TB_HIDEBUTTON = (WM_USER + 4);
- TB_INDETERMINATE = (WM_USER + 5);
-{$ifdef ie4plus}
- TB_MARKBUTTON = (WM_USER + 6);
-{$ENDIF}
- TB_ISBUTTONENABLED = (WM_USER + 9);
- TB_ISBUTTONCHECKED = (WM_USER + 10);
- TB_ISBUTTONPRESSED = (WM_USER + 11);
- TB_ISBUTTONHIDDEN = (WM_USER + 12);
- TB_ISBUTTONINDETERMINATE = (WM_USER + 13);
-{$ifdef ie4plus}
- TB_ISBUTTONHIGHLIGHTED = (WM_USER + 14);
-{$ENDIF}
- TB_SETSTATE = (WM_USER + 17);
- TB_GETSTATE = (WM_USER + 18);
- TB_ADDBITMAP = (WM_USER + 19);
-
-{$IFDEF _WIN32}
-
-TYPE
-
- tagTBADDBITMAP = Record
- hInst : HINST;
- nID : UINT_PTR;
- END;
- TBADDBITMAP = tagTBADDBITMAP;
- LPTBADDBITMAP = ^tagTBADDBITMAP;
- TTBADDBITMAP = tagTBADDBITMAP;
- PTBADDBITMAP = ^tagTBADDBITMAP;
-
-
-
-CONST
- HINST_COMMCTRL = HINST(-1);
- IDB_STD_SMALL_COLOR = 0;
- IDB_STD_LARGE_COLOR = 1;
- IDB_VIEW_SMALL_COLOR = 4;
- IDB_VIEW_LARGE_COLOR = 5;
-{$ifdef ie3plus}
- IDB_HIST_SMALL_COLOR = 8;
- IDB_HIST_LARGE_COLOR = 9;
-{$ENDIF}
-{$ifdef win32vista}
- IDB_HIST_NORMAL = 12;
- IDB_HIST_HOT = 13;
- IDB_HIST_DISABLED = 14;
- IDB_HIST_PRESSED = 15;
-{$endif}
-
-// icon indexes for standard bitmap
-
- STD_CUT = 0;
- STD_COPY = 1;
- STD_PASTE = 2;
- STD_UNDO = 3;
- STD_REDOW = 4;
- STD_DELETE = 5;
- STD_FILENEW = 6;
- STD_FILEOPEN = 7;
- STD_FILESAVE = 8;
- STD_PRINTPRE = 9;
- STD_PROPERTIES = 10;
- STD_HELP = 11;
- STD_FIND = 12;
- STD_REPLACE = 13;
- STD_PRINT = 14;
-
-// icon indexes for standard view bitmap
-
- VIEW_LARGEICONS = 0;
- VIEW_SMALLICONS = 1;
- VIEW_LIST = 2;
- VIEW_DETAILS = 3;
- VIEW_SORTNAME = 4;
- VIEW_SORTSIZE = 5;
- VIEW_SORTDATE = 6;
- VIEW_SORTTYPE = 7;
- VIEW_PARENTFOLDER = 8;
- VIEW_NETCONNECT = 9;
- VIEW_NETDISCONNECT = 10;
- VIEW_NEWFOLDER = 11;
-{$ifdef ie4plus}
- VIEW_VIEWMENU = 12;
-{$ENDIF}
-
-{$ifdef ie3plus}
- HIST_BACK = 0;
- HIST_FORWARD = 1;
- HIST_FAVORITES = 2;
- HIST_ADDTOFAVORITES = 3;
- HIST_VIEWTREE = 4;
-{$ENDIF}
-
-{$ENDIF}
-
-{$ifdef ie4plus}
- TB_ADDBUTTONSA = (WM_USER + 20);
- TB_INSERTBUTTONA = (WM_USER + 21);
-{$ELSE}
- TB_ADDBUTTONS = (WM_USER + 20);
- TB_INSERTBUTTON = (WM_USER + 21);
-{$ENDIF}
-
- TB_DELETEBUTTON = (WM_USER + 22);
- TB_GETBUTTON = (WM_USER + 23);
- TB_BUTTONCOUNT = (WM_USER + 24);
- TB_COMMANDTOINDEX = (WM_USER + 25);
-
-{$IFDEF _WIN32}
-TYPE
-
- tagTBSAVEPARAMSA = Record
- hkr : HKEY;
- pszSubKey : LPCSTR;
- pszValueName : LPCSTR;
- END;
- TBSAVEPARAMSA = tagTBSAVEPARAMSA;
- LPTBSAVEPARAMSA = ^tagTBSAVEPARAMSA;
- TTBSAVEPARAMSA = tagTBSAVEPARAMSA;
- PTBSAVEPARAMSA = ^tagTBSAVEPARAMSA;
-
-
- tagTBSAVEPARAMSW = Record
- hkr : HKEY;
- pszSubKey : LPCWSTR;
- pszValueName : LPCWSTR;
- END;
- TBSAVEPARAMSW = tagTBSAVEPARAMSW;
- LPTBSAVEPARAMW = ^tagTBSAVEPARAMSW;
- TTBSAVEPARAMSW = tagTBSAVEPARAMSW;
- PTBSAVEPARAMSW = ^tagTBSAVEPARAMSW;
-
-
-{$IFDEF UNICODE}
- TBSAVEPARAMS = TBSAVEPARAMSW;
- LPTBSAVEPARAMS = LPTBSAVEPARAMSW;
-{$ELSE}
- TBSAVEPARAMS = TBSAVEPARAMSA;
- LPTBSAVEPARAMS = LPTBSAVEPARAMSA;
-{$ENDIF}
-
-{$ENDIF} // _WIN32
-
-
-CONST
- TB_SAVERESTOREA = (WM_USER + 26);
- TB_SAVERESTOREW = (WM_USER + 76);
- TB_CUSTOMIZE = (WM_USER + 27);
- TB_ADDSTRINGA = (WM_USER + 28);
- TB_ADDSTRINGW = (WM_USER + 77);
- TB_GETITEMRECT = (WM_USER + 29);
- TB_BUTTONSTRUCTSIZE = (WM_USER + 30);
- TB_SETBUTTONSIZE = (WM_USER + 31);
- TB_SETBITMAPSIZE = (WM_USER + 32);
- TB_AUTOSIZE = (WM_USER + 33);
- TB_GETTOOLTIPS = (WM_USER + 35);
- TB_SETTOOLTIPS = (WM_USER + 36);
- TB_SETPARENT = (WM_USER + 37);
- TB_SETROWS = (WM_USER + 39);
- TB_GETROWS = (WM_USER + 40);
- TB_SETCMDID = (WM_USER + 42);
- TB_CHANGEBITMAP = (WM_USER + 43);
- TB_GETBITMAP = (WM_USER + 44);
- TB_GETBUTTONTEXTA = (WM_USER + 45);
- TB_GETBUTTONTEXTW = (WM_USER + 75);
- TB_REPLACEBITMAP = (WM_USER + 46);
-{$ifdef ie3plus}
- TB_SETINDENT = (WM_USER + 47);
- TB_SETIMAGELIST = (WM_USER + 48);
- TB_GETIMAGELIST = (WM_USER + 49);
- TB_LOADIMAGES = (WM_USER + 50);
- TB_GETRECT = (WM_USER + 51); // wParam is the Cmd instead of index
- TB_SETHOTIMAGELIST = (WM_USER + 52);
- TB_GETHOTIMAGELIST = (WM_USER + 53);
- TB_SETDISABLEDIMAGELIST = (WM_USER + 54);
- TB_GETDISABLEDIMAGELIST = (WM_USER + 55);
- TB_SETSTYLE = (WM_USER + 56);
- TB_GETSTYLE = (WM_USER + 57);
- TB_GETBUTTONSIZE = (WM_USER + 58);
- TB_SETBUTTONWIDTH = (WM_USER + 59);
- TB_SETMAXTEXTROWS = (WM_USER + 60);
- TB_GETTEXTROWS = (WM_USER + 61);
-{$ENDIF} // _WIN32_IE >= 0x0300
-
-CONST
-{$IFDEF UNICODE}
-
- TB_SAVERESTORE = TB_SAVERESTOREW;
- TB_ADDSTRING = TB_ADDSTRINGW;
-{$ELSE}
- TB_GETBUTTONTEXT = TB_GETBUTTONTEXTA;
- TB_SAVERESTORE = TB_SAVERESTOREA;
- TB_ADDSTRING = TB_ADDSTRINGA;
-{$ENDIF}
-{$ifdef ie4plus}
-
-CONST
- TB_GETOBJECT = (WM_USER + 62); // wParam == IID, lParam void **ppv
- TB_GETHOTITEM = (WM_USER + 71);
- TB_SETHOTITEM = (WM_USER + 72); // wParam == iHotItem
- TB_SETANCHORHIGHLIGHT = (WM_USER + 73); // wParam == TRUE/FALSE
- TB_GETANCHORHIGHLIGHT = (WM_USER + 74);
- TB_MAPACCELERATORA = (WM_USER + 78); // wParam == ch, lParam int * pidBtn
-
-TYPE
- TBINSERTMARK = Record
- iButton : cint;
- dwFlags : DWORD;
- END;
- LPTBINSERTMARK = ^TBINSERTMARK;
- TTBINSERTMARK = TBINSERTMARK;
- PTBINSERTMARK = ^TBINSERTMARK;
-
-
-CONST
- TBIMHT_AFTER = $00000001; // TRUE = insert After iButton, otherwise before
- TBIMHT_BACKGROUND = $00000002; // TRUE iff missed buttons completely
-
- TB_GETINSERTMARK = (WM_USER + 79); // lParam == LPTBINSERTMARK
- TB_SETINSERTMARK = (WM_USER + 80); // lParam == LPTBINSERTMARK
- TB_INSERTMARKHITTEST = (WM_USER + 81); // wParam == LPPOINT lParam == LPTBINSERTMARK
- TB_MOVEBUTTON = (WM_USER + 82);
- TB_GETMAXSIZE = (WM_USER + 83); // lParam == LPSIZE
- TB_SETEXTENDEDSTYLE = (WM_USER + 84); // For TBSTYLE_EX_*
- TB_GETEXTENDEDSTYLE = (WM_USER + 85); // For TBSTYLE_EX_*
- TB_GETPADDING = (WM_USER + 86);
- TB_SETPADDING = (WM_USER + 87);
- TB_SETINSERTMARKCOLOR = (WM_USER + 88);
- TB_GETINSERTMARKCOLOR = (WM_USER + 89);
-
- TB_SETCOLORSCHEME = CCM_SETCOLORSCHEME; // lParam is color scheme
- TB_GETCOLORSCHEME = CCM_GETCOLORSCHEME; // fills in COLORSCHEME pointed to by lParam
-
- TB_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT;
- TB_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT;
-
- TB_MAPACCELERATORW = (WM_USER + 90); // wParam == ch, lParam int * pidBtn
-
-CONST
-{$IFDEF UNICODE}
- TB_MAPACCELERATOR = TB_MAPACCELERATORW;
-{$ELSE}
- TB_MAPACCELERATOR = TB_MAPACCELERATORA;
-{$ENDIF}
-
-{$ENDIF} // _WIN32_IE >= 0x0400
-TYPE
- TBREPLACEBITMAP = Record
- hInstOld : HINST;
- nIDOld : UINT_PTR;
- hInstNew : HINST;
- nIDNew : UINT_PTR;
- nButtons : cint;
- END;
- LPTBREPLACEBITMAP = ^TBREPLACEBITMAP;
- TTBREPLACEBITMAP = TBREPLACEBITMAP;
- PTBREPLACEBITMAP = ^TBREPLACEBITMAP;
-
-
-{$IFDEF _WIN32}
-
-CONST
- TBBF_LARGE = $0001;
- TB_GETBITMAPFLAGS = (WM_USER + 41);
-
-{$ifdef ie4plus}
- TBIF_IMAGE = $00000001;
- TBIF_TEXT = $00000002;
- TBIF_STATE = $00000004;
- TBIF_STYLE = $00000008;
- TBIF_LPARAM = $00000010;
- TBIF_COMMAND = $00000020;
- TBIF_SIZE = $00000040;
-
-{$ifdef ie5plus}
- TBIF_BYINDEX = $80000000; // this specifies that the wparam in Get/SetButtonInfo is an index, not id
-{$ENDIF}
-
-TYPE
-
- TBBUTTONINFOA = Record
- cbSize : UINT;
- dwMask : DWORD;
- idCommand : cint;
- iImage : cint;
- fsState : BYTE;
- fsStyle : BYTE;
- cx : WORD;
- lParam : DWORD_PTR;
- pszText : LPSTR;
- cchText : cint;
- END;
- LPTBBUTTONINFOA = ^TBBUTTONINFOA;
- TTBBUTTONINFOA = TBBUTTONINFOA;
- PTBBUTTONINFOA = ^TBBUTTONINFOA;
-
-
- TBBUTTONINFOW = Record
- cbSize : UINT;
- dwMask : DWORD;
- idCommand : cint;
- iImage : cint;
- fsState : BYTE;
- fsStyle : BYTE;
- cx : WORD;
- lParam : DWORD_PTR;
- pszText : LPWSTR;
- cchText : cint;
- END;
- LPTBBUTTONINFOW = ^TBBUTTONINFOW;
- TTBBUTTONINFOW= TBBUTTONINFOW;
- PTBBUTTONINFOW= ^TBBUTTONINFOW;
-
-
-{$IFDEF UNICODE}
- TBBUTTONINFO = TBBUTTONINFOW;
- LPTBBUTTONINFO = LPTBBUTTONINFOW;
-{$ELSE}
- TBBUTTONINFO = TBBUTTONINFOA;
- LPTBBUTTONINFO = LPTBBUTTONINFOA;
-{$ENDIF}
- TTBButtonInfo = TBBUTTONINFO;
- PTBButtonInfo = LPTBBUTTONINFO;
-
-
-// BUTTONINFO APIs do NOT support the string pool.
-
-CONST
- TB_GETBUTTONINFOW = (WM_USER + 63);
- TB_SETBUTTONINFOW = (WM_USER + 64);
- TB_GETBUTTONINFOA = (WM_USER + 65);
- TB_SETBUTTONINFOA = (WM_USER + 66);
-
-{$IFDEF UNICODE}
-CONST
- TB_GETBUTTONINFO = TB_GETBUTTONINFOW;
- TB_SETBUTTONINFO = TB_SETBUTTONINFOW;
-{$ELSE}
-CONST
- TB_GETBUTTONINFO = TB_GETBUTTONINFOA;
- TB_SETBUTTONINFO = TB_SETBUTTONINFOA;
-{$ENDIF}
-
-CONST
- TB_INSERTBUTTONW = (WM_USER + 67);
- TB_ADDBUTTONSW = (WM_USER + 68);
-
- TB_HITTEST = (WM_USER + 69);
-
-// New post Win95/NT4 for InsertButton and AddButton. if iString member
-// is a pointer to a string, it will be handled as a string like listview
-// (although LPSTR_TEXTCALLBACK is not supported).
-
-{$IFDEF UNICODE}
-CONST
- TB_INSERTBUTTON = TB_INSERTBUTTONW;
- TB_ADDBUTTONS = TB_ADDBUTTONSW;
-{$ELSE}
-CONST
- TB_INSERTBUTTON = TB_INSERTBUTTONA;
- TB_ADDBUTTONS = TB_ADDBUTTONSA;
-{$ENDIF}
-
-
-CONST
- TB_SETDRAWTEXTFLAGS = (WM_USER + 70); // wParam == mask lParam == bit values
-
-{$ENDIF} // _WIN32_IE >= 0x0400
-
-{$ifdef ie5plus}
-
- TB_GETSTRINGW = (WM_USER + 91);
- TB_GETSTRINGA = (WM_USER + 92);
-{$IFDEF UNICODE}
-
- TB_GETSTRING = TB_GETSTRINGW;
-{$ELSE}
- TB_GETSTRING = TB_GETSTRINGA;
-{$ENDIF}
-
-
-{$ENDIF} // _WIN32_IE >= 0x0500
-
-{$ifdef win32xp}
-
-CONST
- TBMF_PAD = $00000001;
- TBMF_BARPAD = $00000002;
- TBMF_BUTTONSPACING = $00000004;
-
-TYPE
-
- TBMETRICS = Record
- cbSize : UINT;
- dwMask : DWORD;
- cxPad : cint; // PAD
- cyPad : cint;
- cxBarPad : cint; // BARPAD
- cyBarPad : cint;
- cxButtonSpacing : cint; // BUTTONSPACING
- cyButtonSpacing : cint;
- END;
- LPTBMETRICS = ^TBMETRICS;
- TTBMETRICS = TBMETRICS;
- PTBMETRICS = ^TBMETRICS;
-
-CONST
- TB_GETMETRICS = (WM_USER + 101);
- TB_SETMETRICS = (WM_USER + 102);
-{$ENDIF}
-
-{$ifdef win32vista}
- TB_SETPRESSEDIMAGELIST = (WM_USER + 104);
- TB_GETPRESSEDIMAGELIST = (WM_USER + 105);
-{$endif}
-
-{$ifdef win32xp}
- TB_SETWINDOWTHEME = CCM_SETWINDOWTHEME;
-{$ENDIF}
-
- TBN_GETBUTTONINFOA = (TBN_FIRST-0);
- TBN_BEGINDRAG = (TBN_FIRST-1);
- TBN_ENDDRAG = (TBN_FIRST-2);
- TBN_BEGINADJUST = (TBN_FIRST-3);
- TBN_ENDADJUST = (TBN_FIRST-4);
- TBN_RESET = (TBN_FIRST-5);
- TBN_QUERYINSERT = (TBN_FIRST-6);
- TBN_QUERYDELETE = (TBN_FIRST-7);
- TBN_TOOLBARCHANGE = (TBN_FIRST-8);
- TBN_CUSTHELP = (TBN_FIRST-9);
-{$ifdef ie3plus}
- TBN_DROPDOWN = (TBN_FIRST - 10);
-{$ENDIF}
-{$ifdef ie4plus}
- TBN_GETOBJECT = (TBN_FIRST - 12);
-
-// Structure for TBN_HOTITEMCHANGE notification
-//
-TYPE
-
- tagNMTBHOTITEM = Record
- hdr : NMHDR;
- idOld : cint;
- idNew : cint;
- dwFlags : DWORD; // HICF_*
- END;
- NMTBHOTITEM = tagNMTBHOTITEM;
- LPNMTBHOTITEM = ^tagNMTBHOTITEM;
- TNMTBHOTITEM = tagNMTBHOTITEM;
- PNMTBHOTITEM = ^tagNMTBHOTITEM;
-
-
-// Hot item change flags
-
-CONST
- HICF_OTHER = $00000000;
- HICF_MOUSE = $00000001; // Triggered by mouse
- HICF_ARROWKEYS = $00000002; // Triggered by arrow keys
- HICF_ACCELERATOR = $00000004; // Triggered by accelerator
- HICF_DUPACCEL = $00000008; // This accelerator is not unique
- HICF_ENTERING = $00000010; // idOld is invalid
- HICF_LEAVING = $00000020; // idNew is invalid
- HICF_RESELECT = $00000040; // hot item reselected
- HICF_LMOUSE = $00000080; // left mouse button selected
- HICF_TOGGLEDROPDOWN = $00000100; // Toggle button's dropdown state
-
-
- TBN_HOTITEMCHANGE = (TBN_FIRST - 13);
- TBN_DRAGOUT = (TBN_FIRST - 14); // this is sent when the user clicks down on a button then drags off the button
- TBN_DELETINGBUTTON = (TBN_FIRST - 15); // uses TBNOTIFY
- TBN_GETDISPINFOA = (TBN_FIRST - 16); // This is sent when the toolbar needs some display information
- TBN_GETDISPINFOW = (TBN_FIRST - 17); // This is sent when the toolbar needs some display information
- TBN_GETINFOTIPA = (TBN_FIRST - 18);
- TBN_GETINFOTIPW = (TBN_FIRST - 19);
- TBN_GETBUTTONINFOW = (TBN_FIRST - 20);
-{$ifdef ie5plus}
- TBN_RESTORE = (TBN_FIRST - 21);
- TBN_SAVE = (TBN_FIRST - 22);
- TBN_INITCUSTOMIZE = (TBN_FIRST - 23);
- TBNRF_HIDEHELP = $00000001;
- TBNRF_ENDCUSTOMIZE = $00000002;
-{$ENDIF} // (_WIN32_IE >= 0x0500)
-
-
-
-{$ifdef ie5plus}
-
-TYPE
-
- tagNMTBSAVE = Record
- hdr : NMHDR;
- pData : PDWORD;
- pCurrent : PDWORD;
- cbData : UINT;
- iItem : cint;
- cButtons : cint;
- tbButton : TBBUTTON;
- END;
- NMTBSAVE = tagNMTBSAVE;
- LPNMTBSAVE = ^tagNMTBSAVE;
- TNMTBSAVE = tagNMTBSAVE;
- PNMTBSAVE = ^tagNMTBSAVE;
-
-
- tagNMTBRESTORE = Record
- hdr : NMHDR;
- pData : PDWORD;
- pCurrent : PDWORD;
- cbData : UINT;
- iItem : cint;
- cButtons : cint;
- cbBytesPerRecord : cint;
- tbButton : TBBUTTON;
- END;
- NMTBRESTORE = tagNMTBRESTORE;
- LPNMTBRESTORE = ^tagNMTBRESTORE;
- TNMTBRESTORE = tagNMTBRESTORE;
- PNMTBRESTORE = ^tagNMTBRESTORE;
-
-{$ENDIF} // (_WIN32_IE >= 0x0500)
-
- tagNMTBGETINFOTIPA = Record
- hdr : NMHDR;
- pszText : LPSTR;
- cchTextMax : cint;
- iItem : cint;
- lParam : LPARAM;
- END;
- NMTBGETINFOTIPA = tagNMTBGETINFOTIPA;
- LPNMTBGETINFOTIPA = ^tagNMTBGETINFOTIPA;
- TNMTBGETINFOTIPA = tagNMTBGETINFOTIPA;
- PNMTBGETINFOTIPA = ^tagNMTBGETINFOTIPA;
-
-
- tagNMTBGETINFOTIPW = Record
- hdr : NMHDR;
- pszText : LPWSTR;
- cchTextMax : cint;
- iItem : cint;
- lParam : LPARAM;
- END;
- NMTBGETINFOTIPW = tagNMTBGETINFOTIPW;
- LPNMTBGETINFOTIPW = ^tagNMTBGETINFOTIPW;
- TNMTBGETINFOTIPW = tagNMTBGETINFOTIPW;
- PNMTBGETINFOTIPW = ^tagNMTBGETINFOTIPW;
-
-
-{$IFDEF UNICODE}
-CONST
- TBN_GETINFOTIP = TBN_GETINFOTIPW;
-TYPE
- NMTBGETINFOTIP = NMTBGETINFOTIPW;
- LPNMTBGETINFOTIP = LPNMTBGETINFOTIPW;
-{$ELSE}
-CONST
- TBN_GETINFOTIP = TBN_GETINFOTIPA;
-TYPE
- NMTBGETINFOTIP = NMTBGETINFOTIPA;
- LPNMTBGETINFOTIP = LPNMTBGETINFOTIPA;
-{$ENDIF}
-
-
-CONST
- TBNF_IMAGE = $00000001;
- TBNF_TEXT = $00000002;
- TBNF_DI_SETITEM = $10000000;
-
-TYPE
-
- NMTBDISPINFOA = Record
- hdr : NMHDR;
- dwMask : DWORD; // [in] Specifies the values requested .[out] Client ask the data to be set for future use
- idCommand : cint; // [in] id of button we're requesting info for
- lParam : DWORD_PTR; // [in] lParam of button
- iImage : cint; // [out] image index
- pszText : LPSTR; // [out] new text for item
- cchText : cint; // [in] size of buffer pointed to by pszText
- END;
- LPNMTBDISPINFOA = ^NMTBDISPINFOA;
- TNMTBDISPINFOA = NMTBDISPINFOA;
- PNMTBDISPINFOA = ^NMTBDISPINFOA;
-
-
- NMTBDISPINFOW = Record
- hdr : NMHDR;
- dwMask : DWORD; //[in] Specifies the values requested .[out] Client ask the data to be set for future use
- idCommand : cint; // [in] id of button we're requesting info for
- lParam : DWORD_PTR; // [in] lParam of button
- iImage : cint; // [out] image index
- pszText : LPWSTR; // [out] new text for item
- cchText : cint; // [in] size of buffer pointed to by pszText
- END;
- LPNMTBDISPINFOW = ^NMTBDISPINFOW;
- TNMTBDISPINFOW = NMTBDISPINFOW;
- PNMTBDISPINFOW = ^NMTBDISPINFOW;
-
-{$IFDEF UNICODE}
-CONST
- TBN_GETDISPINFO = TBN_GETDISPINFOW;
-TYPE
- NMTBDISPINFO = NMTBDISPINFOW;
- LPNMTBDISPINFO = LPNMTBDISPINFOW;
-{$ELSE}
-CONST
- TBN_GETDISPINFO = TBN_GETDISPINFOA;
-TYPE
- NMTBDISPINFO = NMTBDISPINFOA;
- LPNMTBDISPINFO = LPNMTBDISPINFOA;
-{$ENDIF}
-
-// Return codes for TBN_DROPDOWN
-
-CONST
- TBDDRET_DEFAULT = 0;
- TBDDRET_NODEFAULT = 1;
- TBDDRET_TREATPRESSED = 2; // Treat as a standard press button
-
-{$ENDIF}
-{$IFDEF UNICODE}
- TBN_GETBUTTONINFO = TBN_GETBUTTONINFOW;
-{$ELSE}
- TBN_GETBUTTONINFO = TBN_GETBUTTONINFOA;
-{$ENDIF}
-TYPE
-
-{$ifdef ie3plus}
- tagNMTOOLBARA = Record
- hdr : NMHDR;
- iItem : cint;
- tbButton : TBBUTTON;
- cchText : cint;
- pszText : LPSTR;
-{$ifdef ie5plus}
- rcButton : RECT;
-{$ENDIF}
- END;
- NMTOOLBARA = tagNMTOOLBARA;
- LPNMTOOLBARA = ^tagNMTOOLBARA;
- LPNMTOOLBAR = LPNMTOOLBARA;
- TNMTOOLBARA = tagNMTOOLBARA;
- PNMTOOLBARA = LPNMTOOLBARA;
-{$ENDIF}
- LPTBNOTIFY = LPNMTOOLBARA;
- TBNOTIFYA = NMTOOLBARA;
-
-
-{$ifdef ie3plus}
- tagNMTOOLBARW = Record
- hdr : NMHDR;
- iItem : cint;
- tbButton : TBBUTTON;
- cchText : cint;
- pszText : LPWSTR;
-{$ifdef ie5plus}
- rcButton : RECT;
-{$ENDIF}
- END;
- NMTOOLBARW = tagNMTOOLBARW;
- LPNMTOOLBARW = ^tagNMTOOLBARW;
- TNMTOOLBARW = tagNMTOOLBARW;
- PNMTOOLBARW = ^tagNMTOOLBARW;
-{$ENDIF}
-
-
-{$ifdef ie3plus}
- TBNOTIFYW = NMTOOLBARW;
- LPTBNOTIFYA = LPNMTOOLBARA;
-{$ELSE}
- tagNMTOOLBARA = tagTBNOTIFYA;
- NMTOOLBARA = TBNOTIFYA;
- LPNMTOOLBARA = LPTBNOTIFYA;
- tagNMTOOLBARW = tagTBNOTIFYW;
- NMTOOLBARW = TBNOTIFYW;
- LPNMTOOLBARW = LPTBNOTIFYW;
-{$ENDIF}
-
-
-{$IFDEF UNICODE}
- NMTOOLBAR = NMTOOLBARW;
- LPNMTOOLBAR = LPNMTOOLBARW;
-{$ELSE}
- NMTOOLBAR = NMTOOLBARA;
- TNMTOOLBAR = NMTOOLBARA;
- PNMTOOLBAR = LPNMTOOLBARA;
-
-{$ENDIF}
-
- TBNOTIFY = NMTOOLBAR;
-{$ENDIF}
-
-{$ENDIF} // NOTOOLBAR
-
- LPTBNOTIFYW = LPNMTOOLBARW;
-
-{$ifdef ie3plus}
-//====== REBAR CONTROL ========================================================
-
-{$IFNDEF NOREBAR}
-
-{$IFDEF _WIN32}
-
-CONST
- REBARCLASSNAMEW = {L}'ReBarWindow32';
- REBARCLASSNAMEA = 'ReBarWindow32';
-
-{$IFDEF UNICODE}
- REBARCLASSNAME = REBARCLASSNAMEW;
-{$ELSE}
- REBARCLASSNAME = REBARCLASSNAMEA;
-{$ENDIF}
-
-{$ELSE}
-
-CONST
- REBARCLASSNAME = 'ReBarWindow';
-{$ENDIF}
-
-CONST
- RBIM_IMAGELIST = $00000001;
-
-// begin_r_commctrl
-
-{$ifdef ie4plus}
- RBS_TOOLTIPS = $0100;
- RBS_VARHEIGHT = $0200;
- RBS_BANDBORDERS = $0400;
- RBS_FIXEDORDER = $0800;
- RBS_REGISTERDROP = $1000;
- RBS_AUTOSIZE = $2000;
- RBS_VERTICALGRIPPER = $4000; // this always has the vertical gripper (default for horizontal mode)
- RBS_DBLCLKTOGGLE = $8000;
-{$ELSE}
- RBS_TOOLTIPS = $00000100;
- RBS_VARHEIGHT = $00000200;
- RBS_BANDBORDERS = $00000400;
- RBS_FIXEDORDER = $00000800;
-{$ENDIF} // _WIN32_IE >= 0x0400
-
-
-// end_r_commctrl
-
-TYPE
-
- tagREBARINFO = Record
- cbSize : UINT;
- fMask : UINT;
-{$IFNDEF NOIMAGEAPIS}
- himl : HIMAGELIST;
-{$ELSE}
- himl : HANDLE;
-{$ENDIF}
- END;
- REBARINFO = tagREBARINFO;
- LPREBARINFO = ^tagREBARINFO;
- TREBARINFO = tagREBARINFO;
- PREBARINFO = ^tagREBARINFO;
-
-
-CONST
- RBBS_BREAK = $00000001; // break to new line
- RBBS_FIXEDSIZE = $00000002; // band can't be sized
- RBBS_CHILDEDGE = $00000004; // edge around top & bottom of child window
- RBBS_HIDDEN = $00000008; // don't show
- RBBS_NOVERT = $00000010; // don't show when vertical
- RBBS_FIXEDBMP = $00000020; // bitmap doesn't move during band resize
-{$ifdef ie4plus }
- RBBS_VARIABLEHEIGHT = $00000040; // allow autosizing of this child vertically
- RBBS_GRIPPERALWAYS = $00000080; // always show the gripper
- RBBS_NOGRIPPER = $00000100; // never show the gripper
-{$ifdef ie5plus}
- RBBS_USECHEVRON = $00000200; // display drop-down button for this band if it's sized smaller than ideal width
-{$ifdef IE501plus}
- RBBS_HIDETITLE = $00000400; // keep band title hidden
- RBBS_TOPALIGN = $00000800; // keep band title hidden
-{$ENDIF} // 0x0501 //
-{$ENDIF} // 0x0500 //
-{$ENDIF} // 0x0400 //
-
- RBBIM_STYLE = $00000001;
- RBBIM_COLORS = $00000002;
- RBBIM_TEXT = $00000004;
- RBBIM_IMAGE = $00000008;
- RBBIM_CHILD = $00000010;
- RBBIM_CHILDSIZE = $00000020;
- RBBIM_SIZE = $00000040;
- RBBIM_BACKGROUND = $00000080;
- RBBIM_ID = $00000100;
-{$ifdef ie4plus}
- RBBIM_IDEALSIZE = $00000200;
- RBBIM_LPARAM = $00000400;
- RBBIM_HEADERSIZE = $00000800; // control the size of the header
-{$ENDIF}
-{$ifdef win32vista}
- RBBIM_CHEVRONLOCATION = $00001000;
- RBBIM_CHEVRONSTATE = $00002000;
-{$endif}
-
-TYPE
-
- tagREBARBANDINFOA = Record
- cbSize : UINT;
- fMask : UINT;
- fStyle : UINT;
- clrFore : COLORREF;
- clrBack : COLORREF;
- lpText : LPSTR;
- cch : UINT;
- iImage : cint;
- hwndChild : HWND;
- cxMinChild : UINT;
- cyMinChild : UINT;
- cx : UINT;
- hbmBack : HBITMAP;
- wID : UINT;
-{$ifdef ie4plus}
- cyChild : UINT;
- cyMaxChild : UINT;
- cyIntegral : UINT;
- cxIdeal : UINT;
- lParam : LPARAM;
- cxHeader : UINT;
-{$ENDIF}
-{$ifdef win32vista}
- rcChevronLocation : RECT; // the rect is in client co-ord wrt hwndChild
- uChevronState : cUINT; // STATE_SYSTEM_*
-{$endif}
- END;
- REBARBANDINFOA = tagREBARBANDINFOA;
- LPREBARBANDINFOA = ^tagREBARBANDINFOA;
- TREBARBANDINFOA = tagREBARBANDINFOA;
- PREBARBANDINFOA = ^tagREBARBANDINFOA;
-
- LPCREBARBANDINFOA = ^REBARBANDINFOA;
-
-// #define REBARBANDINFOA_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOA, wID)
-// #define REBARBANDINFOW_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOW, wID)
-
- tagREBARBANDINFOW = Record
- cbSize : UINT;
- fMask : UINT;
- fStyle : UINT;
- clrFore : COLORREF;
- clrBack : COLORREF;
- lpText : LPWSTR;
- cch : UINT;
- iImage : cint;
- hwndChild : HWND;
- cxMinChild : UINT;
- cyMinChild : UINT;
- cx : UINT;
- hbmBack : HBITMAP;
- wID : UINT;
-{$ifdef ie4plus}
- cyChild : UINT;
- cyMaxChild : UINT;
- cyIntegral : UINT;
- cxIdeal : UINT;
- lParam : LPARAM;
- cxHeader : UINT;
-{$ENDIF}
-{$ifdef win32vista}
- rcChevronLocation : RECT; // the rect is in client co-ord wrt hwndChild
- uChevronState : cUINT; // STATE_SYSTEM_*
-{$endif}
-
- END;
- REBARBANDINFOW = tagREBARBANDINFOW;
- LPREBARBANDINFOW = ^tagREBARBANDINFOW;
- TREBARBANDINFOW = tagREBARBANDINFOW;
- PREBARBANDINFOW = ^tagREBARBANDINFOW;
-
- LPCREBARBANDINFOW = {const} ^REBARBANDINFOW;
-
-{$IFDEF UNICODE}
- REBARBANDINFO = REBARBANDINFOW;
- LPREBARBANDINFO = LPREBARBANDINFOW;
- LPCREBARBANDINFO = LPCREBARBANDINFOW;
-
-// REBARBANDINFO_V3_SIZE = REBARBANDINFOW_V3_SIZE;
-{$ELSE}
-
- REBARBANDINFO = REBARBANDINFOA;
- LPREBARBANDINFO = LPREBARBANDINFOA;
- LPCREBARBANDINFO = LPCREBARBANDINFOA;
-
- TRebarBandInfo = REBARBANDINFO;
- PRebarBandInfo = ^LPREBARBANDINFO;
-
-// REBARBANDINFO_V3_SIZE = REBARBANDINFOA_V3_SIZE;
-{$ENDIF}
-
-CONST
- RB_INSERTBANDA = (WM_USER + 1);
- RB_DELETEBAND = (WM_USER + 2);
- RB_GETBARINFO = (WM_USER + 3);
- RB_SETBARINFO = (WM_USER + 4);
-{$ifdef IE4plus}
- RB_GETBANDINFO = (WM_USER + 5);
- RB_GETBANDINFO_PRE_IE4 = (WM_USER + 5);
-{$ENDIF}
- RB_SETBANDINFOA = (WM_USER + 6);
- RB_SETPARENT = (WM_USER + 7);
-{$ifdef ie4plus}
- RB_HITTEST = (WM_USER + 8);
- RB_GETRECT = (WM_USER + 9);
-{$ENDIF}
- RB_INSERTBANDW = (WM_USER + 10);
- RB_SETBANDINFOW = (WM_USER + 11);
- RB_GETBANDCOUNT = (WM_USER + 12);
- RB_GETROWCOUNT = (WM_USER + 13);
- RB_GETROWHEIGHT = (WM_USER + 14);
-{$ifdef ie4plus}
- RB_IDTOINDEX = (WM_USER + 16); // wParam == id
- RB_GETTOOLTIPS = (WM_USER + 17);
- RB_SETTOOLTIPS = (WM_USER + 18);
- RB_SETBKCOLOR = (WM_USER + 19); // sets the default BK color
- RB_GETBKCOLOR = (WM_USER + 20); // defaults to CLR_NONE
- RB_SETTEXTCOLOR = (WM_USER + 21);
- RB_GETTEXTCOLOR = (WM_USER + 22); // defaults to 0x00000000
-
-{$ifdef Win32XP}
- RBSTR_CHANGERECT = $0001; // flags for RB_SIZETORECT
-{$ENDIF}
-
- RB_SIZETORECT = (WM_USER + 23); // resize the rebar/break bands and such to this rect (lparam)
-{$ENDIF} // _WIN32_IE >= 0x0400
-
- RB_SETCOLORSCHEME = CCM_SETCOLORSCHEME; // lParam is color scheme
- RB_GETCOLORSCHEME = CCM_GETCOLORSCHEME; // fills in COLORSCHEME pointed to by lParam
-
-{$IFDEF UNICODE}
- RB_INSERTBAND = RB_INSERTBANDW;
- RB_SETBANDINFO = RB_SETBANDINFOW;
-{$ELSE}
- RB_INSERTBAND = RB_INSERTBANDA;
- RB_SETBANDINFO = RB_SETBANDINFOA;
-{$ENDIF}
-
-{$ifdef ie4plus}
-// for manual drag control
-// lparam == cursor pos
- // -1 means do it yourself.
- // -2 means use what you had saved before
-
-CONST
- RB_BEGINDRAG = (WM_USER + 24);
- RB_ENDDRAG = (WM_USER + 25);
- RB_DRAGMOVE = (WM_USER + 26);
- RB_GETBARHEIGHT = (WM_USER + 27);
- RB_GETBANDINFOW = (WM_USER + 28);
- RB_GETBANDINFOA = (WM_USER + 29);
-
-//TYPE
-{$IFDEF UNICODE}
-// RB_GETBANDINFO = RB_GETBANDINFOW;
-{$ELSE}
-// RB_GETBANDINFO = RB_GETBANDINFOA;
-{$ENDIF}
-
-CONST
- RB_MINIMIZEBAND = (WM_USER + 30);
- RB_MAXIMIZEBAND = (WM_USER + 31);
-
- RB_GETDROPTARGET = (CCM_GETDROPTARGET);
-
- RB_GETBANDBORDERS = (WM_USER + 34); // returns in lparam = lprc the amount of edges added to band wparam
-
- RB_SHOWBAND = (WM_USER + 35); // show/hide band
- RB_SETPALETTE = (WM_USER + 37);
- RB_GETPALETTE = (WM_USER + 38);
- RB_MOVEBAND = (WM_USER + 39);
-
- RB_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT;
- RB_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT;
-
-{$ENDIF} // _WIN32_IE >= 0x0400
-
-{$ifdef win32xp}
- RB_GETBANDMARGINS = (WM_USER + 40);
- RB_SETWINDOWTHEME = CCM_SETWINDOWTHEME;
-{$ENDIF}
-{$ifdef win32vista}
- RB_SETEXTENDEDSTYLE = (WM_USER + 41);
- RB_GETEXTENDEDSTYLE = (WM_USER + 42);
-{$endif}
-
-{$ifdef ie5plus}
- RB_PUSHCHEVRON = (WM_USER + 43);
-{$ENDIF} // _WIN32_IE >= 0x0500
-
-{$ifdef win32vista}
- RB_SETBANDWIDTH = (WM_USER + 44); // set width for docked band
-{$endif}
-
- RBN_HEIGHTCHANGE = (RBN_FIRST - 0);
-
-{$ifdef ie4plus}
- RBN_GETOBJECT = (RBN_FIRST - 1);
- RBN_LAYOUTCHANGED = (RBN_FIRST - 2);
- RBN_AUTOSIZE = (RBN_FIRST - 3);
- RBN_BEGINDRAG = (RBN_FIRST - 4);
- RBN_ENDDRAG = (RBN_FIRST - 5);
- RBN_DELETINGBAND = (RBN_FIRST - 6); // Uses NMREBAR
- RBN_DELETEDBAND = (RBN_FIRST - 7); // Uses NMREBAR
- RBN_CHILDSIZE = (RBN_FIRST - 8);
-
-{$ifdef ie5plus}
- RBN_CHEVRONPUSHED = (RBN_FIRST - 10);
-{$ENDIF} // _WIN32_IE >= 0x0500
-{$ifdef win32vista}
- RBN_SPLITTERDRAG = (RBN_FIRST - 11);
-{$endif}
-
-{$ifdef ie5plus}
- RBN_MINMAX = (RBN_FIRST - 21);
-{$ENDIF}
-
-{$ifdef Win32XP}
- RBN_AUTOBREAK = (RBN_FIRST - 22);
-{$ENDIF}
-
-TYPE
-
- tagNMREBARCHILDSIZE = Record
- hdr : NMHDR;
- uBand : UINT;
- wID : UINT;
- rcChild : RECT;
- rcBand : RECT;
- END;
- NMREBARCHILDSIZE = tagNMREBARCHILDSIZE;
- LPNMREBARCHILDSIZE = ^tagNMREBARCHILDSIZE;
- TNMREBARCHILDSIZE = tagNMREBARCHILDSIZE;
- PNMREBARCHILDSIZE = ^tagNMREBARCHILDSIZE;
-
-
- tagNMREBAR = Record
- hdr : NMHDR;
- dwMask : DWORD; // RBNM_*
- uBand : UINT;
- fStyle : UINT;
- wID : UINT;
- lParam : LPARAM;
- END;
- NMREBAR = tagNMREBAR;
- LPNMREBAR = ^tagNMREBAR;
- TNMREBAR = tagNMREBAR;
- PNMREBAR = ^tagNMREBAR;
-
-// Mask flags for NMREBAR
-
-CONST
- RBNM_ID = $00000001;
- RBNM_STYLE = $00000002;
- RBNM_LPARAM = $00000004;
-
-TYPE
-
- tagNMRBAUTOSIZE = Record
- hdr : NMHDR;
- fChanged : BOOL;
- rcTarget : RECT;
- rcActual : RECT;
- END;
- NMRBAUTOSIZE = tagNMRBAUTOSIZE;
- LPNMRBAUTOSIZE = ^tagNMRBAUTOSIZE;
- TNMRBAUTOSIZE = tagNMRBAUTOSIZE;
- PNMRBAUTOSIZE = ^tagNMRBAUTOSIZE;
-
-
-{$ifdef ie5plus}
- tagNMREBARCHEVRON = Record
- hdr : NMHDR;
- uBand : UINT;
- wID : UINT;
- lParam : LPARAM;
- rc : RECT;
- lParamNM : LPARAM;
- END;
- NMREBARCHEVRON = tagNMREBARCHEVRON;
- LPNMREBARCHEVRON = ^tagNMREBARCHEVRON;
- TNMREBARCHEVRON = tagNMREBARCHEVRON;
- PNMREBARCHEVRON = ^tagNMREBARCHEVRON;
-
-{$ENDIF}
-{$ifdef win32vista}
- tagNMREBARSPLITTER = record
- hdr: NMHDR;
- rcSizing: RECT;
- end;
- NMREBARSPLITTER = tagNMREBARSPLITTER;
- LPNMREBARSPLITTER = ^tagNMREBARSPLITTER;
- TNMREBARSPLITTER = tagNMREBARSPLITTER;
- PNMREBARSPLITTER = LPNMREBARSPLITTER;
-{$endif}
-
-{$ifdef Win32XP}
-CONST
- RBAB_AUTOSIZE = $0001; // These are not flags and are all mutually exclusive
- RBAB_ADDBAND = $0002;
-
-TYPE
-
- tagNMREBARAUTOBREAK = Record
- hdr : NMHDR;
- uBand : UINT;
- wID : UINT;
- lParam : LPARAM;
- uMsg : UINT;
- fStyleCurrent : UINT;
- fAutoBreak : BOOL;
- END;
- NMREBARAUTOBREAK = tagNMREBARAUTOBREAK;
- LPNMREBARAUTOBREAK = ^tagNMREBARAUTOBREAK;
- TNMREBARAUTOBREAK = tagNMREBARAUTOBREAK;
- PNMREBARAUTOBREAK = ^tagNMREBARAUTOBREAK;
-
-{$ENDIF}
-
-CONST
- RBHT_NOWHERE = $0001;
- RBHT_CAPTION = $0002;
- RBHT_CLIENT = $0003;
- RBHT_GRABBER = $0004;
-{$ifdef ie5plus}
- RBHT_CHEVRON = $0008;
-{$ENDIF}
-{$ifdef win32vista}
- RBHT_SPLITTER = $0010;
-{$endif}
-
-TYPE
- _RB_HITTESTINFO = Record
- pt : POINT;
- flags : UINT;
- iBand : cint;
- END;
- RBHITTESTINFO = _RB_HITTESTINFO;
- LPRBHITTESTINFO = ^_RB_HITTESTINFO;
- TRB_HITTESTINFO = _RB_HITTESTINFO;
- PRB_HITTESTINFO = ^_RB_HITTESTINFO;
- PRBHitTestInfo = PRB_HITTESTINFO;
- TRBHitTestInfo = TRB_HITTESTINFO;
-
-
-{$ENDIF} // _WIN32_IE >= 0x0400
-{$ENDIF} // NOREBAR
-{$ENDIF} // _WIN32_IE >= 0x0300
-
-//====== TOOLTIPS CONTROL =====================================================
-
-{$IFNDEF NOTOOLTIPS}
-
-{$IFDEF _WIN32}
-
-CONST
- TOOLTIPS_CLASSW = {L}'tooltips_class32';
- TOOLTIPS_CLASSA = 'tooltips_class32';
-
-{$IFDEF UNICODE}
- TOOLTIPS_CLASS = TOOLTIPS_CLASSW;
-{$ELSE}
- TOOLTIPS_CLASS = TOOLTIPS_CLASSA;
-{$ENDIF}
-
-{$ELSE}
-
-CONST
- TOOLTIPS_CLASS = 'tooltips_class';
-{$ENDIF}
-
-
-
-TYPE
-
- tagTOOLINFOA = Record
- cbSize : UINT;
- uFlags : UINT;
- hwnd : HWND;
- uId : UINT_PTR;
- rect : RECT;
- hinst : HINST;
- lpszText : LPSTR;
-{$ifdef ie3plus}
- lParam : LPARAM;
-{$ENDIF}
-{$ifdef Win32XP}
- lpReserved : Pointer;
-{$ENDIF}
- END;
- TTTOOLINFOA = tagTOOLINFOA;
- PTOOLINFOA = {near} ^tagTOOLINFOA;
- LPTTTOOLINFOA = ^tagTOOLINFOA;
- TTOOLINFOA = tagTOOLINFOA;
- LPTOOLINFOA = ^tagTOOLINFOA;
-
-
- tagTOOLINFOW = Record
- cbSize : UINT;
- uFlags : UINT;
- hwnd : HWND;
- uId : UINT_PTR;
- rect : RECT;
- hinst : HINST;
- lpszText : LPWSTR;
-{$ifdef ie3plus}
- lParam : LPARAM;
-{$ENDIF}
-{$ifdef Win32XP}
- lpReserved : Pointer;
-{$ENDIF}
- END;
- TTTOOLINFOW = tagTOOLINFOW;
- PTOOLINFOW = {near} ^tagTOOLINFOW;
- LPTTTOOLINFOW = ^tagTOOLINFOW;
- TTOOLINFOW = tagTOOLINFOW;
- LPTOOLINFOW = ^tagTOOLINFOW;
-
-
-{$IFDEF UNICODE}
- TTTOOLINFO = TTTOOLINFOW;
- PTOOLINFO = PTOOLINFOW;
- LPTTTOOLINFO = LPTTTOOLINFOW;
-// TTTOOLINFO_V1_SIZE = TTTOOLINFOW_V1_SIZE;
-{$ELSE}
- PTOOLINFO = PTOOLINFOA;
- TTTOOLINFO = TTTOOLINFOA;
- LPTTTOOLINFO = LPTTTOOLINFOA;
-// TTTOOLINFO_V1_SIZE = TTTOOLINFOA_V1_SIZE;
-{$ENDIF}
-
-
-TYPE
-
-{$ifdef ie3plus}
-// LPTOOLINFOA = LPTTTOOLINFOA;
-// LPTOOLINFOW = LPTTTOOLINFOW;
- TOOLINFOA = TTTOOLINFOA;
- TOOLINFOW = TTTOOLINFOW;
-{$ELSE}
-// TTTOOLINFOA = TOOLINFOA;
-// LPTTTOOLINFOA = LPTOOLINFOA;
-// TTTOOLINFOW = TOOLINFOW;
-// LPTTTOOLINFOW = LPTOOLINFOW;
-{$ENDIF}
-
-
-
- LPTOOLINFO = LPTTTOOLINFO;
-
- TOOLINFO = TTTOOLINFO;
-
-// #define TTTOOLINFOA_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lpszText)
-// #define TTTOOLINFOW_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lpszText)
-// #define TTTOOLINFOA_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lParam)
-// #define TTTOOLINFOW_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lParam)
-// #define TTTOOLINFOA_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lpReserved)
-// #define TTTOOLINFOW_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lpReserved)
-
-
-CONST
-// begin_r_commctrl
-
- TTS_ALWAYSTIP = $01;
- TTS_NOPREFIX = $02;
-{$ifdef ie5plus}
- TTS_NOANIMATE = $10;
- TTS_NOFADE = $20;
- TTS_BALLOON = $40;
- TTS_CLOSE = $80;
-{$ENDIF}
-{$ifdef win32vista}
- TTS_USEVISUALSTYLE = $100; // Use themed hyperlinks
-{$endif}
-
-// end_r_commctrl
-
- TTF_IDISHWND = $0001;
-
-// Use this to center around trackpoint in trackmode
-// -OR- to center around tool in normal mode.
-// Use TTF_ABSOLUTE to place the tip exactly at the track coords when
-// in tracking mode. TTF_ABSOLUTE can be used in conjunction with TTF_CENTERTIP
-// to center the tip absolutely about the track point.
-
- TTF_CENTERTIP = $0002;
- TTF_RTLREADING = $0004;
- TTF_SUBCLASS = $0010;
-{$ifdef ie3plus}
- TTF_TRACK = $0020;
- TTF_ABSOLUTE = $0080;
- TTF_TRANSPARENT = $0100;
-{$ifdef ie501plus}
- TTF_PARSELINKS = $1000;
-{$ENDIF} // _WIN32_IE >= 0x0501
- TTF_DI_SETITEM = $8000; // valid only on the TTN_NEEDTEXT callback
-{$ENDIF} // _WIN32_IE >= 0x0300
-
-
- TTDT_AUTOMATIC = 0;
- TTDT_RESHOW = 1;
- TTDT_AUTOPOP = 2;
- TTDT_INITIAL = 3;
-
-// ToolTip Icons (Set with TTM_SETTITLE)
- TTI_NONE = 0;
- TTI_INFO = 1;
- TTI_WARNING = 2;
- TTI_ERROR = 3;
-{$ifdef win32vista}
- TTI_INFO_LARGE = 4;
- TTI_WARNING_LARGE = 5;
- TTI_ERROR_LARGE = 6;
-{$endif}
-
-// Tool Tip Messages
- TTM_ACTIVATE = (WM_USER + 1);
- TTM_SETDELAYTIME = (WM_USER + 3);
- TTM_ADDTOOLA = (WM_USER + 4);
- TTM_ADDTOOLW = (WM_USER + 50);
- TTM_DELTOOLA = (WM_USER + 5);
- TTM_DELTOOLW = (WM_USER + 51);
- TTM_NEWTOOLRECTA = (WM_USER + 6);
- TTM_NEWTOOLRECTW = (WM_USER + 52);
- TTM_RELAYEVENT = (WM_USER + 7);
-
- TTM_GETTOOLINFOA = (WM_USER + 8);
- TTM_GETTOOLINFOW = (WM_USER + 53);
-
- TTM_SETTOOLINFOA = (WM_USER + 9);
- TTM_SETTOOLINFOW = (WM_USER + 54);
-
- TTM_HITTESTA = (WM_USER + 10);
- TTM_HITTESTW = (WM_USER + 55);
- TTM_GETTEXTA = (WM_USER + 11);
- TTM_GETTEXTW = (WM_USER + 56);
- TTM_UPDATETIPTEXTA = (WM_USER + 12);
- TTM_UPDATETIPTEXTW = (WM_USER + 57);
- TTM_GETTOOLCOUNT = (WM_USER + 13);
- TTM_ENUMTOOLSA = (WM_USER + 14);
- TTM_ENUMTOOLSW = (WM_USER + 58);
- TTM_GETCURRENTTOOLA = (WM_USER + 15);
- TTM_GETCURRENTTOOLW = (WM_USER + 59);
- TTM_WINDOWFROMPOINT = (WM_USER + 16);
-{$ifdef ie3plus}
- TTM_TRACKACTIVATE = (WM_USER + 17); // wParam = TRUE/FALSE start end lparam = LPTOOLINFO
- TTM_TRACKPOSITION = (WM_USER + 18); // lParam = dwPos
- TTM_SETTIPBKCOLOR = (WM_USER + 19);
- TTM_SETTIPTEXTCOLOR = (WM_USER + 20);
- TTM_GETDELAYTIME = (WM_USER + 21);
- TTM_GETTIPBKCOLOR = (WM_USER + 22);
- TTM_GETTIPTEXTCOLOR = (WM_USER + 23);
- TTM_SETMAXTIPWIDTH = (WM_USER + 24);
- TTM_GETMAXTIPWIDTH = (WM_USER + 25);
- TTM_SETMARGIN = (WM_USER + 26); // lParam = lprc
- TTM_GETMARGIN = (WM_USER + 27); // lParam = lprc
- TTM_POP = (WM_USER + 28);
-{$ENDIF}
-{$ifdef ie4plus}
- TTM_UPDATE = (WM_USER + 29);
-{$ENDIF}
-{$ifdef ie5plus}
- TTM_GETBUBBLESIZE = (WM_USER + 30);
- TTM_ADJUSTRECT = (WM_USER + 31);
- TTM_SETTITLEA = (WM_USER + 32); // wParam = TTI_*, lParam = char* szTitle
- TTM_SETTITLEW = (WM_USER + 33); // wParam = TTI_*, lParam = wchar* szTitle
-{$ENDIF}
-
-{$ifdef Win32XP}
- TTM_POPUP = (WM_USER + 34);
- TTM_GETTITLE = (WM_USER + 35); // wParam = 0, lParam = TTGETTITLE*
-
-TYPE
-
- _TTGETTITLE = Record
- dwSize : DWORD;
- uTitleBitmap : UINT;
- cch : UINT;
- pszTitle : PWCHAR;
- END;
- TTGETTITLE = _TTGETTITLE;
- PTTGETTITLE = ^_TTGETTITLE;
- TTTGETTITLE = _TTGETTITLE;
- PTTTGETTITLE = ^TTTGETTITLE;
-
-{$ENDIF}
-
-const
-{$IFDEF UNICODE}
- TTM_ADDTOOL = TTM_ADDTOOLW;
- TTM_DELTOOL = TTM_DELTOOLW;
- TTM_NEWTOOLRECT = TTM_NEWTOOLRECTW;
- TTM_GETTOOLINFO = TTM_GETTOOLINFOW;
- TTM_SETTOOLINFO = TTM_SETTOOLINFOW;
- TTM_HITTEST = TTM_HITTESTW;
- TTM_GETTEXT = TTM_GETTEXTW;
- TTM_UPDATETIPTEXT = TTM_UPDATETIPTEXTW;
- TTM_ENUMTOOLS = TTM_ENUMTOOLSW;
- TTM_GETCURRENTTOOL = TTM_GETCURRENTTOOLW;
-{$ifdef ie5plus}
- TTM_SETTITLE = TTM_SETTITLEW;
-{$ENDIF}
-{$ELSE}
- TTM_ADDTOOL = TTM_ADDTOOLA;
- TTM_DELTOOL = TTM_DELTOOLA;
- TTM_NEWTOOLRECT = TTM_NEWTOOLRECTA;
- TTM_GETTOOLINFO = TTM_GETTOOLINFOA;
- TTM_SETTOOLINFO = TTM_SETTOOLINFOA;
- TTM_HITTEST = TTM_HITTESTA;
- TTM_GETTEXT = TTM_GETTEXTA;
- TTM_UPDATETIPTEXT = TTM_UPDATETIPTEXTA;
- TTM_ENUMTOOLS = TTM_ENUMTOOLSA;
- TTM_GETCURRENTTOOL = TTM_GETCURRENTTOOLA;
-{$ifdef ie5plus}
- TTM_SETTITLE = TTM_SETTITLEA;
-{$ENDIF}
-{$ENDIF}
-
-{$ifdef win32xp}
-CONST
- TTM_SETWINDOWTHEME = CCM_SETWINDOWTHEME;
-{$ENDIF}
-
-
-TYPE
-
-
- _TT_HITTESTINFOA = Record
- hwnd : HWND;
- pt : POINT;
- ti : TTTOOLINFOA;
- END;
- TTHITTESTINFOA = _TT_HITTESTINFOA;
- LPTTHITTESTINFOA = ^_TT_HITTESTINFOA;
- TTT_HITTESTINFOA = _TT_HITTESTINFOA;
- PTT_HITTESTINFOA = ^_TT_HITTESTINFOA;
-
-
-
- _TT_HITTESTINFOW = Record
- hwnd : HWND;
- pt : POINT;
- ti : TTTOOLINFOW;
- END;
- TTHITTESTINFOW = _TT_HITTESTINFOW;
- LPTTHITTESTINFOW = ^_TT_HITTESTINFOW;
- TTT_HITTESTINFOW = _TT_HITTESTINFOW;
- PTT_HITTESTINFOW = ^_TT_HITTESTINFOW;
-
-{$IFDEF UNICODE}
- TTHITTESTINFO = TTHITTESTINFOW;
- LPTTHITTESTINFO = LPTTHITTESTINFOW;
-{$ELSE}
- TTHITTESTINFO = TTHITTESTINFOA;
- LPTTHITTESTINFO = LPTTHITTESTINFOA;
-{$ENDIF}
- LPHITTESTINFO = LPTTHITTESTINFO;
-{$ifdef ie3plus}
- LPHITTESTINFOW = LPTTHITTESTINFOW;
- LPHITTESTINFOA = LPTTHITTESTINFOA;
-{$ELSE}
-// LPTTHITTESTINFOA = LPHITTESTINFOA;
-// LPTTHITTESTINFOW = LPHITTESTINFOW;
-{$ENDIF}
-
-CONST
- TTN_GETDISPINFOA = (TTN_FIRST - 0);
- TTN_GETDISPINFOW = (TTN_FIRST - 10);
- TTN_SHOW = (TTN_FIRST - 1);
- TTN_POP = (TTN_FIRST - 2);
- TTN_LINKCLICK = (TTN_FIRST - 3);
-
-CONST
-{$IFDEF UNICODE}
- TTN_GETDISPINFO = TTN_GETDISPINFOW;
-{$ELSE}
- TTN_GETDISPINFO = TTN_GETDISPINFOA;
-{$ENDIF}
-
-CONST
- TTN_NEEDTEXT = TTN_GETDISPINFO;
-
-
- TTN_NEEDTEXTA = TTN_GETDISPINFOA;
- TTN_NEEDTEXTW = TTN_GETDISPINFOW;
-
-
-
-
-
-TYPE
-
-
-// #define NMTTDISPINFOA_V1_SIZE CCSIZEOF_STRUCT(NMTTDISPINFOA, uFlags)
-// #define NMTTDISPINFOW_V1_SIZE CCSIZEOF_STRUCT(NMTTDISPINFOW, uFlags)
-
- tagNMTTDISPINFOA = Record
- hdr : NMHDR;
- lpszText : LPSTR;
- szText : Array[0..79] of char;
- hinst : HINST;
- uFlags : UINT;
-{$ifdef ie3plus}
- lParam : LPARAM;
-{$ENDIF}
- END;
- NMTTDISPINFOA = tagNMTTDISPINFOA;
- LPNMTTDISPINFOA = ^tagNMTTDISPINFOA;
- TNMTTDISPINFOA = tagNMTTDISPINFOA;
- PNMTTDISPINFOA = ^tagNMTTDISPINFOA;
-
-
- tagNMTTDISPINFOW = Record
- hdr : NMHDR;
- lpszText : LPWSTR;
- szText : Array[0..79] of WCHAR;
- hinst : HINST;
- uFlags : UINT;
-{$ifdef ie3plus}
- lParam : LPARAM;
-{$ENDIF}
- END;
- NMTTDISPINFOW = tagNMTTDISPINFOW;
- LPNMTTDISPINFOW = ^tagNMTTDISPINFOW;
- TNMTTDISPINFOW = tagNMTTDISPINFOW;
- PNMTTDISPINFOW = ^tagNMTTDISPINFOW;
-
-{$ifdef ie3plus}
- TOOLTIPTEXTW = NMTTDISPINFOW;
- TOOLTIPTEXTA = NMTTDISPINFOA;
- LPTOOLTIPTEXTA = LPNMTTDISPINFOA;
- LPTOOLTIPTEXTW = LPNMTTDISPINFOW;
- TTOOLTIPTEXTW = NMTTDISPINFOW;
- PTOOLTIPTEXTW = LPNMTTDISPINFOW;
-{$ELSE}
-// tagNMTTDISPINFOA = tagTOOLTIPTEXTA;
- NMTTDISPINFOA = TOOLTIPTEXTA;
-// LPNMTTDISPINFOA = LPTOOLTIPTEXTA;
- tagNMTTDISPINFOW = tagTOOLTIPTEXTW;
- NMTTDISPINFOW = TOOLTIPTEXTW;
- LPNMTTDISPINFOW = LPTOOLTIPTEXTW;
-{$ENDIF}
-
-TYPE
-
-{$IFDEF UNICODE}
- NMTTDISPINFO = NMTTDISPINFOW;
- LPNMTTDISPINFO = LPNMTTDISPINFOW;
-// NMTTDISPINFO_V1_SIZE = NMTTDISPINFOW_V1_SIZE;
-{$ELSE}
- NMTTDISPINFO = NMTTDISPINFOA;
- LPNMTTDISPINFO = LPNMTTDISPINFOA;
-// NMTTDISPINFO_V1_SIZE = NMTTDISPINFOA_V1_SIZE;
-{$ENDIF}
-
- TOOLTIPTEXT = NMTTDISPINFO;
- LPTOOLTIPTEXT = LPNMTTDISPINFO;
-
-{$ENDIF} // NOTOOLTIPS
-
-
-//====== STATUS BAR CONTROL ===================================================
-
-{$IFNDEF NOSTATUSBAR}
-
-// begin_r_commctrl
-CONST
- SBARS_SIZEGRIP = $0100;
-{$ifdef ie5plus}
- SBARS_TOOLTIPS = $0800;
-{$ENDIF}
-
-{$ifdef ie4plus}
-// this is a status bar flag, preference to SBARS_TOOLTIPS
- SBT_TOOLTIPS = $0800;
-{$ENDIF}
-
-// end_r_commctrl
-
-procedure DrawStatusTextA(hDC:HDC;lprc:LPRECT;pszText:LPCSTR;uFlags:UINT); stdcall; external commctrldll name 'DrawStatusTextA';
-Procedure DrawStatusTextW(hDC:HDC;lprc:LPRECT;pszText:LPCWSTR;uFlags:UINT); stdcall; external commctrldll name 'DrawStatusTextW';
-
-function CreateStatusWindowA(style:LONG;lpszText:LPCSTR;hwndParent:HWND;wID:UINT):HWND; stdcall; external commctrldll name 'CreateStatusWindowA';
-function CreateStatusWindowW(style:LONG;lpszText:LPCWSTR;hwndParent:HWND;wID:UINT):HWND; stdcall; external commctrldll name 'CreateStatusWindowW';
-
-function CreateStatusWindow(style:LONG;lpszText:LPCSTR;hwndParent:HWND;wID:UINT):HWND; stdcall; external commctrldll name 'CreateStatusWindowA';
-procedure DrawStatusText(hDC:HDC;lprc:LPRECT;pszText:LPCSTR;uFlags:UINT); stdcall; external commctrldll name 'DrawStatusTextA';
-function CreateStatusWindow(style:LONG;lpszText:LPCWSTR;hwndParent:HWND;wID:UINT):HWND; stdcall; external commctrldll name 'CreateStatusWindowW';
-Procedure DrawStatusText(hDC:HDC;lprc:LPRECT;pszText:LPCWSTR;uFlags:UINT); stdcall; external commctrldll name 'DrawStatusTextW';
-
-CONST
-{$IFDEF _WIN32}
- STATUSCLASSNAMEW = {L}'msctls_statusbar32';
- STATUSCLASSNAMEA = 'msctls_statusbar32';
-
-{$IFDEF UNICODE}
- STATUSCLASSNAME = STATUSCLASSNAMEW;
-{$ELSE}
- STATUSCLASSNAME = STATUSCLASSNAMEA;
-{$ENDIF}
-{$ELSE}
- STATUSCLASSNAME = 'msctls_statusbar';
-{$ENDIF}
-
- SB_SETTEXTA = (WM_USER+1);
- SB_SETTEXTW = (WM_USER+11);
- SB_GETTEXTA = (WM_USER+2);
- SB_GETTEXTW = (WM_USER+13);
- SB_GETTEXTLENGTHA = (WM_USER+3);
- SB_GETTEXTLENGTHW = (WM_USER+12);
-
-
- SB_SETPARTS = (WM_USER+4);
- SB_GETPARTS = (WM_USER+6);
- SB_GETBORDERS = (WM_USER+7);
- SB_SETMINHEIGHT = (WM_USER+8);
- SB_SIMPLE = (WM_USER+9);
- SB_GETRECT = (WM_USER+10);
-{$ifdef ie3plus}
- SB_ISSIMPLE = (WM_USER+14);
-{$ENDIF}
-{$ifdef ie4plus}
- SB_SETICON = (WM_USER+15);
- SB_SETTIPTEXTA = (WM_USER+16);
- SB_SETTIPTEXTW = (WM_USER+17);
- SB_GETTIPTEXTA = (WM_USER+18);
- SB_GETTIPTEXTW = (WM_USER+19);
- SB_GETICON = (WM_USER+20);
- SB_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT;
- SB_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT;
-{$ENDIF}
-{$IFDEF UNICODE}
- SB_GETTEXT = SB_GETTEXTW;
- SB_SETTEXT = SB_SETTEXTW;
- SB_GETTEXTLENGTH = SB_GETTEXTLENGTHW;
-{$ifdef ie4plus}
- SB_SETTIPTEXT = SB_SETTIPTEXTW;
- SB_GETTIPTEXT = SB_GETTIPTEXTW;
-{$ENDIF}
-{$ELSE}
- SB_GETTEXT = SB_GETTEXTA;
- SB_SETTEXT = SB_SETTEXTA;
- SB_GETTEXTLENGTH = SB_GETTEXTLENGTHA;
-{$ifdef ie4plus}
- SB_SETTIPTEXT = SB_SETTIPTEXTA;
- SB_GETTIPTEXT = SB_GETTIPTEXTA;
-{$ENDIF}
-{$ENDIF}
-
- SBT_OWNERDRAW = $1000;
- SBT_NOBORDERS = $0100;
- SBT_POPOUT = $0200;
- SBT_RTLREADING = $0400;
-{$ifdef ie5plus}
- SBT_NOTABPARSING = $0800;
-{$ENDIF}
-
- SB_SETBKCOLOR = CCM_SETBKCOLOR; // lParam = bkColor
-
-/// status bar notifications
-{$ifdef ie4plus}
- SBN_SIMPLEMODECHANGE = (SBN_FIRST - 0);
-{$ENDIF}
-
-{$ifdef ie5plus}
-// refers to the data saved for simple mode
- SB_SIMPLEID = $00ff;
-{$ENDIF}
-
-{$ENDIF} // NOSTATUSBAR
-
-//====== MENU HELP ============================================================
-
-{$IFNDEF NOMENUHELP}
-
-Procedure MenuHelp(uMsg:UINT;wParam:WPARAM;lParam:LPARAM;hMainMenu:HMENU;hInst:HINST;hwndStatus:HWND;lpwIDs:PUINT); stdcall; external commctrldll name 'MenuHelp';
-function ShowHideMenuCtl(hWnd:HWND;uFlags:UINT_PTR;lpInfo:LPINT):BOOL; stdcall; external commctrldll name 'ShowHideMenuCtl';
-Procedure GetEffectiveClientRect(hWnd:HWND;lprc:LPRECT;lpInfo:LPINT); stdcall; external commctrldll name 'GetEffectiveClientRect';
-
-CONST
- MINSYSCOMMAND = SC_SIZE;
-{$ENDIF}
-
-
-//====== TRACKBAR CONTROL =====================================================
-
-{$IFNDEF NOTRACKBAR}
-
-CONST
-
-{$IFDEF _WIN32}
-
- TRACKBAR_CLASSA = 'msctls_trackbar32';
- TRACKBAR_CLASSW = {L}'msctls_trackbar32';
-
-{$IFDEF UNICODE}
- TRACKBAR_CLASS = TRACKBAR_CLASSW;
-{$ELSE}
- TRACKBAR_CLASS = TRACKBAR_CLASSA;
-{$ENDIF}
-{$ELSE}
- TRACKBAR_CLASS = 'msctls_trackbar';
-{$ENDIF}
-
-// begin_r_commctrl
-
- TBS_AUTOTICKS = $0001;
- TBS_VERT = $0002;
- TBS_HORZ = $0000;
- TBS_TOP = $0004;
- TBS_BOTTOM = $0000;
- TBS_LEFT = $0004;
- TBS_RIGHT = $0000;
- TBS_BOTH = $0008;
- TBS_NOTICKS = $0010;
- TBS_ENABLESELRANGE = $0020;
- TBS_FIXEDLENGTH = $0040;
- TBS_NOTHUMB = $0080;
-{$ifdef ie3plus}
- TBS_TOOLTIPS = $0100;
-{$ENDIF}
-{$ifdef ie5plus}
- TBS_REVERSED = $0200; // Accessibility hint: the smaller number (usually the min value) means "high" and the larger number (usually the max value) means "low"
-{$ENDIF}
-
-{$ifdef ie501plus}
- TBS_DOWNISLEFT = $0400; // Down=Left and Up=Right (default is Down=Right and Up=Left)
-{$ENDIF}
-{$ifdef win32vista}
- TBS_NOTIFYBEFOREMOVE = $0800; // Trackbar should notify parent before repositioning the slider due to user action (enables snapping)
-{$endif}
-{$ifdef NTDDI_VISTA}
- TBS_TRANSPARENTBKGND = $1000; // Background is painted by the parent via WM_PRINTCLIENT
-{$endif}
-
-// end_r_commctrl
-
- TBM_GETPOS = (WM_USER);
- TBM_GETRANGEMIN = (WM_USER+1);
- TBM_GETRANGEMAX = (WM_USER+2);
- TBM_GETTIC = (WM_USER+3);
- TBM_SETTIC = (WM_USER+4);
- TBM_SETPOS = (WM_USER+5);
- TBM_SETRANGE = (WM_USER+6);
- TBM_SETRANGEMIN = (WM_USER+7);
- TBM_SETRANGEMAX = (WM_USER+8);
- TBM_CLEARTICS = (WM_USER+9);
- TBM_SETSEL = (WM_USER+10);
- TBM_SETSELSTART = (WM_USER+11);
- TBM_SETSELEND = (WM_USER+12);
- TBM_GETPTICS = (WM_USER+14);
- TBM_GETTICPOS = (WM_USER+15);
- TBM_GETNUMTICS = (WM_USER+16);
- TBM_GETSELSTART = (WM_USER+17);
- TBM_GETSELEND = (WM_USER+18);
- TBM_CLEARSEL = (WM_USER+19);
- TBM_SETTICFREQ = (WM_USER+20);
- TBM_SETPAGESIZE = (WM_USER+21);
- TBM_GETPAGESIZE = (WM_USER+22);
- TBM_SETLINESIZE = (WM_USER+23);
- TBM_GETLINESIZE = (WM_USER+24);
- TBM_GETTHUMBRECT = (WM_USER+25);
- TBM_GETCHANNELRECT = (WM_USER+26);
- TBM_SETTHUMBLENGTH = (WM_USER+27);
- TBM_GETTHUMBLENGTH = (WM_USER+28);
-{$ifdef ie3plus}
- TBM_SETTOOLTIPS = (WM_USER+29);
- TBM_GETTOOLTIPS = (WM_USER+30);
- TBM_SETTIPSIDE = (WM_USER+31);
-// TrackBar Tip Side flags
- TBTS_TOP = 0;
- TBTS_LEFT = 1;
- TBTS_BOTTOM = 2;
- TBTS_RIGHT = 3;
-
- TBM_SETBUDDY = (WM_USER+32); // wparam = BOOL fLeft; (or right)
- TBM_GETBUDDY = (WM_USER+33); // wparam = BOOL fLeft; (or right)
-{$ENDIF}
-{$ifdef ie4plus}
- TBM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT;
- TBM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT;
-{$ENDIF}
-
-
- TB_LINEUP = 0;
- TB_LINEDOWN = 1;
- TB_PAGEUP = 2;
- TB_PAGEDOWN = 3;
- TB_THUMBPOSITION = 4;
- TB_THUMBTRACK = 5;
- TB_TOP = 6;
- TB_BOTTOM = 7;
- TB_ENDTRACK = 8;
-
-
-{$ifdef ie3plus}
-// custom draw item specs
- TBCD_TICS = $0001;
- TBCD_THUMB = $0002;
- TBCD_CHANNEL = $0003;
-{$ENDIF}
-{$ifdef win32vista}
- TRBN_THUMBPOSCHANGING = (TRBN_FIRST-1);
-{$endif}
-{$ENDIF} // trackbar
-
-//====== DRAG LIST CONTROL ====================================================
-
-{$IFNDEF NODRAGLIST}
-TYPE
-
- tagDRAGLISTINFO = Record
- uNotification : UINT;
- hWnd : HWND;
- ptCursor : POINT;
- END;
- DRAGLISTINFO = tagDRAGLISTINFO;
- LPDRAGLISTINFO = ^tagDRAGLISTINFO;
- TDRAGLISTINFO = tagDRAGLISTINFO;
- PDRAGLISTINFO = ^tagDRAGLISTINFO;
-
-
-
-CONST
- DL_BEGINDRAG = (WM_USER+133);
- DL_DRAGGING = (WM_USER+134);
- DL_DROPPED = (WM_USER+135);
- DL_CANCELDRAG = (WM_USER+136);
-
- DL_CURSORSET = 0;
- DL_STOPCURSOR = 1;
- DL_COPYCURSOR = 2;
- DL_MOVECURSOR = 3;
-
- DRAGLISTMSGSTRING = 'commctrl_DragListMsg'; // TEXT("commctrl_DragListMsg");
-
-function MakeDragList(hLB:HWND):BOOL; stdcall; external commctrldll name 'MakeDragList';
-Procedure DrawInsert(handParent:HWND;hLB:HWND;nItem:cint); stdcall; external commctrldll name 'DrawInsert';
-function LBItemFromPt(hLB:HWND;pt:POINT;bAutoScroll:BOOL):cint; stdcall; external commctrldll name 'LBItemFromPt';
-
-{$ENDIF}
-
-//====== UPDOWN CONTROL =======================================================
-
-{$IFNDEF NOUPDOWN}
-CONST
-{$IFDEF _WIN32}
-
- UPDOWN_CLASSA = 'msctls_updown32';
- UPDOWN_CLASSW = {L}'msctls_updown32';
-
-{$IFDEF UNICODE}
- UPDOWN_CLASS = UPDOWN_CLASSW;
-{$ELSE}
- UPDOWN_CLASS = UPDOWN_CLASSA;
-{$ENDIF}
-{$ELSE}
- UPDOWN_CLASS = 'msctls_updown';
-{$ENDIF}
-
-TYPE
-
- _UDACCEL = Record
- nSec : UINT;
- nInc : UINT;
- END;
- UDACCEL = _UDACCEL;
- LPUDACCEL = ^_UDACCEL;
- TUDACCEL = _UDACCEL;
- PUDACCEL = ^_UDACCEL;
-
-CONST
- UD_MAXVAL = $7fff;
- UD_MINVAL = (-UD_MAXVAL);
-
-// begin_r_commctrl
-
- UDS_WRAP = $0001;
- UDS_SETBUDDYINT = $0002;
- UDS_ALIGNRIGHT = $0004;
- UDS_ALIGNLEFT = $0008;
- UDS_AUTOBUDDY = $0010;
- UDS_ARROWKEYS = $0020;
- UDS_HORZ = $0040;
- UDS_NOTHOUSANDS = $0080;
-{$ifdef ie3plus}
- UDS_HOTTRACK = $0100;
-{$ENDIF}
-
-// end_r_commctrl
-
- UDM_SETRANGE = (WM_USER+101);
- UDM_GETRANGE = (WM_USER+102);
- UDM_SETPOS = (WM_USER+103);
- UDM_GETPOS = (WM_USER+104);
- UDM_SETBUDDY = (WM_USER+105);
- UDM_GETBUDDY = (WM_USER+106);
- UDM_SETACCEL = (WM_USER+107);
- UDM_GETACCEL = (WM_USER+108);
- UDM_SETBASE = (WM_USER+109);
- UDM_GETBASE = (WM_USER+110);
-{$ifdef ie4plus}
- UDM_SETRANGE32 = (WM_USER+111);
- UDM_GETRANGE32 = (WM_USER+112); // wParam & lParam are LPINT
- UDM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT;
- UDM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT;
-{$ENDIF}
-{$ifdef ie5plus}
- UDM_SETPOS32 = (WM_USER+113);
- UDM_GETPOS32 = (WM_USER+114);
-{$ENDIF}
-
-function CreateUpDownControl(dwStyle:DWORD;x:cint;y:cint;cx:cint;cy:cint;hParent:HWND;nID:cint;hInst:HINST;hBuddy:HWND;nUpper:cint;nLower:cint;nPos:cint):HWND; stdcall; external commctrldll name 'CreateUpDownControl';
-
-TYPE
- _NM_UPDOWN = Record
- hdr : NMHDR;
- iPos : cint;
- iDelta : cint;
- END;
- NMUPDOWN = _NM_UPDOWN;
- LPNMUPDOWN = ^_NM_UPDOWN;
- TNM_UPDOWN = _NM_UPDOWN;
- PNM_UPDOWN = ^_NM_UPDOWN;
-
-{$ifdef ie3plus}
- NM_UPDOWN = NMUPDOWN;
- LPNM_UPDOWN = LPNMUPDOWN;
-{$ELSE}
- NMUPDOWN = NM_UPDOWN;
- LPNMUPDOWN = LPNM_UPDOWN;
-{$ENDIF}
-
-CONST
- UDN_DELTAPOS = (UDN_FIRST - 1);
-
-{$ENDIF} // NOUPDOWN
-
-
-//====== PROGRESS CONTROL =====================================================
-
-{$IFNDEF NOPROGRESS}
-
-CONST
-
-{$IFDEF _WIN32}
-
- PROGRESS_CLASSA = 'msctls_progress32';
- PROGRESS_CLASSW = {L}'msctls_progress32';
-
-{$IFDEF UNICODE}
- PROGRESS_CLASS = PROGRESS_CLASSW;
-{$ELSE}
- PROGRESS_CLASS = PROGRESS_CLASSA;
-{$ENDIF}
-
-{$ELSE}
- PROGRESS_CLASS = 'msctls_progress';
-{$ENDIF}
-
-// begin_r_commctrl
-
-{$ifdef ie3plus}
- PBS_SMOOTH = $01;
- PBS_VERTICAL = $04;
-{$ENDIF}
-
-// end_r_commctrl
-
- PBM_SETRANGE = (WM_USER+1);
- PBM_SETPOS = (WM_USER+2);
- PBM_DELTAPOS = (WM_USER+3);
- PBM_SETSTEP = (WM_USER+4);
- PBM_STEPIT = (WM_USER+5);
-{$ifdef ie3plus}
- PBM_SETRANGE32 = (WM_USER+6); // lParam = high, wParam = low
-
-TYPE
- PBRANGE = Record
- iLow : cint;
- iHigh : cint;
- END;
- PPBRANGE = ^PBRANGE;
- TPBRANGE = PBRANGE;
-// PPBRANGE = ^PBRANGE;
-
-
-CONST
- PBM_GETRANGE = (WM_USER+7); // wParam = return (TRUE ? low : high). lParam = PPBRANGE or NULL
- PBM_GETPOS = (WM_USER+8);
-{$ifdef ie4plus}
- PBM_SETBARCOLOR = (WM_USER+9); // lParam = bar color
-{$ENDIF} // _WIN32_IE >= 0x0400
- PBM_SETBKCOLOR = CCM_SETBKCOLOR; // lParam = bkColor
-{$ENDIF} // _WIN32_IE >= 0x0300
-
-{$ifdef win32xp} //_WIN32_WINNT >= 0x0501
- PBS_MARQUEE = $08;
- PBM_SETMARQUEE = (WM_USER+10);
-{$endif} //_WIN32_WINNT >= 0x0501
-
-{$ifdef win32vista}
- PBS_SMOOTHREVERSE = $10;
-{$endif}
-
-{$ifdef win32vista}
-
- PBM_GETSTEP = (WM_USER+13);
- PBM_GETBKCOLOR = (WM_USER+14);
- PBM_GETBARCOLOR = (WM_USER+15);
- PBM_SETSTATE = (WM_USER+16); // wParam = PBST_[State] (NORMAL, ERROR, PAUSED)
- PBM_GETSTATE = (WM_USER+17);
-
- PBST_NORMAL = $0001;
- PBST_ERROR = $0002;
- PBST_PAUSED = $0003;
-{$endif}
-
-// end_r_commctrl
-
-
-{$ENDIF} // NOPROGRESS
-
-
-//====== HOTKEY CONTROL =======================================================
-
-{$IFNDEF NOHOTKEY}
- HOTKEYF_SHIFT = $01;
- HOTKEYF_CONTROL = $02;
- HOTKEYF_ALT = $04;
-{$IFDEF _MAC}
- HOTKEYF_EXT = $80;
-{$ELSE}
- HOTKEYF_EXT = $08;
-{$ENDIF}
- HKCOMB_NONE = $0001;
- HKCOMB_S = $0002;
- HKCOMB_C = $0004;
- HKCOMB_A = $0008;
- HKCOMB_SC = $0010;
- HKCOMB_SA = $0020;
- HKCOMB_CA = $0040;
- HKCOMB_SCA = $0080;
-
- HKM_SETHOTKEY = (WM_USER+1);
- HKM_GETHOTKEY = (WM_USER+2);
- HKM_SETRULES = (WM_USER+3);
-
-{$IFDEF _WIN32}
- HOTKEY_CLASSA = 'msctls_hotkey32';
- HOTKEY_CLASSW = widestring('msctls_hotkey32');
-{$IFDEF UNICODE}
- HOTKEY_CLASS = HOTKEY_CLASSW;
-{$ELSE}
- HOTKEY_CLASS = HOTKEY_CLASSA;
-{$ENDIF}
-{$ELSE}
- HOTKEY_CLASS = 'msctls_hotkey';
-{$ENDIF}
-
-{$ENDIF} // NOHOTKEY
- HOTKEYCLASS = HOTKEY_CLASSA;
-
-// begin_r_commctrl
-
-//====== COMMON CONTROL STYLES ================================================
-
- CCS_TOP = DWORD($00000001){L};
- CCS_NOMOVEY = DWORD($00000002){L};
- CCS_BOTTOM = DWORD($00000003){L};
- CCS_NORESIZE = DWORD($00000004){L};
- CCS_NOPARENTALIGN = DWORD($00000008){L};
- CCS_ADJUSTABLE = DWORD($00000020){L};
- CCS_NODIVIDER = DWORD($00000040){L};
-{$ifdef ie3plus}
- CCS_VERT = DWORD($00000080){L};
- CCS_LEFT = (CCS_VERT OR CCS_TOP);
- CCS_RIGHT = (CCS_VERT OR CCS_BOTTOM);
- CCS_NOMOVEX = (CCS_VERT OR CCS_NOMOVEY);
-{$ENDIF}
-
-// end_r_commctrl
-
-//====== LISTVIEW CONTROL =====================================================
-
-{$IFNDEF NOLISTVIEW}
-
-{$IFDEF _WIN32}
- WC_LISTVIEWA = 'SysListView32';
- WC_LISTVIEWW = {L}'SysListView32';
-{$IFDEF UNICODE}
- WC_LISTVIEW = WC_LISTVIEWW;
-{$ELSE}
- WC_LISTVIEW = WC_LISTVIEWA;
-{$ENDIF}
-{$ELSE}
- WC_LISTVIEW = 'SysListView';
-{$ENDIF}
-
-// begin_r_commctrl
-
- LVS_ICON = $0000;
- LVS_REPORT = $0001;
- LVS_SMALLICON = $0002;
- LVS_LIST = $0003;
- LVS_TYPEMASK = $0003;
- LVS_SINGLESEL = $0004;
- LVS_SHOWSELALWAYS = $0008;
- LVS_SORTASCENDING = $0010;
- LVS_SORTDESCENDING = $0020;
- LVS_SHAREIMAGELISTS = $0040;
- LVS_NOLABELWRAP = $0080;
- LVS_AUTOARRANGE = $0100;
- LVS_EDITLABELS = $0200;
-{$ifdef ie3plus}
- LVS_OWNERDATA = $1000;
-{$ENDIF}
- LVS_NOSCROLL = $2000;
-
- LVS_TYPESTYLEMASK = $fc00;
-
- LVS_ALIGNTOP = $0000;
- LVS_ALIGNLEFT = $0800;
- LVS_ALIGNMASK = $0c00;
-
- LVS_OWNERDRAWFIXED = $0400;
- LVS_NOCOLUMNHEADER = $4000;
- LVS_NOSORTHEADER = $8000;
-
-// end_r_commctrl
-
-{$ifdef ie4plus}
- LVM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT;
-
-// Macro 38
-Function ListView_SetUnicodeFormat( hwnd : hwnd; fUnicode : WPARAM):BOOL;
-
-CONST
- LVM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT;
-
-// Macro 39
-Function ListView_GetUnicodeFormat( hwnd : hwnd):BOOL;
-
-{$ENDIF}
-CONST
- LVM_GETBKCOLOR = (LVM_FIRST + 0);
-
-// Macro 40
-Function ListView_GetBkColor( hwnd : hwnd):COLORREF;
-
-CONST
- LVM_SETBKCOLOR = (LVM_FIRST + 1);
-
-// Macro 41
-Function ListView_SetBkColor( hwnd : hwnd; clrBk : COLORREF):BOOL;
-
-CONST
- LVM_GETIMAGELIST = (LVM_FIRST + 2);
-
-// Macro 42
-Function ListView_GetImageList( hwnd : hwnd; iImageList : CINT):HIMAGELIST;
-
-CONST
- LVSIL_NORMAL = 0;
- LVSIL_SMALL = 1;
- LVSIL_STATE = 2;
- LVSIL_GROUPHEADER = 3;
- LVM_SETIMAGELIST = (LVM_FIRST + 3);
-
-// Macro 43
-Function ListView_SetImageList( hwnd : hwnd; himl : HIMAGELIST; iImageList : WPARAM):HIMAGELIST;
-
-CONST
- LVM_GETITEMCOUNT = (LVM_FIRST + 4);
-
-// Macro 44
-Function ListView_GetItemCount( hwnd : hwnd):cint;
-
-CONST
- LVIF_TEXT = $0001;
- LVIF_IMAGE = $0002;
- LVIF_PARAM = $0004;
- LVIF_STATE = $0008;
-{$ifdef ie3plus}
- LVIF_INDENT = $0010;
- LVIF_NORECOMPUTE = $0800;
-{$ENDIF}
-{$ifdef win32xp}
- LVIF_GROUPID = $0100;
- LVIF_COLUMNS = $0200;
-{$ENDIF}
-{$ifdef win32vista}
- LVIF_COLFMT = $00010000; // The piColFmt member is valid in addition to puColumns
-{$endif}
-
- LVIS_FOCUSED = $0001;
- LVIS_SELECTED = $0002;
- LVIS_CUT = $0004;
- LVIS_DROPHILITED = $0008;
- LVIS_GLOW = $0010;
- LVIS_ACTIVATING = $0020;
-
- LVIS_OVERLAYMASK = $0F00;
- LVIS_STATEIMAGEMASK = $F000;
-
-// Macro 45
-// #define INDEXTOSTATEIMAGEMASK(i) ((i) << 12)
-
-
-CONST
- I_INDENTCALLBACK = (-1);
-{$ENDIF}
-
-
-{$ifdef win32xp}
-
-CONST
- I_GROUPIDCALLBACK = (-1);
- I_GROUPIDNONE = (-2);
-{$ENDIF}
-
-
-// #define LVITEMA_V1_SIZE CCSIZEOF_STRUCT(LVITEMA, lParam)
-// #define LVITEMW_V1_SIZE CCSIZEOF_STRUCT(LVITEMW, lParam)
-
-TYPE
- tagLVITEMA = Record
- mask : UINT;
- iItem : cint;
- iSubItem : cint;
- state : UINT;
- stateMask : UINT;
- pszText : LPSTR;
- cchTextMax : cint;
- iImage : cint;
- lParam : LPARAM;
-{$ifdef ie3plus}
- iIndent : cint;
-{$ENDIF}
-{$ifdef win32xp}
- iGroupId : cint;
- cColumns : UINT; // tile view columns
- puColumns : PUINT;
-{$ENDIF}
-{$ifdef win32vista}
- piColFmt : pcint;
- iGroup : cint; // readonly. only valid for owner data.
-{$endif}
- END;
- LVITEMA = tagLVITEMA;
- LPLVITEMA = ^tagLVITEMA;
- TLVITEMA = tagLVITEMA;
- PLVITEMA = ^tagLVITEMA;
-
-
- tagLVITEMW = Record
- mask : UINT;
- iItem : cint;
- iSubItem : cint;
- state : UINT;
- stateMask : UINT;
- pszText : LPWSTR;
- cchTextMax : cint;
- iImage : cint;
- lParam : LPARAM;
-{$ifdef ie3plus}
- iIndent : cint;
-{$ENDIF}
-{$ifdef win32xp}
- iGroupId : cint;
- cColumns : UINT; // tile view columns
- puColumns : PUINT;
-{$ENDIF}
-{$ifdef win32vista}
- piColFmt : pcint;
- iGroup : cint; // readonly. only valid for owner data.
-{$endif}
- END;
-
- LVITEMW = tagLVITEMW;
- LPLVITEMW = ^tagLVITEMW;
- TLVITEMW = tagLVITEMW;
- PLVITEMW = ^tagLVITEMW;
-
-{$IFDEF UNICODE}
- LVITEM = LVITEMW;
- LPLVITEM = LPLVITEMW;
-
-// LVITEM_V1_SIZE = LVITEMW_V1_SIZE;
-{$ELSE}
-
-TYPE
- LVITEM = LVITEMA;
- LPLVITEM = LPLVITEMA;
-
-// LVITEM_V1_SIZE = LVITEMA_V1_SIZE;
-{$ENDIF}
-
-Type
-{$ifdef ie3plus}
-
- LV_ITEMA = LVITEMA;
- LV_ITEMW = LVITEMW;
-{$ELSE}
-
- tagLVITEMA = _LV_ITEMA;
- LVITEMA = LV_ITEMA;
- tagLVITEMW = _LV_ITEMW;
- LVITEMW = LV_ITEMW;
-{$ENDIF}
- LV_ITEM = LVITEM;
- TLVItem = LVITEM;
- PLVItem = LPLVITEM;
- TLV_ITEM = LVITEM;
- PLV_ITEM = PLVITEM;
-CONST
- LPSTR_TEXTCALLBACKW = LPWSTR(-1);
- LPSTR_TEXTCALLBACKA = LPSTR (-1);
-{$IFDEF UNICODE}
- LPSTR_TEXTCALLBACK = LPSTR_TEXTCALLBACKW;
-{$ELSE}
- LPSTR_TEXTCALLBACK = LPSTR_TEXTCALLBACKA;
-{$ENDIF}
-
-
-CONST
- I_IMAGECALLBACK = (-1);
-{$ifdef ie501plus}
- I_IMAGENONE = (-2);
-{$ENDIF} // 0x0501
-
-{$ifdef win32xp}
-// For tileview
- I_COLUMNSCALLBACK = UINT(-1);
-{$ENDIF}
-
- LVM_GETITEMA = (LVM_FIRST + 5);
- LVM_GETITEMW = (LVM_FIRST + 75);
-
-{$IFDEF UNICODE}
- LVM_GETITEM = LVM_GETITEMW;
-{$ELSE}
- LVM_GETITEM = LVM_GETITEMA;
-{$ENDIF}
-
-// Macro 46
-Function ListView_GetItem( hwnd : hwnd;var pitem : LV_ITEM ):BOOL;
-
-CONST
- LVM_SETITEMA = (LVM_FIRST + 6);
- LVM_SETITEMW = (LVM_FIRST + 76);
-
-{$IFDEF UNICODE}
- LVM_SETITEM = LVM_SETITEMW;
-{$ELSE}
- LVM_SETITEM = LVM_SETITEMA;
-{$ENDIF}
-
-// Macro 47
-Function ListView_SetItem( hwnd : hwnd;const pitem : LV_ITEM ):BOOL;
-
-
-CONST
- LVM_INSERTITEMA = (LVM_FIRST + 7);
- LVM_INSERTITEMW = (LVM_FIRST + 77);
-{$IFDEF UNICODE}
- LVM_INSERTITEM = LVM_INSERTITEMW;
-{$ELSE}
- LVM_INSERTITEM = LVM_INSERTITEMA;
-{$ENDIF}
-
-// Macro 48
-Function ListView_InsertItem( hwnd : hwnd;Const pitem : LV_ITEM ):cint;
-
-CONST
- LVM_DELETEITEM = (LVM_FIRST + 8);
-
-// Macro 49
-Function ListView_DeleteItem( hwnd : hwnd; i : cint):BOOL;
-
-CONST
- LVM_DELETEALLITEMS = (LVM_FIRST + 9);
-
-// Macro 50
-Function ListView_DeleteAllItems( hwnd : hwnd):BOOL;
-
-CONST
- LVM_GETCALLBACKMASK = (LVM_FIRST + 10);
-
-// Macro 51
-Function ListView_GetCallbackMask( hwnd : hwnd):BOOL;
-
-
-CONST
- LVM_SETCALLBACKMASK = (LVM_FIRST + 11);
-
-// Macro 52
-Function ListView_SetCallbackMask( hwnd : hwnd; mask : UINT):BOOL;
-
-
-CONST
- LVNI_ALL = $0000;
- LVNI_FOCUSED = $0001;
- LVNI_SELECTED = $0002;
- LVNI_CUT = $0004;
- LVNI_DROPHILITED = $0008;
-
- LVNI_ABOVE = $0100;
- LVNI_BELOW = $0200;
- LVNI_TOLEFT = $0400;
- LVNI_TORIGHT = $0800;
-
-
- LVM_GETNEXTITEM = (LVM_FIRST + 12);
-
-// Macro 53
-Function ListView_GetNextItem( hwnd : hwnd; i : cint; flags : cint ):cint;
-
-CONST
- LVFI_PARAM = $0001;
- LVFI_STRING = $0002;
- LVFI_PARTIAL = $0008;
- LVFI_WRAP = $0020;
- LVFI_NEARESTXY = $0040;
-
-
-TYPE
-
- tagLVFINDINFOA = Record
- flags : UINT;
- psz : LPCSTR;
- lParam : LPARAM;
- pt : POINT;
- vkDirection : UINT;
- END;
- LVFINDINFOA = tagLVFINDINFOA;
- LPFINDINFOA = ^tagLVFINDINFOA;
- TLVFINDINFOA = tagLVFINDINFOA;
- PLVFINDINFOA = ^tagLVFINDINFOA;
-
-
- tagLVFINDINFOW = Record
- flags : UINT;
- psz : LPCWSTR;
- lParam : LPARAM;
- pt : POINT;
- vkDirection : UINT;
- END;
- LVFINDINFOW = tagLVFINDINFOW;
- LPFINDINFOW = ^tagLVFINDINFOW;
- TLVFINDINFOW = tagLVFINDINFOW;
- PLVFINDINFOW = ^tagLVFINDINFOW;
-
-{$IFDEF UNICODE}
- LVFINDINFO = LVFINDINFOW;
-{$ELSE}
- LVFINDINFO = LVFINDINFOA;
-{$ENDIF}
-
-{$ifdef ie3plus}
- LV_FINDINFOA = LVFINDINFOA;
- LV_FINDINFOW = LVFINDINFOW;
-{$ELSE}
- tagLVFINDINFOA = _LV_FINDINFOA;
- LVFINDINFOA = LV_FINDINFOA;
- tagLVFINDINFOW = _LV_FINDINFOW;
- LVFINDINFOW = LV_FINDINFOW;
-{$ENDIF}
-
- TLVFindInfo = LVFINDINFO;
- PLVFindInfo = ^LVFindInfo;
-
- LV_FINDINFO = LVFINDINFO;
-
-CONST
- LVM_FINDITEMA = (LVM_FIRST + 13);
- LVM_FINDITEMW = (LVM_FIRST + 83);
-{$IFDEF UNICODE}
- LVM_FINDITEM = LVM_FINDITEMW;
-{$ELSE}
- LVM_FINDITEM = LVM_FINDITEMA;
-{$ENDIF}
-
-// Macro 54
-Function ListView_FindItem( hwnd : hwnd; iStart : cint;const plvfi : LV_FINDINFO ):cint;
-
-CONST
- LVIR_BOUNDS = 0;
- LVIR_ICON = 1;
- LVIR_LABEL = 2;
- LVIR_SELECTBOUNDS = 3;
-
-
- LVM_GETITEMRECT = (LVM_FIRST + 14);
-
-// Macro 55 NI
-Function ListView_GetItemRect( hwnd : hwnd; i : cint;var prc : TRect;code : cint):BOOL;
-
-CONST
- LVM_SETITEMPOSITION = (LVM_FIRST + 15);
-
-// Macro 56
-Function ListView_SetItemPosition( hwndLV : hwnd; i : cint; x : cint ; y : cint ):BOOL;
-
-CONST
- LVM_GETITEMPOSITION = (LVM_FIRST + 16);
-
-// Macro 57
-Function ListView_GetItemPosition( hwndLV : hwnd; i : cint;var ppt : POINT ):BOOL;
-
-CONST
- LVM_GETSTRINGWIDTHA = (LVM_FIRST + 17);
- LVM_GETSTRINGWIDTHW = (LVM_FIRST + 87);
-{$IFDEF UNICODE}
- LVM_GETSTRINGWIDTH = LVM_GETSTRINGWIDTHW;
-{$ELSE}
- LVM_GETSTRINGWIDTH = LVM_GETSTRINGWIDTHA;
-{$ENDIF}
-
-// Macro 58
-Function ListView_GetStringWidth( hwndLV : hwnd; psz : LPCTSTR):cint;
-
-CONST
- LVHT_NOWHERE = $0001;
- LVHT_ONITEMICON = $0002;
- LVHT_ONITEMLABEL = $0004;
- LVHT_ONITEMSTATEICON = $0008;
- LVHT_ONITEM = (LVHT_ONITEMICON OR LVHT_ONITEMLABEL OR LVHT_ONITEMSTATEICON);
-
- LVHT_ABOVE = $0008;
- LVHT_BELOW = $0010;
- LVHT_TORIGHT = $0020;
- LVHT_TOLEFT = $0040;
-
-
-
-// #define LVHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(LVHITTESTINFO, iItem)
-
-TYPE
-
- tagLVHITTESTINFO = Record
- pt : POINT;
- flags : UINT;
- iItem : cint;
-{$ifdef ie3plus}
- iSubItem : cint; // this is was NOT in win95. valid only for LVM_SUBITEMHITTEST
-{$ENDIF}
-{$ifdef win32vista}
- iGroup : cint; // readonly. index of group. only valid for owner data.
- // supports single item in multiple groups.
-{$endif}
- END;
- LVHITTESTINFO = tagLVHITTESTINFO;
- LPLVHITTESTINFO = ^tagLVHITTESTINFO;
- TLVHITTESTINFO = tagLVHITTESTINFO;
- PLVHITTESTINFO = ^tagLVHITTESTINFO;
-
-{$ifdef ie3plus}
- LV_HITTESTINFO = LVHITTESTINFO;
-{$ELSE}
- tagLVHITTESTINFO = _LV_HITTESTINFO;
- LVHITTESTINFO = LV_HITTESTINFO;
-{$ENDIF}
-
-CONST
- LVM_HITTEST = (LVM_FIRST + 18);
-
-// Macro 59
-Function ListView_HitTest( hwndLV : hwnd;var pinfo : LV_HITTESTINFO ):cint;
-
-CONST
- LVM_ENSUREVISIBLE = (LVM_FIRST + 19);
-
-// Macro 60
-Function ListView_EnsureVisible( hwndLV : hwnd; i : cint; fPartialOK : cint ):BOOL;inline;
-Function ListView_EnsureVisible( hwndLV : hwnd; i : cint; fPartialOK : BOOL ):BOOL;inline;
-
-CONST
- LVM_SCROLL = (LVM_FIRST + 20);
-
-// Macro 61
-Function ListView_Scroll( hwndLV : hwnd; dx : cint; dy : cint):BOOL;
-
-CONST
- LVM_REDRAWITEMS = (LVM_FIRST + 21);
-
-// Macro 62
-Function ListView_RedrawItems( hwndLV : hwnd; iFirst : cint; iLast : cint):BOOL;
-
-CONST
- LVA_DEFAULT = $0000;
- LVA_ALIGNLEFT = $0001;
- LVA_ALIGNTOP = $0002;
- LVA_ALIGNRIGHT = $0003;
- LVA_ALIGNBOTTOM = $0004;
- LVA_SNAPTOGRID = $0005;
- LVA_SORTASCENDING = $0100;
- LVA_SORTDESCENDING = $0200;
- LVM_ARRANGE = (LVM_FIRST + 22);
-
-// Macro 63
-Function ListView_Arrange( hwndLV : hwnd; code : UINT):BOOL;
-
-CONST
- LVM_EDITLABELA = (LVM_FIRST + 23);
- LVM_EDITLABELW = (LVM_FIRST + 118);
-{$IFDEF UNICODE}
-
- LVM_EDITLABEL = LVM_EDITLABELW;
-{$ELSE}
- LVM_EDITLABEL = LVM_EDITLABELA;
-{$ENDIF}
-
-// Macro 64
-Function ListView_EditLabel( hwndLV : hwnd; i : cint):HWND;
-
-CONST
- LVM_GETEDITCONTROL = (LVM_FIRST + 24);
-
-// Macro 65
-Function ListView_GetEditControl( hwndLV : hwnd):HWND;
-
-
-// #define LVCOLUMNA_V1_SIZE CCSIZEOF_STRUCT(LVCOLUMNA, iSubItem)
-// #define LVCOLUMNW_V1_SIZE CCSIZEOF_STRUCT(LVCOLUMNW, iSubItem)
-
-TYPE
-
- tagLVCOLUMNA = Record
- mask : UINT;
- fmt : cint;
- cx : cint;
- pszText : LPSTR;
- cchTextMax : cint;
- iSubItem : cint;
-{$ifdef ie3plus}
- iImage : cint;
- iOrder : cint;
-{$ENDIF}
-{$ifdef win32vista}
- cxmin : cint; // min snap point
- cxDefault : cint; // default snap point
- cxIdeal : cint; // read only. ideal may not eqaul current width if auto sized (LVS_EX_AUTOSIZECOLUMNS) to a lesser width.
-{$endif}
- END;
- LVCOLUMNA = tagLVCOLUMNA;
- LPLVCOLUMNA = ^tagLVCOLUMNA;
- TLVCOLUMNA = tagLVCOLUMNA;
- PLVCOLUMNA = ^tagLVCOLUMNA;
-
-
- tagLVCOLUMNW = Record
- mask : UINT;
- fmt : cint;
- cx : cint;
- pszText : LPWSTR;
- cchTextMax : cint;
- iSubItem : cint;
-{$ifdef ie3plus}
- iImage : cint;
- iOrder : cint;
-{$ENDIF}
-{$ifdef win32vista}
- cxmin : cint; // min snap point
- cxDefault : cint; // default snap point
- cxIdeal : cint; // read only. ideal may not eqaul current width if auto sized (LVS_EX_AUTOSIZECOLUMNS) to a lesser width.
-{$endif}
- END;
- LVCOLUMNW = tagLVCOLUMNW;
- LPLVCOLUMNW = ^tagLVCOLUMNW;
- TLVCOLUMNW = tagLVCOLUMNW;
- PLVCOLUMNW = ^tagLVCOLUMNW;
-
-
-{$IFDEF UNICODE}
- LVCOLUMN = LVCOLUMNW;
- LPLVCOLUMN = LPLVCOLUMNW;
-// LVCOLUMN_V1_SIZE = LVCOLUMNW_V1_SIZE;
-{$ELSE}
- LVCOLUMN = LVCOLUMNA;
- LPLVCOLUMN = LPLVCOLUMNA;
-// LVCOLUMN_V1_SIZE = LVCOLUMNA_V1_SIZE;
-{$ENDIF}
-
-{$ifdef ie3plus}
- LV_COLUMNA = LVCOLUMNA;
- LV_COLUMNW = LVCOLUMNW;
-{$ELSE}
- tagLVCOLUMNA = _LV_COLUMNA;
- LVCOLUMNA = LV_COLUMNA;
- tagLVCOLUMNW = _LV_COLUMNW;
- LVCOLUMNW = LV_COLUMNW;
-{$ENDIF}
-
-
- LV_COLUMN = LVCOLUMN;
- TLVColumn = LVCOLUMN;
- PLVColumn = LPLVCOLUMN;
-
-CONST
- LVCF_FMT = $0001;
- LVCF_WIDTH = $0002;
- LVCF_TEXT = $0004;
- LVCF_SUBITEM = $0008;
-{$ifdef ie3plus}
- LVCF_IMAGE = $0010;
- LVCF_ORDER = $0020;
-{$ENDIF}
-{$ifdef win32vista}
- LVCF_MINWIDTH = $0040;
- LVCF_DEFAULTWIDTH = $0080;
- LVCF_IDEALWIDTH = $0100;
-{$endif}
-
- LVCFMT_LEFT = $0000;
- LVCFMT_RIGHT = $0001;
- LVCFMT_CENTER = $0002;
- LVCFMT_JUSTIFYMASK = $0003;
-
-{$ifdef ie3plus}
- LVCFMT_IMAGE = $0800;
- LVCFMT_BITMAP_ON_RIGHT = $1000;
- LVCFMT_COL_HAS_IMAGES = $8000;
-{$ENDIF}
-{$ifdef win32vista}
- LVCFMT_FIXED_WIDTH = $00100; // Can't resize the column; same as HDF_FIXEDWIDTH
- LVCFMT_NO_DPI_SCALE = $40000; // If not set, CCM_DPISCALE will govern scaling up fixed width
- LVCFMT_FIXED_RATIO = $80000; // Width will augment with the row height
-{$endif}
-
- LVM_GETCOLUMNA = (LVM_FIRST + 25);
- LVM_GETCOLUMNW = (LVM_FIRST + 95);
-{$IFDEF UNICODE}
- LVM_GETCOLUMN = LVM_GETCOLUMNW;
-{$ELSE}
- LVM_GETCOLUMN = LVM_GETCOLUMNA;
-{$ENDIF}
-
-// Macro 66
-Function ListView_GetColumn( hwnd : hwnd; iCol : cint;var pcol : LV_COLUMN ):BOOL;
-
-CONST
- LVM_SETCOLUMNA = (LVM_FIRST + 26);
- LVM_SETCOLUMNW = (LVM_FIRST + 96);
-{$IFDEF UNICODE}
- LVM_SETCOLUMN = LVM_SETCOLUMNW;
-{$ELSE}
- LVM_SETCOLUMN = LVM_SETCOLUMNA;
-{$ENDIF}
-
-// Macro 67
-Function ListView_SetColumn( hwnd : hwnd; iCol : cint;Const pcol : LV_COLUMN ):BOOL;
-
-CONST
- LVM_INSERTCOLUMNA = (LVM_FIRST + 27);
- LVM_INSERTCOLUMNW = (LVM_FIRST + 97);
-
-{$IFDEF UNICODE} // was already not active (spaces) in .h
-// # define LVM_INSERTCOLUMN LVM_INSERTCOLUMNW
-{$ELSE}
-// # define LVM_INSERTCOLUMN LVM_INSERTCOLUMNA
-{$ENDIF}
-
-// Macro 68
-Function ListView_InsertColumn( hwnd : hwnd; iCol : cint;Const pcol : LV_COLUMN ):cint;
-
-CONST
- LVM_DELETECOLUMN = (LVM_FIRST + 28);
-
-// Macro 69
-Function ListView_DeleteColumn( hwnd : hwnd; iCol : cint):BOOL;
-
-CONST
- LVM_GETCOLUMNWIDTH = (LVM_FIRST + 29);
-
-// Macro 70
-Function ListView_GetColumnWidth( hwnd : hwnd; iCol : cint):cint;
-
-CONST
- LVSCW_AUTOSIZE = -1;
- LVSCW_AUTOSIZE_USEHEADER = -2;
- LVM_SETCOLUMNWIDTH = (LVM_FIRST + 30);
-
-// Macro 71
-Function ListView_SetColumnWidth( hwnd : hwnd; iCol : cint; cx : cint ):BOOL;
-
-
-{$ifdef ie3plus}
-
-CONST
- LVM_GETHEADER = (LVM_FIRST + 31);
-
-// Macro 72
-Function ListView_GetHeader( hwnd : hwnd):HWND;
-
-{$ENDIF}
-
-CONST
- LVM_CREATEDRAGIMAGE = (LVM_FIRST + 33);
-
-// Macro 73
-Function ListView_CreateDragImage( hwnd : hwnd; i : cint; lpptUpLeft : LPPOINT):HIMAGELIST;inline;
-Function ListView_CreateDragImage( hwnd : hwnd; i : cint; const lpptUpLeft : POINT):HIMAGELIST;inline;
-
-CONST
- LVM_GETVIEWRECT = (LVM_FIRST + 34);
-
-// Macro 74
-Function ListView_GetViewRect( hwnd : hwnd;var prc : RECT ):BOOL;
-
-CONST
- LVM_GETTEXTCOLOR = (LVM_FIRST + 35);
-
-// Macro 75
-Function ListView_GetTextColor( hwnd : hwnd):COLORREF;
-
-CONST
- LVM_SETTEXTCOLOR = (LVM_FIRST + 36);
-
-// Macro 76
-Function ListView_SetTextColor( hwnd : hwnd; clrText : COLORREF):BOOL;
-
-CONST
- LVM_GETTEXTBKCOLOR = (LVM_FIRST + 37);
-
-// Macro 77
-Function ListView_GetTextBkColor( hwnd : hwnd):COLORREF;
-
-CONST
- LVM_SETTEXTBKCOLOR = (LVM_FIRST + 38);
-
-// Macro 78
-Function ListView_SetTextBkColor( hwnd : hwnd; clrTextBk : COLORREF):BOOL;
-
-
-CONST
- LVM_GETTOPINDEX = (LVM_FIRST + 39);
-
-// Macro 79
-Function ListView_GetTopIndex( hwndLV : hwnd):cint;
-
-CONST
- LVM_GETCOUNTPERPAGE = (LVM_FIRST + 40);
-
-// Macro 80
-Function ListView_GetCountPerPage( hwndLV : hwnd):cint;
-
-CONST
- LVM_GETORIGIN = (LVM_FIRST + 41);
-
-// Macro 81
-Function ListView_GetOrigin( hwndLV : hwnd;var ppt : POINT ):BOOL;
-
-CONST
- LVM_UPDATE = (LVM_FIRST + 42);
-
-// Macro 82
-Function ListView_Update( hwndLV : hwnd; i : WPARAM):BOOL;
-
-CONST
- LVM_SETITEMSTATE = (LVM_FIRST + 43);
-
-// Macro 83
-Procedure ListView_SetItemState(hwndLV :hwnd; i :cint ;data,mask:UINT);
-
-{$ifdef ie3plus}
-// Macro 84
-Procedure ListView_SetCheckState( hwndLV : hwnd; i : cint ; fCheck : bool );
-
-{$ENDIF}
-
-
-CONST
- LVM_GETITEMSTATE = (LVM_FIRST + 44);
-
-// Macro 85
-Function ListView_GetItemState( hwndLV : hwnd; i : WPARAM; mask : LPARAM):UINT;
-
-
-{$ifdef ie3plus}
-
-// Macro 86
-Function ListView_GetCheckState( hwndLV : hwnd; i : WPARAM):UINT;
-
-{$ENDIF}
-
-CONST
- LVM_GETITEMTEXTA = (LVM_FIRST + 45);
- LVM_GETITEMTEXTW = (LVM_FIRST + 115);
-
-{$IFDEF UNICODE}
- LVM_GETITEMTEXT = LVM_GETITEMTEXTW;
-{$ELSE}
- LVM_GETITEMTEXT = LVM_GETITEMTEXTA;
-{$ENDIF}
-
-// Macro 87
-Procedure ListView_GetItemText(hwndLV:hwnd; i : WPARAM ;iSubItem : cint ;pszText : Pointer;cchTextMax :cint);
-
-CONST
- LVM_SETITEMTEXTA = (LVM_FIRST + 46);
- LVM_SETITEMTEXTW = (LVM_FIRST + 116);
-
-{$IFDEF UNICODE}
- LVM_SETITEMTEXT = LVM_SETITEMTEXTW;
-{$ELSE}
- LVM_SETITEMTEXT = LVM_SETITEMTEXTA;
-{$ENDIF}
-
-// Macro 88
-Procedure ListView_SetItemText(hwndLV:hwnd; i : WPARAM ;iSubItem : cint ;pszText : Pointer);
-
-{$ifdef ie3plus}
-// these flags only apply to LVS_OWNERDATA listviews in report or list mode
-
-CONST
- LVSICF_NOINVALIDATEALL = $00000001;
- LVSICF_NOSCROLL = $00000002;
-{$ENDIF}
-
- LVM_SETITEMCOUNT = (LVM_FIRST + 47);
-
-// Macro 89
-Procedure ListView_SetItemCount( hwndLV : hwnd; cItems : WPARAM);
-
-{$ifdef ie3plus}
-
-// Macro 90
-Procedure ListView_SetItemCountEx( hwndLV : hwnd; cItems : WPARAM; dwFlags : LPARAM);
-
-{$ENDIF}
-
-TYPE
- PFNLVCOMPARE=Function(a,b,c:LPARAM):cint;
- TLVCompare = PFNLVCOMPARE;
-
-CONST
- LVM_SORTITEMS = (LVM_FIRST + 48);
-
-// Macro 91
-Function ListView_SortItems( hwndLV : hwnd;pfnCompare : PFNLVCOMPARE; lPrm : LPARAM):BOOL;
-
-CONST
- LVM_SETITEMPOSITION32 = (LVM_FIRST + 49);
-
-// Macro 92
-Procedure ListView_SetItemPosition32(hwndLV:hwnd; i:cint;x0,y0:long);
-
-CONST
- LVM_GETSELECTEDCOUNT = (LVM_FIRST + 50);
-
-// Macro 93
-Function ListView_GetSelectedCount( hwndLV : hwnd):UINT;
-
-CONST
- LVM_GETITEMSPACING = (LVM_FIRST + 51);
-
-// Macro 94
-Function ListView_GetItemSpacing( hwndLV : hwnd; fSmall : cint ):DWORD;
-
-CONST
- LVM_GETISEARCHSTRINGA = (LVM_FIRST + 52);
- LVM_GETISEARCHSTRINGW = (LVM_FIRST + 117);
-
-{$IFDEF UNICODE}
- LVM_GETISEARCHSTRING = LVM_GETISEARCHSTRINGW;
-{$ELSE}
- LVM_GETISEARCHSTRING = LVM_GETISEARCHSTRINGA;
-{$ENDIF}
-
-// Macro 95
-Function ListView_GetISearchString( hwndLV : hwnd; lpsz : LPTSTR):BOOL;
-
-
-{$ifdef ie3plus}
-
-CONST
- LVM_SETICONSPACING = (LVM_FIRST + 53);
-// -1 for cx and cy means we'll use the default (system settings)
-// 0 for cx or cy means use the current setting (allows you to change just one param)
-
-// Macro 96
-Function ListView_SetIconSpacing( hwndLV : hwnd; cx, cy : cint ):DWORD;
-
-CONST
- LVM_SETEXTENDEDLISTVIEWSTYLE = (LVM_FIRST + 54); // optional wParam == mask
-
-// Macro 97
-Function ListView_SetExtendedListViewStyle( hwndLV : hwnd; dw : cint ):DWORD;
-
-{$ifdef ie4plus}
-
-// Macro 98
-Function ListView_SetExtendedListViewStyleEx( hwndLV : hwnd; dwMask, dw : cint ):DWORD;
-
-{$ENDIF}
-
-CONST
- LVM_GETEXTENDEDLISTVIEWSTYLE = (LVM_FIRST + 55);
-
-// Macro 99
-Function ListView_GetExtendedListViewStyle( hwndLV : hwnd):DWORD;
-
-CONST
- LVS_EX_GRIDLINES = $00000001;
- LVS_EX_SUBITEMIMAGES = $00000002;
- LVS_EX_CHECKBOXES = $00000004;
- LVS_EX_TRACKSELECT = $00000008;
- LVS_EX_HEADERDRAGDROP = $00000010;
- LVS_EX_FULLROWSELECT = $00000020; // applies to report mode only
- LVS_EX_ONECLICKACTIVATE = $00000040;
- LVS_EX_TWOCLICKACTIVATE = $00000080;
-{$ifdef ie4plus}
- LVS_EX_FLATSB = $00000100;
- LVS_EX_REGIONAL = $00000200;
- LVS_EX_INFOTIP = $00000400; // listview does InfoTips for you
- LVS_EX_UNDERLINEHOT = $00000800;
- LVS_EX_UNDERLINECOLD = $00001000;
- LVS_EX_MULTIWORKAREAS = $00002000;
-{$ENDIF}
-{$ifdef ie5plus}
- LVS_EX_LABELTIP = $00004000; // listview unfolds partly hidden labels if it does not have infotip text
- LVS_EX_BORDERSELECT = $00008000; // border selection style instead of highlight
-{$ENDIF} // End (_WIN32_IE >= 0x0500)
-{$ifdef win32xp}
- LVS_EX_DOUBLEBUFFER = $00010000;
- LVS_EX_HIDELABELS = $00020000;
- LVS_EX_SINGLEROW = $00040000;
- LVS_EX_SNAPTOGRID = $00080000; // Icons automatically snap to grid.
- LVS_EX_SIMPLESELECT = $00100000; // Also changes overlay rendering to top right for icon mode.
-{$ENDIF}
-{$ifdef win32vista}
- LVS_EX_JUSTIFYCOLUMNS = $00200000; // Icons are lined up in columns that use up the whole view area.
- LVS_EX_TRANSPARENTBKGND = $00400000; // Background is painted by the parent via WM_PRINTCLIENT
- LVS_EX_TRANSPARENTSHADOWTEXT = $00800000; // Enable shadow text on transparent backgrounds only (useful with bitmaps)
- LVS_EX_AUTOAUTOARRANGE = $01000000; // Icons automatically arrange if no icon positions have been set
- LVS_EX_HEADERINALLVIEWS = $02000000; // Display column header in all view modes
- LVS_EX_AUTOCHECKSELECT = $08000000;
- LVS_EX_AUTOSIZECOLUMNS = $10000000;
- LVS_EX_COLUMNSNAPPOINTS = $40000000;
- LVS_EX_COLUMNOVERFLOW = $80000000;
-{$endif}
-
- LVM_GETSUBITEMRECT = (LVM_FIRST + 56);
-
-// Macro 100
-Function ListView_GetSubItemRect( hwnd : hwnd; iItem : cint;iSubItem, code :cint ;prc:LPRECT):BOOL;
-
-CONST
- LVM_SUBITEMHITTEST = (LVM_FIRST + 57);
-
-// Macro 101
-Function ListView_SubItemHitTest( hwnd : hwnd; plvhti : LPLVHITTESTINFO):cint;
-
-CONST
- LVM_SETCOLUMNORDERARRAY = (LVM_FIRST + 58);
-
-// Macro 102
-Function ListView_SetColumnOrderArray( hwnd : hwnd; iCount : WPARAM; pi : LPINT):BOOL;
-
-CONST
- LVM_GETCOLUMNORDERARRAY = (LVM_FIRST + 59);
-
-// Macro 103
-Function ListView_GetColumnOrderArray( hwnd : hwnd; iCount : WPARAM; pi : LPINT):BOOL;
-
-
-CONST
- LVM_SETHOTITEM = (LVM_FIRST + 60);
-
-// Macro 104
-Function ListView_SetHotItem( hwnd : hwnd; i : WPARAM):cint;
-
-CONST
- LVM_GETHOTITEM = (LVM_FIRST + 61);
-
-// Macro 105
-Function ListView_GetHotItem( hwnd : hwnd):cint;
-
-CONST
- LVM_SETHOTCURSOR = (LVM_FIRST + 62);
-
-// Macro 106
-Function ListView_SetHotCursor( hwnd : hwnd; hcur : LPARAM):HCURSOR;
-
-CONST
- LVM_GETHOTCURSOR = (LVM_FIRST + 63);
-
-// Macro 107
-Function ListView_GetHotCursor( hwnd : hwnd):HCURSOR;
-
-CONST
- LVM_APPROXIMATEVIEWRECT = (LVM_FIRST + 64);
-
-// Macro 108
-Function ListView_ApproximateViewRect( hwnd : hwnd; iWidth, iHeight, iCount : cint ):DWORD;
-
-{$ENDIF} // _WIN32_IE >= 0x0300
-
-{$ifdef ie4plus}
-
-CONST
- LV_MAX_WORKAREAS = 16;
- LVM_SETWORKAREAS = (LVM_FIRST + 65);
-
-// Macro 109
-Function ListView_SetWorkAreas( hwnd : hwnd; nWorkAreas : cint;var prc : RECT ):BOOL;inline;
-Function ListView_SetWorkAreas( hwnd : hwnd; nWorkAreas : cint; prc : PRECT ):BOOL;inline;
-
-CONST
- LVM_GETWORKAREAS = (LVM_FIRST + 70);
-
-// Macro 110
-Function ListView_GetWorkAreas( hwnd : hwnd; nWorkAreas : cint;var prc : RECT ):BOOL;
-
-CONST
- LVM_GETNUMBEROFWORKAREAS = (LVM_FIRST + 73);
-
-// Macro 111
-Function ListView_GetNumberOfWorkAreas( hwnd : hwnd;var pnWorkAreas : UINT ):BOOL;
-
-CONST
- LVM_GETSELECTIONMARK = (LVM_FIRST + 66);
-
-// Macro 112
-Function ListView_GetSelectionMark( hwnd : hwnd):cint;
-
-CONST
- LVM_SETSELECTIONMARK = (LVM_FIRST + 67);
-
-// Macro 113
-Function ListView_SetSelectionMark( hwnd : hwnd; i : LPARAM):cint;
-
-CONST
- LVM_SETHOVERTIME = (LVM_FIRST + 71);
-
-// Macro 114
-Function ListView_SetHoverTime( hwndLV : hwnd; dwHoverTimeMs : LPARAM):DWORD;
-
-CONST
- LVM_GETHOVERTIME = (LVM_FIRST + 72);
-
-// Macro 115
-Function ListView_GetHoverTime( hwndLV : hwnd):DWORD;
-
-CONST
- LVM_SETTOOLTIPS = (LVM_FIRST + 74);
-
-// Macro 116
-Function ListView_SetToolTips( hwndLV : hwnd; hwndNewHwnd : WPARAM):HWND;
-
-CONST
- LVM_GETTOOLTIPS = (LVM_FIRST + 78);
-
-// Macro 117
-Function ListView_GetToolTips( hwndLV : hwnd):HWND;
-
-CONST
- LVM_SORTITEMSEX = (LVM_FIRST + 81);
-
-// Macro 118
-Function ListView_SortItemsEx( hwndLV : hwnd; _pfnCompare : PFNLVCOMPARE; _lPrm : LPARAM):BOOL;
-
-TYPE
-
- tagLVBKIMAGEA = Record
- ulFlags : ULONG; // LVBKIF_*
- hbm : HBITMAP;
- pszImage : LPSTR;
- cchImageMax : UINT;
- xOffsetPercent : cint;
- yOffsetPercent : cint;
- END;
- LVBKIMAGEA = tagLVBKIMAGEA;
- LPLVBKIMAGEA = ^tagLVBKIMAGEA;
- TLVBKIMAGEA = tagLVBKIMAGEA;
- PLVBKIMAGEA = ^tagLVBKIMAGEA;
-
- tagLVBKIMAGEW = Record
- ulFlags : ULONG; // LVBKIF_*
- hbm : HBITMAP;
- pszImage : LPWSTR;
- cchImageMax : UINT;
- xOffsetPercent : cint;
- yOffsetPercent : cint;
- END;
- LVBKIMAGEW = tagLVBKIMAGEW;
- LPLVBKIMAGEW = ^tagLVBKIMAGEW;
- TLVBKIMAGEW = tagLVBKIMAGEW;
- PLVBKIMAGEW = ^tagLVBKIMAGEW;
-
-CONST
- LVBKIF_SOURCE_NONE = $00000000;
- LVBKIF_SOURCE_HBITMAP = $00000001;
- LVBKIF_SOURCE_URL = $00000002;
- LVBKIF_SOURCE_MASK = $00000003;
- LVBKIF_STYLE_NORMAL = $00000000;
- LVBKIF_STYLE_TILE = $00000010;
- LVBKIF_STYLE_MASK = $00000010;
-{$ifdef win32xp}
- LVBKIF_FLAG_TILEOFFSET = $00000100;
- LVBKIF_TYPE_WATERMARK = $10000000;
-{$ENDIF}
-
- LVM_SETBKIMAGEA = (LVM_FIRST + 68);
- LVM_SETBKIMAGEW = (LVM_FIRST + 138);
- LVM_GETBKIMAGEA = (LVM_FIRST + 69);
- LVM_GETBKIMAGEW = (LVM_FIRST + 139);
-
-{$ifdef win32xp}
- LVM_SETSELECTEDCOLUMN = (LVM_FIRST + 140);
-
-// Macro 119
-Procedure ListView_SetSelectedColumn( hwnd : hwnd; iCol : WPARAM);
-
-CONST
- LVM_SETTILEWIDTH = (LVM_FIRST + 141);
-
-// Macro 120
-Procedure ListView_SetTileWidth( hwnd : hwnd; cpWidth : WPARAM);
-
-CONST
- LV_VIEW_ICON = $0000;
- LV_VIEW_DETAILS = $0001;
- LV_VIEW_SMALLICON = $0002;
- LV_VIEW_LIST = $0003;
- LV_VIEW_TILE = $0004;
- LV_VIEW_MAX = $0004;
- LVM_SETVIEW = (LVM_FIRST + 142);
-
-// Macro 121
-Function ListView_SetView( hwnd : hwnd; iView : DWORD):DWORD;
-
-CONST
- LVM_GETVIEW = (LVM_FIRST + 143);
-
-// Macro 122
-Function ListView_GetView( hwnd : hwnd):DWORD;
-
-CONST
- LVGF_NONE = $00000000;
- LVGF_HEADER = $00000001;
- LVGF_FOOTER = $00000002;
- LVGF_STATE = $00000004;
- LVGF_ALIGN = $00000008;
- LVGF_GROUPID = $00000010;
-
-{$ifdef win32vista}
- LVGF_SUBTITLE = $00000100; // pszSubtitle is valid
- LVGF_TASK = $00000200; // pszTask is valid
- LVGF_DESCRIPTIONTOP = $00000400; // pszDescriptionTop is valid
- LVGF_DESCRIPTIONBOTTOM = $00000800; // pszDescriptionBottom is valid
- LVGF_TITLEIMAGE = $00001000; // iTitleImage is valid
- LVGF_EXTENDEDIMAGE = $00002000; // iExtendedImage is valid
- LVGF_ITEMS = $00004000; // iFirstItem and cItems are valid
- LVGF_SUBSET = $00008000; // pszSubsetTitle is valid
- LVGF_SUBSETITEMS = $00010000; // readonly, cItems holds count of items in visible subset, iFirstItem is valid
-{$endif}
-
- LVGS_NORMAL = $00000000;
- LVGS_COLLAPSED = $00000001;
- LVGS_HIDDEN = $00000002;
-
- LVGA_HEADER_LEFT = $00000001;
- LVGA_HEADER_CENTER = $00000002;
- LVGA_HEADER_RIGHT = $00000004; // Don't forget to validate exclusivity
- LVGA_FOOTER_LEFT = $00000008;
- LVGA_FOOTER_CENTER = $00000010;
- LVGA_FOOTER_RIGHT = $00000020; // Don't forget to validate exclusivity
-
-TYPE
-
- tagLVGROUP = Record
- cbSize : UINT;
- mask : UINT;
- pszHeader : LPWSTR;
- cchHeader : cint;
- pszFooter : LPWSTR;
- cchFooter : cint;
- iGroupId : cint;
- stateMask : UINT;
- state : UINT;
- uAlign : UINT;
-{$ifdef win32vista}
- pszSubtitle : LPWSTR;
- cchSubtitle : UINT;
- pszTask : LPWSTR;
- cchTask : UINT;
- pszDescriptionTop : LPWSTR;
- cchDescriptionTop : UINT;
- pszDescriptionBottom: LPWSTR;
- cchDescriptionBottom: UINT;
- iTitleImage : cint;
- iExtendedImage : cint;
- iFirstItem : cint; // Read only
- cItems : UINT; // Read only
- pszSubsetTitle : LPWSTR;// NULL if group is not subset
- cchSubsetTitle : UINT;
-{$endif}
- END;
- LVGROUP = tagLVGROUP;
- PLVGROUP = ^tagLVGROUP;
- TLVGROUP = tagLVGROUP;
-
-
-CONST
- LVM_INSERTGROUP = (LVM_FIRST + 145);
-
-// Macro 123
-Procedure ListView_InsertGroup( hwnd : hwnd; index : WPARAM; pgrp : LPARAM);
-
-CONST
- LVM_SETGROUPINFO = (LVM_FIRST + 147);
-
-// Macro 124
-Procedure ListView_SetGroupInfo( hwnd : hwnd; iGroupId : WPARAM; pgrp : LPARAM);
-
-CONST
- LVM_GETGROUPINFO = (LVM_FIRST + 149);
-
-// Macro 125
-Procedure ListView_GetGroupInfo( hwnd : hwnd; iGroupId : WPARAM; pgrp : LPARAM);
-
-CONST
- LVM_REMOVEGROUP = (LVM_FIRST + 150);
-
-// Macro 126
-Procedure ListView_RemoveGroup( hwnd : hwnd; iGroupId : WPARAM);
-
-CONST
- LVM_MOVEGROUP = (LVM_FIRST + 151);
-
-// Macro 127
-Procedure ListView_MoveGroup( hwnd : hwnd; iGroupId : WPARAM; toIndex : LPARAM);
-
-CONST
- LVM_MOVEITEMTOGROUP = (LVM_FIRST + 154);
-
-// Macro 128
-Procedure ListView_MoveItemToGroup( hwnd : hwnd; idItemFrom : WPARAM; idGroupTo : LPARAM);
-
-CONST
- LVGMF_NONE = $00000000;
- LVGMF_BORDERSIZE = $00000001;
- LVGMF_BORDERCOLOR = $00000002;
- LVGMF_TEXTCOLOR = $00000004;
-
-TYPE
-
- tagLVGROUPMETRICS = Record
- cbSize : UINT;
- mask : UINT;
- Left : UINT;
- Top : UINT;
- Right : UINT;
- Bottom : UINT;
- crLeft : COLORREF;
- crTop : COLORREF;
- crRight : COLORREF;
- crBottom : COLORREF;
- crHeader : COLORREF;
- crFooter : COLORREF;
- END;
- LVGROUPMETRICS = tagLVGROUPMETRICS;
- PLVGROUPMETRICS = ^tagLVGROUPMETRICS;
- TLVGROUPMETRICS = tagLVGROUPMETRICS;
-
-CONST
- LVM_SETGROUPMETRICS = (LVM_FIRST + 155);
-
-// Macro 129
-Procedure ListView_SetGroupMetrics( hwnd : hwnd; pGroupMetrics : LPARAM);
-
-CONST
- LVM_GETGROUPMETRICS = (LVM_FIRST + 156);
-
-// Macro 130
-Procedure ListView_GetGroupMetrics( hwnd : hwnd; pGroupMetrics : LPARAM);
-
-CONST
- LVM_ENABLEGROUPVIEW = (LVM_FIRST + 157);
-
-// Macro 131
-Procedure ListView_EnableGroupView( hwnd : hwnd; fEnable : WPARAM);
-
-TYPE
- PFNLVGROUPCOMPARE = function(i,j:cint;k:pointer):cint; StdCall;
-
-CONST
- LVM_SORTGROUPS = (LVM_FIRST + 158);
-
-// Macro 132
-Procedure ListView_SortGroups( hwnd : hwnd; _pfnGroupCompate : WPARAM; _plv : LPARAM);
-
-TYPE
-
- tagLVINSERTGROUPSORTED = Record
- pfnGroupCompare : PFNLVGROUPCOMPARE;
- pvData : Pointer;
- lvGroup : LVGROUP;
- END;
- LVINSERTGROUPSORTED = tagLVINSERTGROUPSORTED;
- PLVINSERTGROUPSORTED = ^tagLVINSERTGROUPSORTED;
- TLVINSERTGROUPSORTED = tagLVINSERTGROUPSORTED;
-
-
-CONST
- LVM_INSERTGROUPSORTED = (LVM_FIRST + 159);
-
-// Macro 133
-Procedure ListView_InsertGroupSorted( hwnd : hwnd; structInsert : WPARAM);
-
-CONST
- LVM_REMOVEALLGROUPS = (LVM_FIRST + 160);
-
-// Macro 134
-Procedure ListView_RemoveAllGroups( hwnd : hwnd);
-
-CONST
- LVM_HASGROUP = (LVM_FIRST + 161);
-
-// Macro 135
-Procedure ListView_HasGroup( hwnd : hwnd; dwGroupId : DWORD );
-
-CONST
- LVTVIF_AUTOSIZE = $00000000;
- LVTVIF_FIXEDWIDTH = $00000001;
- LVTVIF_FIXEDHEIGHT = $00000002;
- LVTVIF_FIXEDSIZE = $00000003;
-{$ifdef win32vista}
- LVTVIF_EXTENDED = $00000004;
-{$endif}
- LVTVIM_TILESIZE = $00000001;
- LVTVIM_COLUMNS = $00000002;
- LVTVIM_LABELMARGIN = $00000004;
-
-
-TYPE
-
- tagLVTILEVIEWINFO = Record
- cbSize : UINT;
- dwMask : DWORD; //LVTVIM_*
- dwFlags : DWORD; //LVTVIF_*
- sizeTile : SIZE;
- cLines : cint;
- rcLabelMargin : RECT;
- END;
- LVTILEVIEWINFO = tagLVTILEVIEWINFO;
- PLVTILEVIEWINFO = ^tagLVTILEVIEWINFO;
- TLVTILEVIEWINFO = tagLVTILEVIEWINFO;
-
-
- tagLVTILEINFO = Record
- cbSize : UINT;
- iItem : cint;
- cColumns : UINT;
- puColumns : PUINT;
- {$ifdef win32vista}
- piColFmt : PCINT;
- {$endif}
- END;
- LVTILEINFO = tagLVTILEINFO;
- PLVTILEINFO = ^tagLVTILEINFO;
- TLVTILEINFO = tagLVTILEINFO;
-
-
-CONST
- LVM_SETTILEVIEWINFO = (LVM_FIRST + 162);
-
-// Macro 136
-Procedure ListView_SetTileViewInfo( hwnd : hwnd; ptvi : LPARAM);
-
-CONST
- LVM_GETTILEVIEWINFO = (LVM_FIRST + 163);
-
-// Macro 137
-Procedure ListView_GetTileViewInfo( hwnd : hwnd; ptvi : LPARAM);
-
-CONST
- LVM_SETTILEINFO = (LVM_FIRST + 164);
-
-// Macro 138
-Procedure ListView_SetTileInfo( hwnd : hwnd; pti : LPARAM);
-
-CONST
- LVM_GETTILEINFO = (LVM_FIRST + 165);
-
-// Macro 139
-Procedure ListView_GetTileInfo( hwnd : hwnd; pti : LPARAM);
-
-TYPE
-
- LVINSERTMARK = Record
- cbSize : UINT;
- dwFlags : DWORD;
- iItem : cint;
- dwReserved : DWORD;
- END;
- LPLVINSERTMARK = ^LVINSERTMARK;
- TLVINSERTMARK = LVINSERTMARK;
- PLVINSERTMARK = ^LVINSERTMARK;
-
-CONST
- LVIM_AFTER = $00000001; // TRUE = insert After iItem, otherwise before
-
- LVM_SETINSERTMARK = (LVM_FIRST + 166);
-
-// Macro 140
-Function ListView_SetInsertMark( hwnd : hwnd; lvim : lparam ):BOOL;
-
-CONST
- LVM_GETINSERTMARK = (LVM_FIRST + 167);
-
-// Macro 141
-Function ListView_GetInsertMark( hwnd : hwnd; lvim : lparam ):BOOL;
-
-CONST
- LVM_INSERTMARKHITTEST = (LVM_FIRST + 168);
-
-// Macro 142
-Function ListView_InsertMarkHitTest( hwnd : hwnd; point : LPPOINT; lvim : LPLVINSERTMARK):cint;
-
-CONST
- LVM_GETINSERTMARKRECT = (LVM_FIRST + 169);
-
-// Macro 143
-Function ListView_GetInsertMarkRect( hwnd : hwnd; rc : LPRECT):cint;
-
-CONST
- LVM_SETINSERTMARKCOLOR = (LVM_FIRST + 170);
-
-// Macro 144
-Function ListView_SetInsertMarkColor( hwnd : hwnd; color : COLORREF):COLORREF;
-
-CONST
- LVM_GETINSERTMARKCOLOR = (LVM_FIRST + 171);
-
-// Macro 145
-Function ListView_GetInsertMarkColor( hwnd : hwnd):COLORREF;
-
-TYPE
-
- tagLVSETINFOTIP = Record
- cbSize : UINT;
- dwFlags : DWORD;
- pszText : LPWSTR;
- iItem : cint;
- iSubItem : cint;
- END;
- LVSETINFOTIP = tagLVSETINFOTIP;
- PLVSETINFOTIP = ^tagLVSETINFOTIP;
- TLVSETINFOTIP = tagLVSETINFOTIP;
-
-
-CONST
- LVM_SETINFOTIP = (LVM_FIRST + 173);
-
-// Macro 146
-Function ListView_SetInfoTip( hwndLV : hwnd; plvInfoTip : LPARAM):BOOL;
-
-CONST
- LVM_GETSELECTEDCOLUMN = (LVM_FIRST + 174);
-
-// Macro 147
-Function ListView_GetSelectedColumn( hwnd : hwnd):UINT;
-
-CONST
- LVM_ISGROUPVIEWENABLED = (LVM_FIRST + 175);
-
-// Macro 148
-Function ListView_IsGroupViewEnabled( hwnd : hwnd):BOOL;
-
-CONST
- LVM_GETOUTLINECOLOR = (LVM_FIRST + 176);
-
-// Macro 149
-Function ListView_GetOutlineColor( hwnd : hwnd):COLORREF;
-
-CONST
- LVM_SETOUTLINECOLOR = (LVM_FIRST + 177);
-
-// Macro 150
-Function ListView_SetOutlineColor( hwnd : hwnd; color : COLORREF):COLORREF;
-
-CONST
- LVM_CANCELEDITLABEL = (LVM_FIRST + 179);
-
-// Macro 151
-Procedure ListView_CancelEditLabel( hwnd : hwnd);
-
-// These next to methods make it easy to identify an item that can be repositioned
-// within listview. For example: Many developers use the lParam to store an identifier that is
-// unique. Unfortunatly, in order to find this item, they have to iterate through all of the items
-// in the listview. Listview will maintain a unique identifier. The upper bound is the size of a DWORD.
-
-CONST
- LVM_MAPINDEXTOID = (LVM_FIRST + 180);
-
-// Macro 152
-Function ListView_MapIndexToID( hwnd : hwnd; index : WPARAM):UINT;
-
-CONST
- LVM_MAPIDTOINDEX = (LVM_FIRST + 181);
-
-// Macro 153
-Function ListView_MapIDToIndex( hwnd : hwnd; id : WPARAM):UINT;
-
-const LVM_ISITEMVISIBLE = (LVM_FIRST + 182);
-
-// macro 153b
-function ListView_IsItemVisible(hwnd:hwnd; aindex:cuint):cuint;
-// (UINT)SNDMSG((hwnd), LVM_ISITEMVISIBLE, (WPARAM)(index), (LPARAM)0)
-
-{$ENDIF}
-
-{$ifdef win32vista}
-CONST
- LVM_GETEMPTYTEXT = (LVM_FIRST + 204);
- LVM_GETFOOTERRECT = (LVM_FIRST + 205);
- LVM_GETFOOTERINFO = (LVM_FIRST + 206);
- LVM_GETFOOTERITEMRECT = (LVM_FIRST + 207);
- LVM_GETFOOTERITEM = (LVM_FIRST + 208);
- LVM_GETITEMINDEXRECT = (LVM_FIRST + 209);
- LVM_SETITEMINDEXSTATE = (LVM_FIRST + 210);
- LVM_GETNEXTITEMINDEX = (LVM_FIRST + 211);
-
-// footer flags
- LVFF_ITEMCOUNT = $00000001;
-
-// footer item flags
- LVFIF_TEXT = $00000001;
- LVFIF_STATE = $00000002;
-
-// footer item state
- LVFIS_FOCUSED = $0001;
-
-TYPE
- tagLVFOOTERINFO = Record
- mask : CUINT; // LVFF_*
- pszText : LPWSTR;
- cchTextMax: CINT;
- cItems : CUINT;
- end;
-
- LVFOOTERINFO = tagLVFOOTERINFO;
- LPLVFOOTERINFO = ^tagLVFOOTERINFO;
- TLVFOOTERINFO = tagLVFOOTERINFO;
- PLVFOOTERINFO = LPLVFOOTERINFO;
-
-
- tagLVFOOTERITEM = Record
- mask : CUINT; // LVFIF_*
- iItem : CINT;
- pszText : LPWSTR;
- cchTextMax: CINT;
- state : CUINT; // LVFIS_*
- stateMask : CUINT; // LVFIS_*
- end;
-
- LVFOOTERITEM = tagLVFOOTERITEM;
- LPLVFOOTERITEM = ^tagLVFOOTERITEM;
- TLVFOOTERITEM = tagLVFOOTERITEM;
- PLVFOOTERITEM = LPLVFOOTERITEM;
-
-// supports a single item in multiple groups.
- tagLVITEMINDEX = Record
- iItem : CINT; // listview item index
- iGroup : CINT; // group index (must be -1 if group view is not enabled)
- end;
- LVITEMINDEX = tagLVITEMINDEX;
- PLVITEMINDEX = ^tagLVITEMINDEX;
- tLVITEMINDEX = TAGLVITEMINDEX;
-
-
-function ListView_SetGroupHeaderImageList(hwnd:HWNd;himl:HIMAGELIST):HIMAGELIST;
-
-function ListView_GetGroupHeaderImageList(hwnd:HWND):HIMAGELIST;
-
-function ListView_GetEmptyText(hwnd:HWND;pszText:LPWSTR; cchText:CUINT):BOOL;
-
-function ListView_GetFooterRect(hwnd:HWND; prc:PRECT):BOOL;
-
-function ListView_GetFooterInfo(hwnd:HWND;plvfi: LPLVFOOTERINFO ):BOOL;
-
-function ListView_GetFooterItemRect(hwnd:HWND;iItem:CUINT;prc:PRECT):BOOL;
-
-function ListView_GetFooterItem(hwnd:HWND;iItem:CUINT; pfi:PLVFOOTERITEM):BOOL;
-
-function ListView_GetItemIndexRect(hwnd:hwnd; plvii:PLVITEMINDEX; iSubItem:clong; code:clong; prc:LPRECT) :BOOL;
-
-function ListView_SetItemIndexState(hwndLV:HWND; plvii:PLVITEMINDEX; data:CUINT; mask:CUINT):HRESULT;
-
-function ListView_GetNextItemIndex(hwnd:HWND;plvii:PLVITEMINDEX; flags:LPARAM):BOOL;
-
-{$endif}
-
-Type
-
-{$IFDEF UNICODE}
- LVBKIMAGE = LVBKIMAGEW;
- LPLVBKIMAGE = LPLVBKIMAGEW;
-CONST
- LVM_SETBKIMAGE = LVM_SETBKIMAGEW;
- LVM_GETBKIMAGE = LVM_GETBKIMAGEW;
-{$ELSE}
- LVBKIMAGE = LVBKIMAGEA;
- LPLVBKIMAGE = LPLVBKIMAGEA;
-CONST
- LVM_SETBKIMAGE = LVM_SETBKIMAGEA;
- LVM_GETBKIMAGE = LVM_GETBKIMAGEA;
-{$ENDIF}
-
-
-// Macro 154
-Function ListView_SetBkImage( hwnd : hwnd; plvbki : LPARAM):BOOL;
-
-// Macro 155
-Function ListView_GetBkImage( hwnd : hwnd; plvbki : LPARAM):BOOL;
-
-{$ENDIF} // _WIN32_IE >= 0x0400
-
-TYPE
-
- tagNMLISTVIEW = Record
- hdr : NMHDR;
- iItem : cint;
- iSubItem : cint;
- uNewState : UINT;
- uOldState : UINT;
- uChanged : UINT;
- ptAction : POINT;
- lParam : LPARAM;
- END;
- NMLISTVIEW = tagNMLISTVIEW;
- LPNMLISTVIEW = ^tagNMLISTVIEW;
- TNMLISTVIEW = tagNMLISTVIEW;
- PNMLISTVIEW = ^tagNMLISTVIEW;
-
-{$ifdef IE4plus}
-// NMITEMACTIVATE is used instead of NMLISTVIEW in IE >= 0x400
-// therefore all the fields are the same except for extra uKeyFlags
-// they are used to store key flags at the time of the single click with
-// delayed activation - because by the time the timer goes off a user may
-// not hold the keys (shift, ctrl) any more
- tagNMITEMACTIVATE = Record
- hdr : NMHDR;
- iItem : cint;
- iSubItem : cint;
- uNewState : UINT;
- uOldState : UINT;
- uChanged : UINT;
- ptAction : POINT;
- lParam : LPARAM;
- uKeyFlags : UINT;
- END;
- NMITEMACTIVATE = tagNMITEMACTIVATE;
- LPNMITEMACTIVATE = ^tagNMITEMACTIVATE;
- TNMITEMACTIVATE = tagNMITEMACTIVATE;
- PNMITEMACTIVATE = ^tagNMITEMACTIVATE;
-
-// key flags stored in uKeyFlags
-
-CONST
- LVKF_ALT = $0001;
- LVKF_CONTROL = $0002;
- LVKF_SHIFT = $0004;
-{$ENDIF} //(_WIN32_IE >= 0x0400)
-Type
-
-{$ifdef ie3plus}
- LPNM_LISTVIEW = LPNMLISTVIEW;
- NM_LISTVIEW = NMLISTVIEW;
-{$ELSE}
- tagNMLISTVIEW = _NM_LISTVIEW;
- NMLISTVIEW = NM_LISTVIEW;
- LPNMLISTVIEW = LPNM_LISTVIEW;
-{$ENDIF}
-
-
-{$ifdef ie3plus}
-// #define NMLVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMLVCUSTOMDRW, clrTextBk)
-
-TYPE
-
- tagNMLVCUSTOMDRAW = Record
- nmcd : NMCUSTOMDRAW;
- clrText : COLORREF;
- clrTextBk : COLORREF;
-{$ifdef ie4plus}
- iSubItem : cint;
-{$ENDIF}
-{$ifdef win32xp}
- dwItemType : DWORD;
-
- clrFace : COLORREF;
- iIconEffect : cint;
- iIconPhase : cint;
- iPartId : cint;
- iStateId : cint;
-
- rcText : RECT;
- uAlign : UINT; // Alignment. Use LVGA_HEADER_CENTER, LVGA_HEADER_RIGHT, LVGA_HEADER_LEFT
-{$ENDIF}
- END;
- NMLVCUSTOMDRAW = tagNMLVCUSTOMDRAW;
- LPNMLVCUSTOMDRAW = ^tagNMLVCUSTOMDRAW;
- TNMLVCUSTOMDRAW = tagNMLVCUSTOMDRAW;
- PNMLVCUSTOMDRAW = ^tagNMLVCUSTOMDRAW;
-
-
-// dwItemType
-
-CONST
- LVCDI_ITEM = $00000000;
- LVCDI_GROUP = $00000001;
-
-// ListView custom draw return values
- LVCDRF_NOSELECT = $00010000;
- LVCDRF_NOGROUPFRAME = $00020000;
-
-TYPE
-
- tagNMLVCACHEHINT = Record
- hdr : NMHDR;
- iFrom : cint;
- iTo : cint;
- END;
- NMLVCACHEHINT = tagNMLVCACHEHINT;
- LPNMLVCACHEHINT = ^tagNMLVCACHEHINT;
- TNMLVCACHEHINT = tagNMLVCACHEHINT;
- PNMLVCACHEHINT = ^tagNMLVCACHEHINT;
-
-
- LPNM_CACHEHINT = LPNMLVCACHEHINT;
- PNM_CACHEHINT = LPNMLVCACHEHINT;
-
- NM_CACHEHINT = NMLVCACHEHINT;
-
- tagNMLVFINDITEMA = Record
- hdr : NMHDR;
- iStart : cint;
- lvfi : LVFINDINFOA;
- END;
- NMLVFINDITEMA = tagNMLVFINDITEMA;
- LPNMLVFINDITEMA = ^tagNMLVFINDITEMA;
- TNMLVFINDITEMA = tagNMLVFINDITEMA;
- PNMLVFINDITEMA = ^tagNMLVFINDITEMA;
-
-
- tagNMLVFINDITEMW = Record
- hdr : NMHDR;
- iStart : cint;
- lvfi : LVFINDINFOW;
- END;
- NMLVFINDITEMW = tagNMLVFINDITEMW;
- LPNMLVFINDITEMW = ^tagNMLVFINDITEMW;
- TNMLVFINDITEMW = tagNMLVFINDITEMW;
- PNMLVFINDITEMW = ^tagNMLVFINDITEMW;
-
-
- PNM_FINDITEMA = LPNMLVFINDITEMA;
- LPNM_FINDITEMA = LPNMLVFINDITEMA;
- NM_FINDITEMA = NMLVFINDITEMA;
-
- PNM_FINDITEMW = LPNMLVFINDITEMW;
- LPNM_FINDITEMW = LPNMLVFINDITEMW;
- NM_FINDITEMW = NMLVFINDITEMW;
-
-{$IFDEF UNICODE}
- PNM_FINDITEM = PNM_FINDITEMW;
- LPNM_FINDITEM = LPNM_FINDITEMW;
- NM_FINDITEM = NM_FINDITEMW;
- NMLVFINDITEM = NMLVFINDITEMW;
- LPNMLVFINDITEM = LPNMLVFINDITEMW;
-{$ELSE}
- PNM_FINDITEM = PNM_FINDITEMA;
- LPNM_FINDITEM = LPNM_FINDITEMA;
- NM_FINDITEM = NM_FINDITEMA;
- NMLVFINDITEM = NMLVFINDITEMA;
- LPNMLVFINDITEM = LPNMLVFINDITEMA;
-{$ENDIF}
- PNMLVFindItem = LPNMLVFINDITEM;
- TNMLVFindItem = NMLVFINDITEM;
-
- tagNMLVODSTATECHANGE = Record
- hdr : NMHDR;
- iFrom : cint;
- iTo : cint;
- uNewState : UINT;
- uOldState : UINT;
- END;
- NMLVODSTATECHANGE = tagNMLVODSTATECHANGE;
- LPNMLVODSTATECHANGE = ^tagNMLVODSTATECHANGE;
- TNMLVODSTATECHANGE = tagNMLVODSTATECHANGE;
- PNMLVODSTATECHANGE = ^tagNMLVODSTATECHANGE;
-
-
- PNM_ODSTATECHANGE = LPNMLVODSTATECHANGE;
- LPNM_ODSTATECHANGE = LPNMLVODSTATECHANGE;
-
-
- NM_ODSTATECHANGE = NMLVODSTATECHANGE;
-{$ENDIF} // _WIN32_IE >= 0x0300
-
-CONST
- LVN_ITEMCHANGING = (LVN_FIRST-0);
- LVN_ITEMCHANGED = (LVN_FIRST-1);
- LVN_INSERTITEM = (LVN_FIRST-2);
- LVN_DELETEITEM = (LVN_FIRST-3);
- LVN_DELETEALLITEMS = (LVN_FIRST-4);
- LVN_BEGINLABELEDITA = (LVN_FIRST-5);
- LVN_BEGINLABELEDITW = (LVN_FIRST-75);
- LVN_ENDLABELEDITA = (LVN_FIRST-6);
- LVN_ENDLABELEDITW = (LVN_FIRST-76);
- LVN_COLUMNCLICK = (LVN_FIRST-8);
- LVN_BEGINDRAG = (LVN_FIRST-9);
- LVN_BEGINRDRAG = (LVN_FIRST-11);
-
-{$ifdef ie3plus}
- LVN_ODCACHEHINT = (LVN_FIRST-13);
- LVN_ODFINDITEMA = (LVN_FIRST-52);
- LVN_ODFINDITEMW = (LVN_FIRST-79);
-
- LVN_ITEMACTIVATE = (LVN_FIRST-14);
- LVN_ODSTATECHANGED = (LVN_FIRST-15);
-
-Const
-{$IFDEF UNICODE}
- LVN_ODFINDITEM = LVN_ODFINDITEMW;
-{$ELSE}
- LVN_ODFINDITEM = LVN_ODFINDITEMA;
-{$ENDIF}
-{$ENDIF} // _WIN32_IE >= 0x0300
-
-
-CONST
-{$ifdef ie4plus}
- LVN_HOTTRACK = (LVN_FIRST-21);
-{$ENDIF}
-
- LVN_GETDISPINFOA = (LVN_FIRST-50);
- LVN_GETDISPINFOW = (LVN_FIRST-77);
- LVN_SETDISPINFOA = (LVN_FIRST-51);
- LVN_SETDISPINFOW = (LVN_FIRST-78);
-
-Const
-{$IFDEF UNICODE}
- LVN_BEGINLABELEDIT = LVN_BEGINLABELEDITW;
- LVN_ENDLABELEDIT = LVN_ENDLABELEDITW;
- LVN_GETDISPINFO = LVN_GETDISPINFOW;
- LVN_SETDISPINFO = LVN_SETDISPINFOW;
-{$ELSE}
- LVN_BEGINLABELEDIT = LVN_BEGINLABELEDITA;
- LVN_ENDLABELEDIT = LVN_ENDLABELEDITA;
- LVN_GETDISPINFO = LVN_GETDISPINFOA;
- LVN_SETDISPINFO = LVN_SETDISPINFOA;
-{$ENDIF}
-
-CONST
- LVIF_DI_SETITEM = $1000;
-
-TYPE
-
- tagLVDISPINFO = Record
- hdr : NMHDR;
- item : LVITEMA;
- END;
- NMLVDISPINFOA = tagLVDISPINFO;
- LPNMLVDISPINFOA = ^tagLVDISPINFO;
- TLVDISPINFO = tagLVDISPINFO;
- PLVDISPINFO = ^tagLVDISPINFO;
-
-
- tagLVDISPINFOW = Record
- hdr : NMHDR;
- item : LVITEMW;
- END;
- NMLVDISPINFOW = tagLVDISPINFOW;
- LPNMLVDISPINFOW = ^tagLVDISPINFOW;
- TLVDISPINFOW = tagLVDISPINFOW;
- PLVDISPINFOW = ^tagLVDISPINFOW;
-
-
-{$IFDEF UNICODE}
- NMLVDISPINFO = NMLVDISPINFOW;
-{$ELSE}
- NMLVDISPINFO = NMLVDISPINFOA;
-{$ENDIF}
-
-{$ifdef ie3plus}
- LV_DISPINFOA = NMLVDISPINFOA;
- LV_DISPINFOW = NMLVDISPINFOW;
-{$ELSE}
- tagLVDISPINFO = _LV_DISPINFO;
- NMLVDISPINFOA = LV_DISPINFOA;
- tagLVDISPINFOW = _LV_DISPINFOW;
- NMLVDISPINFOW = LV_DISPINFOW;
-{$ENDIF}
-
-
- LV_DISPINFO = NMLVDISPINFO;
-
-CONST
- LVN_KEYDOWN = (LVN_FIRST-55);
-
-
-
-{$IFDEF _WIN32}
-// include <pshpack1.h>
-{$ENDIF}
-
-TYPE
- tagLVKEYDOWN = Record
- hdr : NMHDR;
- wVKey : WORD;
- flags : UINT;
- END;
- NMLVKEYDOWN = tagLVKEYDOWN;
- LPNMLVKEYDOWN = ^tagLVKEYDOWN;
- TLVKEYDOWN = tagLVKEYDOWN;
- PLVKEYDOWN = ^tagLVKEYDOWN;
-
-
-{$IFDEF _WIN32}
-//include <poppack.h>
-{$ENDIF}
-
-{$ifdef ie3plus}
-CONST
- LVN_MARQUEEBEGIN = (LVN_FIRST-56);
-{$ENDIF}
-
-{$ifdef win32vista}
-Type
- tagNMLVLIN = Record
- hdr: NMHDR;
- link: LITEM;
- iItem: cint;
- iSubItem: cint;
- end;
- NMLVLINK = tagNMLVLIN;
- TNMLVLINK = tagNMLVLIN;
- PNMLVLINK = ^tagNMLVLIN;
-{$endif}
-
-{$ifdef ie4plus}
-TYPE
-
- tagNMLVGETINFOTIPA = Record
- hdr : NMHDR;
- dwFlags : DWORD;
- pszText : LPSTR;
- cchTextMax : cint;
- iItem : cint;
- iSubItem : cint;
- lParam : LPARAM;
- END;
- NMLVGETINFOTIPA = tagNMLVGETINFOTIPA;
- LPNMLVGETINFOTIPA = ^tagNMLVGETINFOTIPA;
- TNMLVGETINFOTIPA = tagNMLVGETINFOTIPA;
- PNMLVGETINFOTIPA = ^tagNMLVGETINFOTIPA;
-
-
- tagNMLVGETINFOTIPW = Record
- hdr : NMHDR;
- dwFlags : DWORD;
- pszText : LPWSTR;
- cchTextMax : cint;
- iItem : cint;
- iSubItem : cint;
- lParam : LPARAM;
- END;
- NMLVGETINFOTIPW = tagNMLVGETINFOTIPW;
- LPNMLVGETINFOTIPW = ^tagNMLVGETINFOTIPW;
- TNMLVGETINFOTIPW = tagNMLVGETINFOTIPW;
- PNMLVGETINFOTIPW = ^tagNMLVGETINFOTIPW;
-
-{$ifdef ie3plus}
- LV_KEYDOWN = NMLVKEYDOWN;
-{$ELSE}
- tagLVKEYDOWN = _LV_KEYDOWN;
- NMLVKEYDOWN = LV_KEYDOWN;
-{$ENDIF}
-
-
-// NMLVGETINFOTIPA.dwFlag values
-
-CONST
- LVGIT_UNFOLDED = $0001;
-
- LVN_GETINFOTIPA = (LVN_FIRST-57);
- LVN_GETINFOTIPW = (LVN_FIRST-58);
- LVN_INCREMENTALSEARCHA = (LVN_FIRST-62);
- LVN_INCREMENTALSEARCHW = (LVN_FIRST-63);
-
- LVNSCH_DEFAULT = -1;
- LVNSCH_ERROR = -2;
- LVNSCH_IGNORE = -3;
-
-{$ifdef win32vista}
- LVN_COLUMNDROPDOWN = (LVN_FIRST-64);
- LVN_COLUMNOVERFLOWCLICK = (LVN_FIRST-66);
-{$endif}
-
-Const
-{$IFDEF UNICODE}
- LVN_GETINFOTIP = LVN_GETINFOTIPW;
-type
- NMLVGETINFOTIP = NMLVGETINFOTIPW;
- LPNMLVGETINFOTIP = LPNMLVGETINFOTIPW;
-{$ELSE}
- LVN_GETINFOTIP = LVN_GETINFOTIPA;
-type
- NMLVGETINFOTIP = NMLVGETINFOTIPA;
- LPNMLVGETINFOTIP = LPNMLVGETINFOTIPA;
-{$ENDIF}
-{$ENDIF} // _WIN32_IE >= 0x0400
-
-
-{$ifdef win32xp} // actually 2003
- tagNMLVSCROLL = Record
- hdr : NMHDR;
- dx : cint;
- dy : cint;
- END;
- NMLVSCROLL = tagNMLVSCROLL;
- LPNMLVSCROLL = ^tagNMLVSCROLL;
- TNMLVSCROLL = tagNMLVSCROLL;
- PNMLVSCROLL = ^tagNMLVSCROLL;
-
-
-CONST
- LVN_BEGINSCROLL = (LVN_FIRST-80);
- LVN_ENDSCROLL = (LVN_FIRST-81);
-// {$ENDIF}
-
-{$ifdef win32vista}
- LVN_LINKCLICK = (LVN_FIRST-84);
- LVN_GETEMPTYMARKUP = (LVN_FIRST-87);
-
- EMF_CENTERED = $00000001; // render markup centered in the listview area
-
-Type
- tagNMLVEMPTYMARKUP = Record
- hdr : NMHDR;
- // out params from client back to listview
- dwFlags :DWORD; // EMF_*
- szMarkup : array[0..L_MAX_URL_LENGTH-1] of wchar; // markup displayed
- end;
- NMLVEMPTYMARKUP = tagNMLVEMPTYMARKUP;
- TNMLVEMPTYMARKUP = tagNMLVEMPTYMARKUP;
- PNMLVEMPTYMARKUP = ^tagNMLVEMPTYMARKUP;
-
-{$endif}
-
-{$ENDIF} // NOLISTVIEW
-
-//====== TREEVIEW CONTROL =====================================================
-
-{$IFNDEF NOTREEVIEW}
-
-CONST
-{$IFDEF _WIN32}
- WC_TREEVIEWA = 'SysTreeView32';
- WC_TREEVIEWW = {L}'SysTreeView32';
-
-{$IFDEF UNICODE}
- WC_TREEVIEW = WC_TREEVIEWW;
-{$ELSE}
- WC_TREEVIEW = WC_TREEVIEWA;
-{$ENDIF}
-{$ELSE}
- WC_TREEVIEW = 'SysTreeView';
-{$ENDIF}
-
-// begin_r_commctrl
-
- TVS_HASBUTTONS = $0001;
- TVS_HASLINES = $0002;
- TVS_LINESATROOT = $0004;
- TVS_EDITLABELS = $0008;
- TVS_DISABLEDRAGDROP = $0010;
- TVS_SHOWSELALWAYS = $0020;
-{$ifdef ie3plus}
- TVS_RTLREADING = $0040;
-
- TVS_NOTOOLTIPS = $0080;
- TVS_CHECKBOXES = $0100;
- TVS_TRACKSELECT = $0200;
-{$ifdef ie4plus}
- TVS_SINGLEEXPAND = $0400;
- TVS_INFOTIP = $0800;
- TVS_FULLROWSELECT = $1000;
- TVS_NOSCROLL = $2000;
- TVS_NONEVENHEIGHT = $4000;
-{$ENDIF}
-{$ifdef ie5plus}
- TVS_NOHSCROLL = $8000; // TVS_NOSCROLL overrides this
-{$ENDIF}
-{$ifdef win32vista}
- TVS_EX_MULTISELECT = $0002;
- TVS_EX_DOUBLEBUFFER = $0004;
- TVS_EX_NOINDENTSTATE = $0008;
- TVS_EX_RICHTOOLTIP = $0010;
- TVS_EX_AUTOHSCROLL = $0020;
- TVS_EX_FADEINOUTEXPANDOS = $0040;
- TVS_EX_PARTIALCHECKBOXES = $0080;
- TVS_EX_EXCLUSIONCHECKBOXES = $0100;
- TVS_EX_DIMMEDCHECKBOXES = $0200;
- TVS_EX_DRAWIMAGEASYNC = $0400;
-{$endif}
-{$ENDIF}
-
-// end_r_commctrl
-
-TYPE
- HTREEITEM = ^TREEITEM;
-
-CONST
- TVIF_TEXT = $0001;
- TVIF_IMAGE = $0002;
- TVIF_PARAM = $0004;
- TVIF_STATE = $0008;
- TVIF_HANDLE = $0010;
- TVIF_SELECTEDIMAGE = $0020;
- TVIF_CHILDREN = $0040;
-{$ifdef ie4plus}
- TVIF_INTEGRAL = $0080;
-{$ENDIF}
-{$ifdef win32vista}
- TVIF_STATEEX = $0100;
- TVIF_EXPANDEDIMAGE = $0200;
-{$endif}
- TVIS_SELECTED = $0002;
- TVIS_CUT = $0004;
- TVIS_DROPHILITED = $0008;
- TVIS_BOLD = $0010;
- TVIS_EXPANDED = $0020;
- TVIS_EXPANDEDONCE = $0040;
-{$ifdef ie3plus}
- TVIS_EXPANDPARTIAL = $0080;
-{$ENDIF}
-
- TVIS_OVERLAYMASK = $0F00;
- TVIS_STATEIMAGEMASK = $F000;
- TVIS_USERMASK = $F000;
-
-// IE6
- TVIS_EX_FLAT = $0001;
-{$ifdef win32vista}
- TVIS_EX_DISABLED = $0002;
-{$endif}
- TVIS_EX_ALL = $0002;
-Type
-
-// Structure for TreeView's NM_TVSTATEIMAGECHANGING notification
- tagNMTVSTATEIMAGECHANGING = Record
- hdr : NMHDR;
- hti : HTREEITEM;
- iOldStateImageIndex : cint;
- iNewStateImageIndex : cint;
- end;
- NMTVSTATEIMAGECHANGING = tagNMTVSTATEIMAGECHANGING;
- LPNMTVSTATEIMAGECHANGING = ^tagNMTVSTATEIMAGECHANGING;
-
-Const
- I_CHILDRENCALLBACK = (-1);
-Type
- tagTVITEMA = Record
- mask : UINT;
- hItem : HTREEITEM;
- state : UINT;
- stateMask : UINT;
- pszText : LPSTR;
- cchTextMax : cint;
- iImage : cint;
- iSelectedImage : cint;
- cChildren : cint;
- lParam : LPARAM;
-{$ifdef ie6plus}
- uStateEx : cUINT;
- hwnd : HWND;
- iExpandedImage : cint;
-{$endif}
-{$ifdef NTDDI_WIN7}
- iPadding : cint;
-{$endif}
- END;
- TVITEMA = tagTVITEMA;
- LPTVITEMA = ^tagTVITEMA;
- TTVITEMA = tagTVITEMA;
- PTVITEMA = ^tagTVITEMA;
-
-
- tagTVITEMW = Record
- mask : UINT;
- hItem : HTREEITEM;
- state : UINT;
- stateMask : UINT;
- pszText : LPWSTR;
- cchTextMax : cint;
- iImage : cint;
- iSelectedImage : cint;
- cChildren : cint;
- lParam : LPARAM;
-{$ifdef ie6plus}
- uStateEx : cUINT;
- hwnd : HWND;
- iExpandedImage : cint;
-{$endif}
-{$ifdef NTDDI_WIN7}
- iPadding : cint;
-{$endif}
- END;
- TVITEMW = tagTVITEMW;
- LPTVITEMW = ^tagTVITEMW;
- TTVITEMW = tagTVITEMW;
- PTVITEMW = ^tagTVITEMW;
-
-
-{$ifdef ie4plus}
-// only used for Get and Set messages. no notifies
- tagTVITEMEXA = Record
- mask : UINT;
- hItem : HTREEITEM;
- state : UINT;
- stateMask : UINT;
- pszText : LPSTR;
- cchTextMax : cint;
- iImage : cint;
- iSelectedImage : cint;
- cChildren : cint;
- lParam : LPARAM;
- iIntegral : cint;
- END;
- TVITEMEXA = tagTVITEMEXA;
- LPTVITEMEXA = ^tagTVITEMEXA;
- TTVITEMEXA = tagTVITEMEXA;
- PTVITEMEXA = ^tagTVITEMEXA;
-
-// only used for Get and Set messages. no notifies
- tagTVITEMEXW = Record
- mask : UINT;
- hItem : HTREEITEM;
- state : UINT;
- stateMask : UINT;
- pszText : LPWSTR;
- cchTextMax : cint;
- iImage : cint;
- iSelectedImage : cint;
- cChildren : cint;
- lParam : LPARAM;
- iIntegral : cint;
- END;
- TVITEMEXW = tagTVITEMEXW;
- LPTVITEMEXW = ^tagTVITEMEXW;
- TTVITEMEXW = tagTVITEMEXW;
- PTVITEMEXW = ^tagTVITEMEXW;
-
-
-TYPE
-{$ifdef ie3plus}
- LPTV_ITEMW = LPTVITEMW;
- LPTV_ITEMA = LPTVITEMA;
- TV_ITEMW = TVITEMW;
- TV_ITEMA = TVITEMA;
-{$ELSE}
- tagTVITEMA = _TV_ITEMA;
- TVITEMA = TV_ITEMA;
- LPTVITEMA = LPTV_ITEMA;
- tagTVITEMW = _TV_ITEMW;
- TVITEMW = TV_ITEMW;
- LPTVITEMW = LPTV_ITEMW;
-{$ENDIF}
- TTVItem = TVITEMA;
- PTVItem = LPTVITEMA;
-
-
-
-
-
-{$IFDEF UNICODE}
- TVITEMEX = TVITEMEXW;
- LPTVITEMEX = LPTVITEMEXW;
-{$ELSE}
- TVITEMEX = TVITEMEXA;
- LPTVITEMEX = LPTVITEMEXA;
-{$ENDIF} // UNICODE
-
-
-{$ENDIF}
-
-{$IFDEF UNICODE}
- TVITEM = TVITEMW;
- LPTVITEM = LPTVITEMW;
-{$ELSE}
- TVITEM = TVITEMA;
- LPTVITEM = LPTVITEMA;
-{$ENDIF}
-
- LPTV_ITEM = LPTVITEM;
- TV_ITEM = TVITEM;
-
-CONST
- TVI_ROOT = HTREEITEM(ULONG_PTR(-$10000));
- TVI_FIRST = HTREEITEM(ULONG_PTR(-$0FFFF));
- TVI_LAST = HTREEITEM(ULONG_PTR(-$0FFFE));
- TVI_SORT = HTREEITEM(ULONG_PTR(-$0FFFD));
-
-
-
-// #define TVINSERTSTRUCTA_V1_SIZE CCSIZEOF_STRUCT(TVINSERTSTRUCTA, item)
-// #define TVINSERTSTRUCTW_V1_SIZE CCSIZEOF_STRUCT(TVINSERTSTRUCTW, item)
-Type
- tagTVINSERTSTRUCTA = Record
- hParent : HTREEITEM;
- hInsertAfter : HTREEITEM;
-{$ifdef ie4plus}
- case boolean of
- false: (itemex : TVITEMEXA);
- True: (item : TV_ITEMA);
-{$ELSE}
- item : TV_ITEMA;
-{$ENDIF}
- END;
- TVINSERTSTRUCTA = tagTVINSERTSTRUCTA;
- LPTVINSERTSTRUCTA = ^tagTVINSERTSTRUCTA;
- TTVINSERTSTRUCTA = tagTVINSERTSTRUCTA;
- PTVINSERTSTRUCTA = ^tagTVINSERTSTRUCTA;
- TTVINSERTSTRUCT = TTVINSERTSTRUCTA;
- PTVINSERTSTRUCT = PTVINSERTSTRUCTA;
-
-
- tagTVINSERTSTRUCTW = Record
- hParent : HTREEITEM;
- hInsertAfter : HTREEITEM;
-{$ifdef ie4plus}
- case boolean of
- false: (itemex : TVITEMEXW);
- True: (item : TV_ITEMW);
-{$ELSE}
- item : TV_ITEMW;
-{$ENDIF}
- END;
- TVINSERTSTRUCTW = tagTVINSERTSTRUCTW;
- LPTVINSERTSTRUCTW = ^tagTVINSERTSTRUCTW;
- TTVINSERTSTRUCTW = tagTVINSERTSTRUCTW;
- PTVINSERTSTRUCTW = ^tagTVINSERTSTRUCTW;
-
-
-{$IFDEF UNICODE}
- TVINSERTSTRUCT = TVINSERTSTRUCTW;
- LPTVINSERTSTRUCT = LPTVINSERTSTRUCTW;
-// TVINSERTSTRUCT_V1_SIZE = TVINSERTSTRUCTW_V1_SIZE;
-{$ELSE}
- TVINSERTSTRUCT = TVINSERTSTRUCTA;
- LPTVINSERTSTRUCT = LPTVINSERTSTRUCTA;
-// TVINSERTSTRUCT_V1_SIZE = TVINSERTSTRUCTA_V1_SIZE;
-{$ENDIF}
-CONST
- TVM_INSERTITEMA = (TV_FIRST + 0);
- TVM_INSERTITEMW = (TV_FIRST + 50);
-{$IFDEF UNICODE}
- TVM_INSERTITEM = TVM_INSERTITEMW;
-{$ELSE}
- TVM_INSERTITEM = TVM_INSERTITEMA;
-{$ENDIF}
-
-TYPE
-{$ifdef ie3plus}
- LPTV_INSERTSTRUCTA = LPTVINSERTSTRUCTA;
- LPTV_INSERTSTRUCTW = LPTVINSERTSTRUCTW;
- TV_INSERTSTRUCTA = TVINSERTSTRUCTA;
- TV_INSERTSTRUCTW = TVINSERTSTRUCTW;
-{$ELSE}
- tagTVINSERTSTRUCTA = _TV_INSERTSTRUCTA;
- TVINSERTSTRUCTA = TV_INSERTSTRUCTA;
- LPTVINSERTSTRUCTA = LPTV_INSERTSTRUCTA;
- tagTVINSERTSTRUCTW = _TV_INSERTSTRUCTW;
- TVINSERTSTRUCTW = TV_INSERTSTRUCTW;
- LPTVINSERTSTRUCTW = LPTV_INSERTSTRUCTW;
-{$ENDIF}
-
-
- TV_INSERTSTRUCT = TVINSERTSTRUCT;
- LPTV_INSERTSTRUCT = LPTVINSERTSTRUCT;
-
-
-// Macro 156
-Function TreeView_InsertItem( hwnd : hwnd; lpis : LPTV_INSERTSTRUCT):HTREEITEM;inline;
-Function TreeView_InsertItem( hwnd : hwnd; const lpis : TV_INSERTSTRUCT):HTREEITEM;inline;
-
-CONST
- TVM_DELETEITEM = (TV_FIRST + 1);
-
-// Macro 157
-Function TreeView_DeleteItem( hwnd : hwnd; hitem : HTREEITEM):BOOL;
-
-// Macro 158
-Function TreeView_DeleteAllItems( hwnd : hwnd):BOOL;
-
-CONST
- TVM_EXPAND = (TV_FIRST + 2);
-
-// Macro 159
-Function TreeView_Expand( hwnd : hwnd; hitem : HTREEITEM; code : WPARAM):BOOL;
-
-CONST
- TVE_COLLAPSE = $0001;
- TVE_EXPAND = $0002;
- TVE_TOGGLE = $0003;
-{$ifdef ie3plus}
- TVE_EXPANDPARTIAL = $4000;
-{$ENDIF}
- TVE_COLLAPSERESET = $8000;
-
-
- TVM_GETITEMRECT = (TV_FIRST + 4);
-
-// Macro 160
-Function TreeView_GetItemRect( hwnd : hwnd; hitem: HTREEITEM; code : WPARAM; prc : pRECT):BOOL;inline;
-Function TreeView_GetItemRect( hwnd : hwnd; hitem: HTREEITEM; var prc : TRECT;code : Bool):BOOL;inline;
-
-CONST
- TVM_GETCOUNT = (TV_FIRST + 5);
-
-// Macro 161
-Function TreeView_GetCount( hwnd : hwnd):UINT;
-
-CONST
- TVM_GETINDENT = (TV_FIRST + 6);
-
-// Macro 162
-Function TreeView_GetIndent( hwnd : hwnd):UINT;
-
-CONST
- TVM_SETINDENT = (TV_FIRST + 7);
-
-// Macro 163
-Function TreeView_SetIndent( hwnd : hwnd; indent : WPARAM):BOOL;
-
-CONST
- TVM_GETIMAGELIST = (TV_FIRST + 8);
-
-// Macro 164
-Function TreeView_GetImageList( hwnd : hwnd; iImage : cint ):HIMAGELIST;
-
-CONST
- TVSIL_NORMAL = 0;
- TVSIL_STATE = 2;
-
-
- TVM_SETIMAGELIST = (TV_FIRST + 9);
-
-// Macro 165
-Function TreeView_SetImageList( hwnd : hwnd; himl : HIMAGELIST; iImage : cint):HIMAGELIST;
-
-CONST
- TVM_GETNEXTITEM = (TV_FIRST + 10);
-
-// Macro 166
-Function TreeView_GetNextItem( hwnd : hwnd; hitem : HTREEITEM; code : WPARAM):HTREEITEM;
-
-CONST
- TVGN_ROOT = $0000;
- TVGN_NEXT = $0001;
- TVGN_PREVIOUS = $0002;
- TVGN_PARENT = $0003;
- TVGN_CHILD = $0004;
- TVGN_FIRSTVISIBLE = $0005;
- TVGN_NEXTVISIBLE = $0006;
- TVGN_PREVIOUSVISIBLE = $0007;
- TVGN_DROPHILITE = $0008;
- TVGN_CARET = $0009;
-{$ifdef ie4plus}
- TVGN_LASTVISIBLE = $000A;
-{$ENDIF} // _WIN32_IE >= 0x0400
-{$ifdef ie6plus}
- TVGN_NEXTSELECTED = $000B;
-{$endif}
-{$ifdef win32xp} // 0x501
- TVSI_NOSINGLEEXPAND = $8000; // Should not conflict with TVGN flags.
-{$ENDIF}
-
-function TreeView_GetChild(hwnd:hwnd; hitem:HTREEITEM) : HTREEITEM;inline;
-function TreeView_GetNextSibling(hwnd:hwnd; hitem:HTREEITEM) : HTREEITEM;inline;
-function TreeView_GetPrevSibling(hwnd:hwnd; hitem:HTREEITEM) : HTREEITEM;inline;
-function TreeView_GetParent(hwnd:hwnd; hitem:HTREEITEM) : HTREEITEM;inline;
-function TreeView_GetFirstVisible(hwnd:hwnd) : HTREEITEM;inline;
-function TreeView_GetNextVisible(hwnd:hwnd; hitem:HTREEITEM) : HTREEITEM;inline;
-function TreeView_GetPrevVisible(hwnd:hwnd; hitem:HTREEITEM) : HTREEITEM;inline;
-function TreeView_GetSelection(hwnd:hwnd) : HTREEITEM;inline;
-function TreeView_GetDropHilight(hwnd:hwnd) : HTREEITEM;inline;
-function TreeView_GetDropHilite(hwnd:hwnd) : HTREEITEM;inline;
-function TreeView_GetRoot(hwnd:hwnd) : HTREEITEM;inline;
-function TreeView_GetLastVisible(hwnd:hwnd) : HTREEITEM;inline;
-
-{$ifdef win32vista}
-function TreeView_GetNextSelected(hwnd:hwnd; hitem:HTREEITEM):HTREEITEM;inline;
-{$endif}
-
-CONST
- TVM_SELECTITEM = (TV_FIRST + 11);
-
-// Macro 178
-Function TreeView_Select( hwnd : hwnd; hitem : HTREEITEM; code : WPARAM):BOOL;
-
-// Macro 179
-Procedure TreeView_SelectItem(hwnd:hwnd; hitem:HTREEITEM);
-
-// Macro 180
-Procedure TreeView_SelectDropTarget(hwnd:hwnd; hitem:HTREEITEM);
-
-// Macro 181
-Procedure TreeView_SelectSetFirstVisible(hwnd:hwnd; hitem:HTREEITEM);
-
-CONST
- TVM_GETITEMA = (TV_FIRST + 12);
- TVM_GETITEMW = (TV_FIRST + 62);
-
-{$IFDEF UNICODE}
-
-TYPE
- TVM_GETITEM = TVM_GETITEMW;
-{$ELSE}
- TVM_GETITEM = TVM_GETITEMA;
-{$ENDIF}
-
-// Macro 182
-
-
-Function TreeView_GetItem( hwnd : hwnd;var pitem : TV_ITEM ):BOOL;
-
-
-
-
-CONST
- TVM_SETITEMA = (TV_FIRST + 13);
- TVM_SETITEMW = (TV_FIRST + 63);
-
-{$IFDEF UNICODE}
-
-TYPE
- TVM_SETITEM = TVM_SETITEMW;
-{$ELSE}
- TVM_SETITEM = TVM_SETITEMA;
-{$ENDIF}
-
-// Macro 183
-
-
-Function TreeView_SetItem( hwnd : hwnd;const pitem : TV_ITEM ):BOOL;
-
-
-CONST
- TVM_EDITLABELA = (TV_FIRST + 14);
- TVM_EDITLABELW = (TV_FIRST + 65);
-{$IFDEF UNICODE}
-
-TYPE
- TVM_EDITLABEL = TVM_EDITLABELW;
-{$ELSE}
- TVM_EDITLABEL = TVM_EDITLABELA;
-{$ENDIF}
-
-// Macro 184
-
-
-Function TreeView_EditLabel( hwnd : hwnd; hitem : HTREEITEM):HWND;
-
-
-
-
-CONST
- TVM_GETEDITCONTROL = (TV_FIRST + 15);
-// Macro 185
-
-
-Function TreeView_GetEditControl( hwnd : hwnd):HWND;
-
-
-
-
-CONST
- TVM_GETVISIBLECOUNT = (TV_FIRST + 16);
-// Macro 186
-
-
-Function TreeView_GetVisibleCount( hwnd : hwnd):UINT;
-
-
-
-
-CONST
- TVM_HITTEST = (TV_FIRST + 17);
-
-TYPE
-
- tagTVHITTESTINFO = Record
- pt : POINT;
- flags : UINT;
- hItem : HTREEITEM;
- END;
- TVHITTESTINFO = tagTVHITTESTINFO;
- LPTVHITTESTINFO = ^tagTVHITTESTINFO;
- TTVHITTESTINFO = tagTVHITTESTINFO;
- PTVHITTESTINFO = ^tagTVHITTESTINFO;
-
-
-{$ifdef ie3plus}
- LPTV_HITTESTINFO = LPTVHITTESTINFO;
- TV_HITTESTINFO = TVHITTESTINFO;
-{$ELSE}
- tagTVHITTESTINFO = _TV_HITTESTINFO;
- TVHITTESTINFO = TV_HITTESTINFO;
-
- LPTVHITTESTINFO = LPTV_HITTESTINFO;
-{$ENDIF}
-
-
-CONST
- TVHT_NOWHERE = $0001;
- TVHT_ONITEMICON = $0002;
- TVHT_ONITEMLABEL = $0004;
- TVHT_ONITEM = (TVHT_ONITEMICON OR TVHT_ONITEMLABEL OR TVHT_ONITEMSTATEICON);
- TVHT_ONITEMINDENT = $0008;
- TVHT_ONITEMBUTTON = $0010;
- TVHT_ONITEMRIGHT = $0020;
- TVHT_ONITEMSTATEICON = $0040;
-
- TVHT_ABOVE = $0100;
- TVHT_BELOW = $0200;
- TVHT_TORIGHT = $0400;
- TVHT_TOLEFT = $0800;
-
-
- TVM_CREATEDRAGIMAGE = (TV_FIRST + 18);
-
-// Macro 187
-Function TreeView_HitTest( hwnd : hwnd; lpht : LPTV_HITTESTINFO):HTREEITEM;inline;
-Function TreeView_HitTest( hwnd : hwnd; var lpht : TV_HITTESTINFO):HTREEITEM;inline;
-
-
-// Macro 188
-
-
-Function TreeView_CreateDragImage( hwnd : hwnd; hitem : HTREEITEM):HIMAGELIST;
-
-
-
-
-CONST
- TVM_SORTCHILDREN = (TV_FIRST + 19);
-// Macro 189
-
-
-Function TreeView_SortChildren( hwnd : hwnd; hitem : HTREEITEM; recurse : WPARAM):BOOL;
-
-
-
-
-CONST
- TVM_ENSUREVISIBLE = (TV_FIRST + 20);
-// Macro 190
-
-
-Function TreeView_EnsureVisible( hwnd : hwnd; hitem : HTREEITEM):BOOL;
-
-
-
-
-
-CONST
- TVM_ENDEDITLABELNOW = (TV_FIRST + 22);
-// Macro 192
-
-
-Function TreeView_EndEditLabelNow( hwnd : hwnd; fCancel : WPARAM):BOOL;inline;
-Function TreeView_EndEditLabelNow( hwnd : hwnd; fCancel : Bool):BOOL;inline;
-
-
-
-
-CONST
- TVM_GETISEARCHSTRINGA = (TV_FIRST + 23);
- TVM_GETISEARCHSTRINGW = (TV_FIRST + 64);
-
-{$IFDEF UNICODE}
-
-TYPE
- TVM_GETISEARCHSTRING= TVM_GETISEARCHSTRINGW;
-{$ELSE}
- TVM_GETISEARCHSTRING= TVM_GETISEARCHSTRINGA;
-{$ENDIF}
-
-{$ifdef ie3plus}
-
-CONST
- TVM_SETTOOLTIPS = (TV_FIRST + 24);
-// Macro 193
-
-
-Function TreeView_SetToolTips( hwnd : hwnd; hwndTT : WPARAM):HWND;
-
-
-CONST
- TVM_GETTOOLTIPS = (TV_FIRST + 25);
-// Macro 194
-
-
-Function TreeView_GetToolTips( hwnd : hwnd):HWND;
-
-{$ENDIF}
-
-// Macro 195
-
-
-Function TreeView_GetISearchString( hwndTV : hwnd; lpsz : LPTSTR):BOOL;
-
-
-{$ifdef ie4plus}
-
-CONST
- TVM_SETINSERTMARK = (TV_FIRST + 26);
-// Macro 196
-
-
-Function TreeView_SetInsertMark( hwnd : hwnd; hItem : LPARAM ; fAfter : WPARAM ):BOOL;
-
-
-
-CONST
- TVM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT;
-// Macro 197
-
-
-Function TreeView_SetUnicodeFormat( hwnd : hwnd; fUnicode : WPARAM):BOOL;
-
-
-
-CONST
- TVM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT;
-// Macro 198
-
-
-Function TreeView_GetUnicodeFormat( hwnd : hwnd):BOOL;
-
-
-{$ENDIF}
-
-{$ifdef ie4plus}
-
-CONST
- TVM_SETITEMHEIGHT = (TV_FIRST + 27);
-// Macro 199
-
-
-Function TreeView_SetItemHeight( hwnd : hwnd; iHeight : WPARAM):cint;
-
-
-CONST
- TVM_GETITEMHEIGHT = (TV_FIRST + 28);
-// Macro 200
-
-
-Function TreeView_GetItemHeight( hwnd : hwnd):cint;
-
-
-
-CONST
- TVM_SETBKCOLOR = (TV_FIRST + 29);
-// Macro 201
-
-
-Function TreeView_SetBkColor( hwnd : hwnd; clr : LPARAM):COLORREF;
-
-
-
-CONST
- TVM_SETTEXTCOLOR = (TV_FIRST + 30);
-// Macro 202
-
-
-Function TreeView_SetTextColor( hwnd : hwnd; clr : LPARAM):COLORREF;
-
-
-
-CONST
- TVM_GETBKCOLOR = (TV_FIRST + 31);
-
-// Macro 203
-Function TreeView_GetBkColor( hwnd : hwnd):COLORREF;
-
-
-CONST
- TVM_GETTEXTCOLOR = (TV_FIRST + 32);
-
-// Macro 204
-Function TreeView_GetTextColor( hwnd : hwnd):COLORREF;
-
-
-
-CONST
- TVM_SETSCROLLTIME = (TV_FIRST + 33);
-
-// Macro 205
-Function TreeView_SetScrollTime( hwnd : hwnd; uTime :wparam ):UINT;
-
-
-
-CONST
- TVM_GETSCROLLTIME = (TV_FIRST + 34);
-// Macro 206
-
-
-Function TreeView_GetScrollTime( hwnd : hwnd):UINT;
-
-
-
-
-CONST
- TVM_SETINSERTMARKCOLOR = (TV_FIRST + 37);
-// Macro 207
-
-
-Function TreeView_SetInsertMarkColor( hwnd : hwnd; clr : LPARAM):COLORREF;
-
-
-CONST
- TVM_GETINSERTMARKCOLOR = (TV_FIRST + 38);
-// Macro 208
-
-
-Function TreeView_GetInsertMarkColor( hwnd : hwnd):COLORREF;
-
-
-{$ENDIF} // (_WIN32_IE >= 0x0400)
-
-{$ifdef ie5plus}
-// tvm_?etitemstate only uses mask, state and stateMask.
-// so unicode or ansi is irrelevant.
-// Macro 209
-
-Procedure TreeView_SetItemState(hwndTV:HWND;hti:HTreeItem;data:UINT;_mask:UINT);
-
-
-// Macro 210
-
-Procedure TreeView_SetCheckState( hwndTV : hwnd; hti : HTreeItem ; fCheck : bool );
-
-
-CONST
- TVM_GETITEMSTATE = (TV_FIRST + 39);
-
-// Macro 211
-Function TreeView_GetItemState( hwndTV : hwnd; hti : WPARAM; mask : LPARAM):UINT;
-
-
-// Macro 212
-Function TreeView_GetCheckState( hwndTV : hwnd; hti : WPARAM):UINT;
-
-
-CONST
- TVM_SETLINECOLOR = (TV_FIRST + 40);
-// Macro 213
-Function TreeView_SetLineColor( hwnd : hwnd; clr : LPARAM):COLORREF;
-
-CONST
- TVM_GETLINECOLOR = (TV_FIRST + 41);
-
-// Macro 214
-Function TreeView_GetLineColor( hwnd : hwnd):COLORREF;
-
-
-{$ENDIF}
-
-{$ifdef Win32XP}
-
-CONST
- TVM_MAPACCIDTOHTREEITEM = (TV_FIRST + 42);
-
-// Macro 215
-Function TreeView_MapAccIDToHTREEITEM( hwnd : hwnd; id : UINT ):HTREEITEM;
-
-
-
-CONST
- TVM_MAPHTREEITEMTOACCID = (TV_FIRST + 43);
-
-// Macro 216
-Function TreeView_MapHTREEITEMToAccID( hwnd : hwnd; htreeitem : WPARAM):UINT;
-
-{$ENDIF}
-
-{$ifdef win32vista}
-CONST
- TVM_GETSELECTEDCOUNT = (TV_FIRST + 70);
- TVM_SHOWINFOTIP = (TV_FIRST + 71);
- TVM_GETITEMPARTRECT = (TV_FIRST + 72);
-
-Type
- TVITEMPART = (TVGIPR_BUTTON = $0001);
- pTVITEMPART = ^TVITEMPART;
-
- tagTVGETITEMPARTRECTINFO = Record
- hti :HTREEITEM ;
- prc :PRECT;
- partID :TVITEMPART;
- end;
- TVGETITEMPARTRECTINFO = tagTVGETITEMPARTRECTINFO;
-
-function TreeView_GetSelectedCount(hwnd:hwnd):DWORD;
-// (DWORD)SNDMSG((hwnd), TVM_GETSELECTEDCOUNT, 0, 0)
-
-function TreeView_ShowInfoTip(hwnd:HWND; hitem:HTREEITEM):DWORD;
-// (DWORD)SNDMSG((hwnd), TVM_SHOWINFOTIP, 0, (LPARAM)(hitem))
-
-function TreeView_GetItemPartRect(hwnd:HWND; hitem:HTREEITEM; prc:prect; partid:TVITEMPART):bool;
-//{ TVGETITEMPARTRECTINFO info; \
-// info.hti = (hitem); \
-// info.prc = (prc); \
-// info.partID = (partid); \
-// (BOOL)SNDMSG((hwnd), TVM_GETITEMPARTRECT, 0, (LPARAM)&info); \
-
-{$endif}
-
-
-TYPE
- PFNTVCOMPARE =function (lparam1:LPARAM;lparam2:LPARAM;lParamSort:LParam): cint; STDCALL;
- TTVCompare = PFNTVCOMPARE;
-
-
- tagTVSORTCB = Record
- hParent : HTREEITEM;
- lpfnCompare : PFNTVCOMPARE;
- lParam : LPARAM;
- END;
- TVSORTCB = tagTVSORTCB;
- LPTVSORTCB = ^tagTVSORTCB;
- TTVSORTCB = tagTVSORTCB;
- PTVSORTCB = ^tagTVSORTCB;
-
-{$ifdef ie3plus}
- LPTV_SORTCB = LPTVSORTCB;
-
-
- TV_SORTCB = TVSORTCB;
-{$ELSE}
- tagTVSORTCB = _TV_SORTCB;
- TVSORTCB = TV_SORTCB;
-
-
- LPTVSORTCB = LPTV_SORTCB;
-{$ENDIF}
-
-
- tagNMTREEVIEWA = Record
- hdr : NMHDR;
- action : UINT;
- itemOld : TVITEMA;
- itemNew : TVITEMA;
- ptDrag : POINT;
- END;
- NMTREEVIEWA = tagNMTREEVIEWA;
- LPNMTREEVIEWA = ^tagNMTREEVIEWA;
- TNMTREEVIEWA = tagNMTREEVIEWA;
- PNMTREEVIEWA = ^tagNMTREEVIEWA;
- PNMTreeView = PNMTreeViewA;
- TNMTreeView = TNMTreeViewA;
-
-
-
- tagNMTREEVIEWW = Record
- hdr : NMHDR;
- action : UINT;
- itemOld : TVITEMW;
- itemNew : TVITEMW;
- ptDrag : POINT;
- END;
- NMTREEVIEWW = tagNMTREEVIEWW;
- LPNMTREEVIEWW = ^tagNMTREEVIEWW;
- TNMTREEVIEWW = tagNMTREEVIEWW;
- PNMTREEVIEWW = ^tagNMTREEVIEWW;
-
-
-
-{$IFDEF UNICODE}
- NMTREEVIEW = NMTREEVIEWW;
- LPNMTREEVIEW = LPNMTREEVIEWW;
-{$ELSE}
- NMTREEVIEW = NMTREEVIEWA;
- LPNMTREEVIEW = LPNMTREEVIEWA;
-{$ENDIF}
-
-{$ifdef ie3plus}
- LPNM_TREEVIEWA = LPNMTREEVIEWA;
- LPNM_TREEVIEWW = LPNMTREEVIEWW;
- NM_TREEVIEWW = NMTREEVIEWW;
- NM_TREEVIEWA = NMTREEVIEWA;
-{$ELSE}
- tagNMTREEVIEWA = _NM_TREEVIEWA;
- tagNMTREEVIEWW = _NM_TREEVIEWW;
- NMTREEVIEWA = NM_TREEVIEWA;
- NMTREEVIEWW = NM_TREEVIEWW;
- LPNMTREEVIEWA = LPNM_TREEVIEWA;
- LPNMTREEVIEWW = LPNM_TREEVIEWW;
-{$ENDIF}
-
- LPNM_TREEVIEW = LPNMTREEVIEW;
- NM_TREEVIEW = NMTREEVIEW;
-
-
-
-CONST
- TVN_SELCHANGINGA = (TVN_FIRST-1);
- TVN_SELCHANGINGW = (TVN_FIRST-50);
- TVN_SELCHANGEDA = (TVN_FIRST-2);
- TVN_SELCHANGEDW = (TVN_FIRST-51);
-
- TVC_UNKNOWN = $0000;
- TVC_BYMOUSE = $0001;
- TVC_BYKEYBOARD = $0002;
-
- TVN_GETDISPINFOA = (TVN_FIRST-3);
- TVN_GETDISPINFOW = (TVN_FIRST-52);
- TVN_SETDISPINFOA = (TVN_FIRST-4);
- TVN_SETDISPINFOW = (TVN_FIRST-53);
-
- TVIF_DI_SETITEM = $1000;
-
-Type
- tagTVDISPINFOA = Record
- hdr : NMHDR;
- item : TVITEMA;
- END;
- NMTVDISPINFOA = tagTVDISPINFOA;
- LPNMTVDISPINFOA = ^tagTVDISPINFOA;
- TTVDISPINFOA = tagTVDISPINFOA;
- PTVDISPINFOA = ^tagTVDISPINFOA;
- TTVDispInfo = TTVDISPINFOA;
- PTVDispInfo = PTVDISPINFOA;
-
-
- tagTVDISPINFOW = Record
- hdr : NMHDR;
- item : TVITEMW;
- END;
- NMTVDISPINFOW = tagTVDISPINFOW;
- LPNMTVDISPINFOW = ^tagTVDISPINFOW;
- TTVDISPINFOW = tagTVDISPINFOW;
- PTVDISPINFOW = ^tagTVDISPINFOW;
-
-{$IFDEF UNICODE}
- NMTVDISPINFO = NMTVDISPINFOW;
- LPNMTVDISPINFO = LPNMTVDISPINFOW;
-{$ELSE}
- NMTVDISPINFO = NMTVDISPINFOA;
- LPNMTVDISPINFO = LPNMTVDISPINFOA;
-{$ENDIF}
-
-{$ifdef IE6plus}
- tagTVDISPINFOEXA = Record
- hdr : NMHDR;
- item :TVITEMEXA;
- end;
- NMTVDISPINFOEXA = tagTVDISPINFOEXA;
- LPNMTVDISPINFOEXA = ^tagTVDISPINFOEXA;
-
- tagTVDISPINFOEXW = Record
- hdr : NMHDR;
- item :TVITEMEXW;
- end;
- NMTVDISPINFOEXW = tagTVDISPINFOEXW;
- LPNMTVDISPINFOEXW = ^tagTVDISPINFOEXW;
-
-{$IFDEF UNICODE}
- NMTVDISPINFOEX = NMTVDISPINFOEXW;
- LPNMTVDISPINFOEX = LPNMTVDISPINFOEXW;
-{$ELSE}
- NMTVDISPINFOEX = NMTVDISPINFOEXA;
- LPNMTVDISPINFOEX = LPNMTVDISPINFOEXA;
-{$ENDIF}
-
- TV_DISPINFOEXA = NMTVDISPINFOEXA;
- TV_DISPINFOEXW = NMTVDISPINFOEXW;
- TV_DISPINFOEX = NMTVDISPINFOEX;
-
-
-{$endif}
-
-{$ifdef ie3plus}
- TV_DISPINFOA = NMTVDISPINFOA;
- TV_DISPINFOW = NMTVDISPINFOW;
-{$ELSE}
- tagTVDISPINFOA = _TV_DISPINFOA;
- NMTVDISPINFOA = TV_DISPINFOA;
- tagTVDISPINFOW = _TV_DISPINFOW;
- NMTVDISPINFOW = TV_DISPINFOW;
-{$ENDIF}
- TV_DISPINFO = NMTVDISPINFO;
-
-
-CONST
- TVM_SORTCHILDRENCB = (TV_FIRST + 21);
-
-// Macro 191
-Function TreeView_SortChildrenCB( hwnd : hwnd;psort :lpTV_sortcb; recurse : WPARAM):BOOL;inline;
-Function TreeView_SortChildrenCB( hwnd : hwnd;const psort :tagTVsortcb; recurse : WPARAM):BOOL;inline;
-
-CONST
- TVN_ITEMEXPANDINGA = (TVN_FIRST-5);
- TVN_ITEMEXPANDINGW = (TVN_FIRST-54);
- TVN_ITEMEXPANDEDA = (TVN_FIRST-6);
- TVN_ITEMEXPANDEDW = (TVN_FIRST-55);
- TVN_BEGINDRAGA = (TVN_FIRST-7);
- TVN_BEGINDRAGW = (TVN_FIRST-56);
- TVN_BEGINRDRAGA = (TVN_FIRST-8);
- TVN_BEGINRDRAGW = (TVN_FIRST-57);
- TVN_DELETEITEMA = (TVN_FIRST-9);
- TVN_DELETEITEMW = (TVN_FIRST-58);
- TVN_BEGINLABELEDITA = (TVN_FIRST-10);
- TVN_BEGINLABELEDITW = (TVN_FIRST-59);
- TVN_ENDLABELEDITA = (TVN_FIRST-11);
- TVN_ENDLABELEDITW = (TVN_FIRST-60);
- TVN_KEYDOWN = (TVN_FIRST-12);
-
-{$ifdef ie4plus}
- TVN_GETINFOTIPA = (TVN_FIRST-13);
- TVN_GETINFOTIPW = (TVN_FIRST-14);
- TVN_SINGLEEXPAND = (TVN_FIRST-15);
-
- TVNRET_DEFAULT = 0;
- TVNRET_SKIPOLD = 1;
- TVNRET_SKIPNEW = 2;
-
-{$ifdef win32vista}
- TVN_ITEMCHANGINGA = (TVN_FIRST-16);
- TVN_ITEMCHANGINGW = (TVN_FIRST-17);
- TVN_ITEMCHANGEDA = (TVN_FIRST-18);
- TVN_ITEMCHANGEDW = (TVN_FIRST-19);
- TVN_ASYNCDRAW = (TVN_FIRST-20);
-{$endif}
-
-{$ENDIF} // 0x400
-
-
-
-{$IFDEF _WIN32}
-// #include <pshpack1.h>
-{$ENDIF}
-
-TYPE
-
- tagTVKEYDOWN = Record
- hdr : NMHDR;
- wVKey : WORD;
- flags : UINT;
- END;
- NMTVKEYDOWN = tagTVKEYDOWN;
- LPNMTVKEYDOWN = ^tagTVKEYDOWN;
- TTVKEYDOWN = tagTVKEYDOWN;
- PTVKEYDOWN = ^tagTVKEYDOWN;
-
-{$ifdef ie3plus}
- TV_KEYDOWN = NMTVKEYDOWN;
-{$ELSE}
- tagTVKEYDOWN = _TV_KEYDOWN;
- NMTVKEYDOWN = TV_KEYDOWN;
-{$ENDIF}
-
-
-{$IFDEF _WIN32}
-// #include <poppack.h>
-{$ENDIF}
-
-Const
-
-{$IFDEF UNICODE}
- TVN_SELCHANGING = TVN_SELCHANGINGW;
- TVN_SELCHANGED = TVN_SELCHANGEDW;
- TVN_GETDISPINFO = TVN_GETDISPINFOW;
- TVN_SETDISPINFO = TVN_SETDISPINFOW;
- TVN_ITEMEXPANDING = TVN_ITEMEXPANDINGW;
- TVN_ITEMEXPANDED = TVN_ITEMEXPANDEDW;
- TVN_BEGINDRAG = TVN_BEGINDRAGW;
- TVN_BEGINRDRAG = TVN_BEGINRDRAGW;
- TVN_DELETEITEM = TVN_DELETEITEMW;
- TVN_BEGINLABELEDIT = TVN_BEGINLABELEDITW;
- TVN_ENDLABELEDIT = TVN_ENDLABELEDITW;
-{$ELSE}
- TVN_SELCHANGING = TVN_SELCHANGINGA;
- TVN_SELCHANGED = TVN_SELCHANGEDA;
- TVN_GETDISPINFO = TVN_GETDISPINFOA;
- TVN_SETDISPINFO = TVN_SETDISPINFOA;
- TVN_ITEMEXPANDING = TVN_ITEMEXPANDINGA;
- TVN_ITEMEXPANDED = TVN_ITEMEXPANDEDA;
- TVN_BEGINDRAG = TVN_BEGINDRAGA;
- TVN_BEGINRDRAG = TVN_BEGINRDRAGA;
- TVN_DELETEITEM = TVN_DELETEITEMA;
- TVN_BEGINLABELEDIT = TVN_BEGINLABELEDITA;
- TVN_ENDLABELEDIT = TVN_ENDLABELEDITA;
-{$ENDIF}
-
-
-{$ifdef ie3plus}
-// #define NMTVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMTVCUSTOMDRAW, clrTextBk)
-Type
- tagNMTVCUSTOMDRAW = Record
- nmcd : NMCUSTOMDRAW;
- clrText : COLORREF;
- clrTextBk : COLORREF;
-{$ifdef ie4plus}
- iLevel : cint;
-{$ENDIF}
- END;
- NMTVCUSTOMDRAW = tagNMTVCUSTOMDRAW;
- LPNMTVCUSTOMDRAW = ^tagNMTVCUSTOMDRAW;
- TNMTVCUSTOMDRAW = tagNMTVCUSTOMDRAW;
- PNMTVCUSTOMDRAW = ^tagNMTVCUSTOMDRAW;
-
-{$ENDIF}
-
-
-{$ifdef ie4plus}
-
-// for tooltips
-
- tagNMTVGETINFOTIPA = Record
- hdr : NMHDR;
- pszText : LPSTR;
- cchTextMax : cint;
- hItem : HTREEITEM;
- lParam : LPARAM;
- END;
- NMTVGETINFOTIPA = tagNMTVGETINFOTIPA;
- LPNMTVGETINFOTIPA = ^tagNMTVGETINFOTIPA;
- TNMTVGETINFOTIPA = tagNMTVGETINFOTIPA;
- PNMTVGETINFOTIPA = ^tagNMTVGETINFOTIPA;
-
-
- tagNMTVGETINFOTIPW = Record
- hdr : NMHDR;
- pszText : LPWSTR;
- cchTextMax : cint;
- hItem : HTREEITEM;
- lParam : LPARAM;
- END;
- NMTVGETINFOTIPW = tagNMTVGETINFOTIPW;
- LPNMTVGETINFOTIPW = ^tagNMTVGETINFOTIPW;
- TNMTVGETINFOTIPW = tagNMTVGETINFOTIPW;
- PNMTVGETINFOTIPW = ^tagNMTVGETINFOTIPW;
-
-
-CONST
-{$IFDEF UNICODE}
- TVN_GETINFOTIP = TVN_GETINFOTIPW;
-TYPE
- NMTVGETINFOTIP = NMTVGETINFOTIPW;
- LPNMTVGETINFOTIP = LPNMTVGETINFOTIPW;
-{$ELSE}
- TVN_GETINFOTIP = TVN_GETINFOTIPA;
-TYPE
- NMTVGETINFOTIP = NMTVGETINFOTIPA;
- LPNMTVGETINFOTIP = LPNMTVGETINFOTIPA;
-{$ENDIF}
-
-// treeview's customdraw return meaning don't draw images. valid on CDRF_NOTIFYITEMPREPAINT
-
-CONST
- TVCDRF_NOIMAGES = $00010000;
-
-{$ENDIF} // _WIN32_IE >= 0x0400
-
-{$ifdef ie6plus}
-Type
- tagTVITEMCHANGE = packed record
- hdr : NMHDR;
- uChanged : UINT;
- hItem : HTREEITEM;
- uStateNew : UINT;
- uStateOld : UINT;
- lParam : LPARAM;
- end;
- NMTVITEMCHANGE = tagTVITEMCHANGE;
- PNMTVITEMCHANGE = ^NMTVITEMCHANGE;
-
- tagNMTVASYNCDRAW = packed record
- hdr : NMHDR;
- pimldp : PIMAGELISTDRAWPARAMS; { the draw that failed }
- hr : HRESULT; { why it failed }
- hItem : HTREEITEM; { item that failed to draw icon }
- lParam : LPARAM; { its data }
- dwRetFlags : DWORD; { Out Params }
- iRetImageIndex : longint; { What listview should do on return }
- end; { used if ADRF_DRAWIMAGE is returned }
- NMTVASYNCDRAW = tagNMTVASYNCDRAW;
- PNMTVASYNCDRAW = ^NMTVASYNCDRAW;
-
-CONST
-{$IFDEF UNICODE}
- TVN_ITEMCHANGING = TVN_ITEMCHANGINGW;
- TVN_ITEMCHANGED = TVN_ITEMCHANGEDW;
-{$ELSE}
- TVN_ITEMCHANGING = TVN_ITEMCHANGINGA;
- TVN_ITEMCHANGED = TVN_ITEMCHANGEDA;
-{$ENDIF}
-{$endif}
-
-{$ENDIF} // NOTREEVIEW
-
-{$ifdef ie3plus}
-
-{$IFNDEF NOUSEREXCONTROLS}
-
-//////////////////// ComboBoxEx ////////////////////////////////
-
- WC_COMBOBOXEXW = {L}'ComboBoxEx32';
- WC_COMBOBOXEXA = 'ComboBoxEx32';
-
-
-{$IFDEF UNICODE}
- WC_COMBOBOXEX = WC_COMBOBOXEXW;
-{$ELSE}
- WC_COMBOBOXEX = WC_COMBOBOXEXA;
-{$ENDIF}
-
-CONST
- CBEIF_TEXT = $00000001;
- CBEIF_IMAGE = $00000002;
- CBEIF_SELECTEDIMAGE = $00000004;
- CBEIF_OVERLAY = $00000008;
- CBEIF_INDENT = $00000010;
- CBEIF_LPARAM = $00000020;
- CBEIF_DI_SETITEM = $10000000;
-
-TYPE
-
- tagCOMBOBOXEXITEMA = Record
- mask : UINT;
- iItem : INT_PTR;
- pszText : LPSTR;
- cchTextMax : cint;
- iImage : cint;
- iSelectedImage : cint;
- iOverlay : cint;
- iIndent : cint;
- lParam : LPARAM;
- END;
- COMBOBOXEXITEMA = tagCOMBOBOXEXITEMA;
- PCOMBOBOXEXITEMA = ^tagCOMBOBOXEXITEMA;
- TCOMBOBOXEXITEMA = tagCOMBOBOXEXITEMA;
-// PCOMBOBOXEXITEMA = ^tagCOMBOBOXEXITEMA;
-
- PCCOMBOBOXEXITEMA = ^COMBOBOXEXITEMA;
-
-
- tagCOMBOBOXEXITEMW = Record
- mask : UINT;
- iItem : INT_PTR;
- pszText : LPWSTR;
- cchTextMax : cint;
- iImage : cint;
- iSelectedImage : cint;
- iOverlay : cint;
- iIndent : cint;
- lParam : LPARAM;
- END;
- COMBOBOXEXITEMW = tagCOMBOBOXEXITEMW;
- PCOMBOBOXEXITEMW = ^tagCOMBOBOXEXITEMW;
- TCOMBOBOXEXITEMW = tagCOMBOBOXEXITEMW;
-// PCOMBOBOXEXITEMW = ^tagCOMBOBOXEXITEMW;
-
- PCCOMBOBOXEXITEMW = ^COMBOBOXEXITEMW;
-
-{$IFDEF UNICODE}
- COMBOBOXEXITEM = COMBOBOXEXITEMW;
- PCOMBOBOXEXITEM = PCOMBOBOXEXITEMW;
- PCCOMBOBOXEXITEM = PCCOMBOBOXEXITEMW;
-{$ELSE}
- COMBOBOXEXITEM = COMBOBOXEXITEMA;
- PCOMBOBOXEXITEM = PCOMBOBOXEXITEMA;
- PCCOMBOBOXEXITEM = PCCOMBOBOXEXITEMA;
-{$ENDIF}
- TComboBoxExItem = COMBOBOXEXITEM;
-
-
-CONST
- CBEM_INSERTITEMA = (WM_USER + 1);
- CBEM_SETIMAGELIST = (WM_USER + 2);
- CBEM_GETIMAGELIST = (WM_USER + 3);
- CBEM_GETITEMA = (WM_USER + 4);
- CBEM_SETITEMA = (WM_USER + 5);
- CBEM_DELETEITEM = CB_DELETESTRING;
- CBEM_GETCOMBOCONTROL = (WM_USER + 6);
- CBEM_GETEDITCONTROL = (WM_USER + 7);
-{$ifdef ie4plus}
- CBEM_SETEXSTYLE = (WM_USER + 8); // use SETEXTENDEDSTYLE instead
- CBEM_SETEXTENDEDSTYLE = (WM_USER + 14); // lparam == new style, wParam (optional) == mask
- CBEM_GETEXSTYLE = (WM_USER + 9); // use GETEXTENDEDSTYLE instead
- CBEM_GETEXTENDEDSTYLE = (WM_USER + 9);
- CBEM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT;
- CBEM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT;
-{$ELSE}
- CBEM_SETEXSTYLE = (WM_USER + 8);
- CBEM_GETEXSTYLE = (WM_USER + 9);
-{$ENDIF}
- CBEM_HASEDITCHANGED = (WM_USER + 10);
- CBEM_INSERTITEMW = (WM_USER + 11);
- CBEM_SETITEMW = (WM_USER + 12);
- CBEM_GETITEMW = (WM_USER + 13);
-
-{$IFDEF UNICODE}
-
- CBEM_INSERTITEM = CBEM_INSERTITEMW;
- CBEM_SETITEM = CBEM_SETITEMW;
- CBEM_GETITEM = CBEM_GETITEMW;
-{$ELSE}
- CBEM_INSERTITEM = CBEM_INSERTITEMA;
- CBEM_SETITEM = CBEM_SETITEMA;
- CBEM_GETITEM = CBEM_GETITEMA;
-{$ENDIF}
-
-{$ifdef win32xp}
-
- CBEM_SETWINDOWTHEME = CCM_SETWINDOWTHEME;
-{$ENDIF}
-
- CBES_EX_NOEDITIMAGE = $00000001;
- CBES_EX_NOEDITIMAGEINDENT = $00000002;
- CBES_EX_PATHWORDBREAKPROC = $00000004;
-{$ifdef ie4plus}
- CBES_EX_NOSIZELIMIT = $00000008;
- CBES_EX_CASESENSITIVE = $00000010;
-{$ifdef win32vista}
- CBES_EX_TEXTENDELLIPSIS = $00000020;
-{$endif}
-TYPE
-
- DummyStruct9 = Record
- hdr : NMHDR;
- ceItem : COMBOBOXEXITEMA;
- END;
- NMCOMBOBOXEXA = DummyStruct9;
- PNMCOMBOBOXEXA = ^DummyStruct9;
- TDummyStruct9 = DummyStruct9;
- PDummyStruct9 = ^DummyStruct9;
-
-
- DummyStruct10 = Record
- hdr : NMHDR;
- ceItem : COMBOBOXEXITEMW;
- END;
- NMCOMBOBOXEXW = DummyStruct10;
- PNMCOMBOBOXEXW = ^DummyStruct10;
- TDummyStruct10 = DummyStruct10;
- PDummyStruct10 = ^DummyStruct10;
-
-
-
-{$ELSE}
- DummyStruct11 = Record
- hdr : NMHDR;
- ceItem : COMBOBOXEXITEM;
- END;
- NMCOMBOBOXEX = DummyStruct11;
- PNMCOMBOBOXEX = ^DummyStruct11;
- TDummyStruct11 = DummyStruct11;
- PDummyStruct11 = ^DummyStruct11;
-
-
-
-CONST
- CBEN_GETDISPINFO = (CBEN_FIRST - 0);
-
-{$ENDIF} // _WIN32_IE >= 0x0400
-CONST
-{$ifdef ie4plus}
- CBEN_GETDISPINFOA = (CBEN_FIRST - 0);
-{$ENDIF}
- CBEN_INSERTITEM = (CBEN_FIRST - 1);
- CBEN_DELETEITEM = (CBEN_FIRST - 2);
- CBEN_BEGINEDIT = (CBEN_FIRST - 4);
- CBEN_ENDEDITA = (CBEN_FIRST - 5);
- CBEN_ENDEDITW = (CBEN_FIRST - 6);
-
-{$ifdef ie4plus}
- CBEN_GETDISPINFOW = (CBEN_FIRST - 7);
-{$ENDIF}
-
-{$ifdef ie4plus}
- CBEN_DRAGBEGINA = (CBEN_FIRST - 8);
- CBEN_DRAGBEGINW = (CBEN_FIRST - 9);
-
-{$IFDEF UNICODE}
-
- CBEN_DRAGBEGIN = CBEN_DRAGBEGINW;
-{$ELSE}
- CBEN_DRAGBEGIN = CBEN_DRAGBEGINA;
-{$ENDIF}
-
-{$ENDIF} //(_WIN32_IE >= 0x0400)
-TYPE
-{$IFDEF UNICODE}
- NMCOMBOBOXEX = NMCOMBOBOXEXW;
- PNMCOMBOBOXEX = PNMCOMBOBOXEXW;
-CONST
- CBEN_GETDISPINFO = CBEN_GETDISPINFOW;
-{$ELSE}
- NMCOMBOBOXEX = NMCOMBOBOXEXA;
- PNMCOMBOBOXEX = PNMCOMBOBOXEXA;
-CONST
- CBEN_GETDISPINFO = CBEN_GETDISPINFOA;
-{$ENDIF}
-
-// lParam specifies why the endedit is happening
-{$IFDEF UNICODE}
- CBEN_ENDEDIT = CBEN_ENDEDITW;
-{$ELSE}
- CBEN_ENDEDIT = CBEN_ENDEDITA;
-{$ENDIF}
-
-
-CONST
- CBENF_KILLFOCUS = 1;
- CBENF_RETURN = 2;
- CBENF_ESCAPE = 3;
- CBENF_DROPDOWN = 4;
-
- CBEMAXSTRLEN = 260;
-
-{$ifdef ie4plus}
-// CBEN_DRAGBEGIN sends this information ...
-
-TYPE
-
- DummyStruct12 = Record
- hdr : NMHDR;
- iItemid : cint;
- szText : Array[0..CBEMAXSTRLEN-1] OF WCHAR;
- END;
- NMCBEDRAGBEGINW = DummyStruct12;
- LPNMCBEDRAGBEGINW = ^DummyStruct12;
- PNMCBEDRAGBEGINW = ^DummyStruct12;
- TDummyStruct12 = DummyStruct12;
- PDummyStruct12 = ^DummyStruct12;
-
-
-
- DummyStruct13 = Record
- hdr : NMHDR;
- iItemid : cint;
- szText : Array[0..CBEMAXSTRLEN-1] OF char;
- END;
- NMCBEDRAGBEGINA = DummyStruct13;
- LPNMCBEDRAGBEGINA = ^DummyStruct13;
- PNMCBEDRAGBEGINA = ^DummyStruct13;
- TDummyStruct13 = DummyStruct13;
- PDummyStruct13 = ^DummyStruct13;
-
-
-{$IFDEF UNICODE}
- NMCBEDRAGBEGIN = NMCBEDRAGBEGINW;
- LPNMCBEDRAGBEGIN = LPNMCBEDRAGBEGINW;
- PNMCBEDRAGBEGIN = PNMCBEDRAGBEGINW;
-{$ELSE}
- NMCBEDRAGBEGIN = NMCBEDRAGBEGINA;
- LPNMCBEDRAGBEGIN = LPNMCBEDRAGBEGINA;
- PNMCBEDRAGBEGIN = PNMCBEDRAGBEGINA;
-{$ENDIF}
-{$ENDIF} // _WIN32_IE >= 0x0400
-
-// CBEN_ENDEDIT sends this information...
-// fChanged if the user actually did anything
-// iNewSelection gives what would be the new selection unless the notify is failed
-// iNewSelection may be CB_ERR if there's no match
- DummyStruct14 = Record
- hdr : NMHDR;
- fChanged : BOOL;
- iNewSelection : cint;
- szText : Array[0..CBEMAXSTRLEN-1] OF WCHAR;
- iWhy : cint;
- END;
- NMCBEENDEDITW = DummyStruct14;
- LPNMCBEENDEDITW = ^DummyStruct14;
- PNMCBEENDEDITW = ^DummyStruct14;
- TDummyStruct14 = DummyStruct14;
- PDummyStruct14 = ^DummyStruct14;
-
-
- DummyStruct15 = Record
- hdr : NMHDR;
- fChanged : BOOL;
- iNewSelection : cint;
- szText : Array[0..CBEMAXSTRLEN-1] OF char;
- iWhy : cint;
- END;
- NMCBEENDEDITA = DummyStruct15;
- LPNMCBEENDEDITA = ^DummyStruct15;
- PNMCBEENDEDITA = ^DummyStruct15;
- TDummyStruct15 = DummyStruct15;
- PDummyStruct15 = ^DummyStruct15;
-
-
-{$IFDEF UNICODE}
- NMCBEENDEDIT = NMCBEENDEDITW;
- LPNMCBEENDEDIT = LPNMCBEENDEDITW;
- PNMCBEENDEDIT = PNMCBEENDEDITW;
-{$ELSE}
- NMCBEENDEDIT = NMCBEENDEDITA;
- LPNMCBEENDEDIT = LPNMCBEENDEDITA;
- PNMCBEENDEDIT = PNMCBEENDEDITA;
-{$ENDIF}
-
-{$ENDIF}
-
-{$ENDIF} // _WIN32_IE >= 0x0300
-
-
-
-//====== TAB CONTROL ==========================================================
-
-{$IFNDEF NOTABCONTROL}
-
-{$IFDEF _WIN32}
-
-
-CONST
- WC_TABCONTROLA = 'SysTabControl32';
- WC_TABCONTROLW = {L}'SysTabControl32';
-
-{$IFDEF UNICODE}
-
-TYPE
- WC_TABCONTROL = WC_TABCONTROLW;
-{$ELSE}
- WC_TABCONTROL = WC_TABCONTROLA;
-{$ENDIF}
-
-{$ELSE}
-
-CONST
- WC_TABCONTROL = 'SysTabControl';
-{$ENDIF}
-
-// begin_r_commctrl
-
-{$ifdef ie3plus}
- TCS_SCROLLOPPOSITE = $0001; // assumes multiline tab
- TCS_BOTTOM = $0002;
- TCS_RIGHT = $0002;
- TCS_MULTISELECT = $0004; // allow multi-select in button mode
-{$ENDIF}
-{$ifdef ie4plus}
- TCS_FLATBUTTONS = $0008;
-{$ENDIF}
- TCS_FORCEICONLEFT = $0010;
- TCS_FORCELABELLEFT = $0020;
-{$ifdef ie3plus}
- TCS_HOTTRACK = $0040;
- TCS_VERTICAL = $0080;
-{$ENDIF}
- TCS_TABS = $0000;
- TCS_BUTTONS = $0100;
- TCS_SINGLELINE = $0000;
- TCS_MULTILINE = $0200;
- TCS_RIGHTJUSTIFY = $0000;
- TCS_FIXEDWIDTH = $0400;
- TCS_RAGGEDRIGHT = $0800;
- TCS_FOCUSONBUTTONDOWN = $1000;
- TCS_OWNERDRAWFIXED = $2000;
- TCS_TOOLTIPS = $4000;
- TCS_FOCUSNEVER = $8000;
-
-// end_r_commctrl
-
-{$ifdef ie4plus}
-// EX styles for use with TCM_SETEXTENDEDSTYLE
- TCS_EX_FLATSEPARATORS = $00000001;
- TCS_EX_REGISTERDROP = $00000002;
-{$ENDIF}
-
-
- TCM_GETIMAGELIST = (TCM_FIRST + 2);
-// Macro 217
-
-
-Function TabCtrl_GetImageList( hwnd : hwnd):HIMAGELIST;
-
-
-
-
-CONST
- TCM_SETIMAGELIST = (TCM_FIRST + 3);
-// Macro 218
-
-
-Function TabCtrl_SetImageList( hwnd : hwnd; himl : HIMAGELIST):HIMAGELIST;
-
-
-
-
-CONST
- TCM_GETITEMCOUNT = (TCM_FIRST + 4);
-// Macro 219
-
-
-Function TabCtrl_GetItemCount( hwnd : hwnd):cint;
-
-
-
-
-CONST
- TCIF_TEXT = $0001;
- TCIF_IMAGE = $0002;
- TCIF_RTLREADING = $0004;
- TCIF_PARAM = $0008;
-{$ifdef ie3plus}
- TCIF_STATE = $0010;
-
-
- TCIS_BUTTONPRESSED = $0001;
-{$ENDIF}
-{$ifdef ie4plus}
- TCIS_HIGHLIGHTED = $0002;
-{$ENDIF}
-TYPE
-
-
-
-
- tagTCITEMHEADERA = Record
- mask : UINT;
- lpReserved1 : UINT;
- lpReserved2 : UINT;
- pszText : LPSTR;
- cchTextMax : cint;
- iImage : cint;
- END;
- TCITEMHEADERA = tagTCITEMHEADERA;
- LPTCITEMHEADERA = ^tagTCITEMHEADERA;
- TTCITEMHEADERA = tagTCITEMHEADERA;
- PTCITEMHEADERA = ^tagTCITEMHEADERA;
-
-
- tagTCITEMHEADERW = Record
- mask : UINT;
- lpReserved1 : UINT;
- lpReserved2 : UINT;
- pszText : LPWSTR;
- cchTextMax : cint;
- iImage : cint;
- END;
- TCITEMHEADERW = tagTCITEMHEADERW;
- LPTCITEMHEADERW = ^tagTCITEMHEADERW;
- TTCITEMHEADERW = tagTCITEMHEADERW;
- PTCITEMHEADERW = ^tagTCITEMHEADERW;
-
-
-{$IFDEF UNICODE}
- TCITEMHEADER = TCITEMHEADERW;
- LPTCITEMHEADER = LPTCITEMHEADERW;
-{$ELSE}
- TCITEMHEADER = TCITEMHEADERA;
- LPTCITEMHEADER = LPTCITEMHEADERA;
-{$ENDIF}
-
-
-{$ifdef ie3plus}
- TC_ITEMHEADERA = TCITEMHEADERA;
- TC_ITEMHEADERW = TCITEMHEADERW;
-{$ELSE}
- tagTCITEMHEADERA = _TC_ITEMHEADERA;
- TCITEMHEADERA = TC_ITEMHEADERA;
- tagTCITEMHEADERW = _TC_ITEMHEADERW;
- TCITEMHEADERW = TC_ITEMHEADERW;
-{$ENDIF}
-
-
- TC_ITEMHEADER = TCITEMHEADER;
-
-
-
-
-
- tagTCITEMA = Record
- mask : UINT;
-{$ifdef ie3plus}
- dwState : DWORD;
- dwStateMask : DWORD;
-{$ELSE}
- lpReserved1 : UINT;
- lpReserved2 : UINT;
-{$ENDIF}
- pszText : LPSTR;
- cchTextMax : cint;
- iImage : cint;
- lParam : LPARAM;
- END;
- TCITEMA = tagTCITEMA;
- LPTCITEMA = ^tagTCITEMA;
- TTCITEMA = tagTCITEMA;
- PTCITEMA = ^tagTCITEMA;
-
-
- tagTCITEMW = Record
- mask : UINT;
-{$ifdef ie3plus}
- dwState : DWORD;
- dwStateMask : DWORD;
-{$ELSE}
- lpReserved1 : UINT;
- lpReserved2 : UINT;
-{$ENDIF}
- pszText : LPWSTR;
- cchTextMax : cint;
- iImage : cint;
- lParam : LPARAM;
- END;
- TCITEMW = tagTCITEMW;
- LPTCITEMW = ^tagTCITEMW;
- TTCITEMW = tagTCITEMW;
- PTCITEMW = ^tagTCITEMW;
-
-
-{$IFDEF UNICODE}
- TCITEM = TCITEMW;
- LPTCITEM = LPTCITEMW;
-{$ELSE}
- TCITEM = TCITEMA;
- LPTCITEM = LPTCITEMA;
-{$ENDIF}
-
-
-{$ifdef ie3plus}
- TC_ITEMA = TCITEMA;
- TC_ITEMW = TCITEMW;
-{$ELSE}
- tagTCITEMA = _TC_ITEMA;
- TCITEMA = TC_ITEMA;
- tagTCITEMW = _TC_ITEMW;
- TCITEMW = TC_ITEMW;
-{$ENDIF}
-
-
- TC_ITEM = TCITEM;
-
-
-
-
-CONST
- TCM_GETITEMA = (TCM_FIRST + 5);
- TCM_GETITEMW = (TCM_FIRST + 60);
-
-{$IFDEF UNICODE}
-
-TYPE
- TCM_GETITEM = TCM_GETITEMW;
-{$ELSE}
- TCM_GETITEM = TCM_GETITEMA;
-{$ENDIF}
-
-// Macro 220
-Function TabCtrl_GetItem( hwnd : hwnd; iItem : cint;var pitem : TC_ITEM ):BOOL;
-
-
-
-
-CONST
- TCM_SETITEMA = (TCM_FIRST + 6);
- TCM_SETITEMW = (TCM_FIRST + 61);
-
-{$IFDEF UNICODE}
-
-TYPE
- TCM_SETITEM = TCM_SETITEMW;
-{$ELSE}
- TCM_SETITEM = TCM_SETITEMA;
-{$ENDIF}
-
-// Macro 221
-Function TabCtrl_SetItem( hwnd : hwnd; iItem : cint;var pitem : TC_ITEM ):BOOL;
-
-
-
-
-CONST
- TCM_INSERTITEMA = (TCM_FIRST + 7);
- TCM_INSERTITEMW = (TCM_FIRST + 62);
-
-{$IFDEF UNICODE}
- TCM_INSERTITEM = TCM_INSERTITEMW;
-{$ELSE}
- TCM_INSERTITEM = TCM_INSERTITEMA;
-{$ENDIF}
-
-// Macro 222
-Function TabCtrl_InsertItem( hwnd : hwnd; iItem : cint;CONST pitem : TC_ITEM ):cint;
-
-
-CONST
- TCM_DELETEITEM = (TCM_FIRST + 8);
-
-// Macro 223
-Function TabCtrl_DeleteItem( hwnd : hwnd; i : cint):BOOL;
-
-CONST
- TCM_DELETEALLITEMS = (TCM_FIRST + 9);
-
-// Macro 224
-Function TabCtrl_DeleteAllItems( hwnd : hwnd):BOOL;
-
-CONST
- TCM_GETITEMRECT = (TCM_FIRST + 10);
-
-// Macro 225
-Function TabCtrl_GetItemRect( hwnd : hwnd; i : cint;var prc : RECT ):BOOL;
-
-CONST
- TCM_GETCURSEL = (TCM_FIRST + 11);
-// Macro 226
-
-Function TabCtrl_GetCurSel( hwnd : hwnd):cint;
-
-
-CONST
- TCM_SETCURSEL = (TCM_FIRST + 12);
-
-// Macro 227
-Function TabCtrl_SetCurSel( hwnd : hwnd; i : WPARAM):cint;
-
-CONST
- TCHT_NOWHERE = $0001;
- TCHT_ONITEMICON = $0002;
- TCHT_ONITEMLABEL = $0004;
- TCHT_ONITEM = (TCHT_ONITEMICON OR TCHT_ONITEMLABEL);
-
-TYPE
-
- tagTCHITTESTINFO = Record
- pt : POINT;
- flags : UINT;
- END;
- TCHITTESTINFO = tagTCHITTESTINFO;
- LPTCHITTESTINFO = ^tagTCHITTESTINFO;
- TTCHITTESTINFO = tagTCHITTESTINFO;
- PTCHITTESTINFO = ^tagTCHITTESTINFO;
-
-{$ifdef ie3plus}
- LPTC_HITTESTINFO = LPTCHITTESTINFO;
- TC_HITTESTINFO = TCHITTESTINFO;
-{$ELSE}
- tagTCHITTESTINFO = _TC_HITTESTINFO;
- TCHITTESTINFO = TC_HITTESTINFO;
- LPTCHITTESTINFO = LPTC_HITTESTINFO;
-{$ENDIF}
-
-
-CONST
- TCM_HITTEST = (TCM_FIRST + 13);
-
-// Macro 228
-Function TabCtrl_HitTest( hwndTC : hwnd;var pinfo : TC_HITTESTINFO ):cint;inline;
-Function TabCtrl_HitTest( hwndTC : hwnd;pinfo : LPTCHITTESTINFO ):cint;inline;
-
-CONST
- TCM_SETITEMEXTRA = (TCM_FIRST + 14);
-
-// Macro 229
-Function TabCtrl_SetItemExtra( hwndTC : hwnd; cb : WPARAM):BOOL;
-
-
-
-
-CONST
- TCM_ADJUSTRECT = (TCM_FIRST + 40);
-
-// Macro 230
-Function TabCtrl_AdjustRect( hwnd : hwnd; bLarger : BOOL;var prc : RECT ):cint;
-
-
-
-
-CONST
- TCM_SETITEMSIZE = (TCM_FIRST + 41);
-
-// Macro 231
-Function TabCtrl_SetItemSize( hwnd : hwnd; x :wparam ; y : lparam ):DWORD;
-
-CONST
- TCM_REMOVEIMAGE = (TCM_FIRST + 42);
-
-// Macro 232
-Procedure TabCtrl_RemoveImage( hwnd : hwnd; i : wparam );
-
-
-
-
-CONST
- TCM_SETPADDING = (TCM_FIRST + 43);
-
-// Macro 233
-Procedure TabCtrl_SetPadding( hwnd : hwnd; cx : wparam ; cy : lparam );
-
-
-
-
-CONST
- TCM_GETROWCOUNT = (TCM_FIRST + 44);
-
-// Macro 234
-Function TabCtrl_GetRowCount( hwnd : hwnd):cint;
-
-
-
-
-CONST
- TCM_GETTOOLTIPS = (TCM_FIRST + 45);
-
-// Macro 235
-Function TabCtrl_GetToolTips( hwnd : hwnd):HWND;
-
-
-
-
-CONST
- TCM_SETTOOLTIPS = (TCM_FIRST + 46);
-
-// Macro 236
-Procedure TabCtrl_SetToolTips( hwnd : hwnd; hwndTT : WPARAM);
-
-
-
-
-CONST
- TCM_GETCURFOCUS = (TCM_FIRST + 47);
-// Macro 237
-
-
-Function TabCtrl_GetCurFocus( hwnd : hwnd):cint;
-
-
-
-CONST
- TCM_SETCURFOCUS = (TCM_FIRST + 48);
-
-// Macro 238
-Procedure TabCtrl_SetCurFocus( hwnd : hwnd; i : LParam );
-
-
-{$ifdef ie3plus}
-
-CONST
- TCM_SETMINTABWIDTH = (TCM_FIRST + 49);
-
-// Macro 239
-Function TabCtrl_SetMinTabWidth( hwnd : hwnd; x : WParam ):cint;
-
-
-CONST
- TCM_DESELECTALL = (TCM_FIRST + 50);
-
-// Macro 240
-Procedure TabCtrl_DeselectAll( hwnd : hwnd; fExcludeFocus : WPARAM );
-
-{$ENDIF}
-
-{$ifdef ie4plus}
-CONST
- TCM_HIGHLIGHTITEM = (TCM_FIRST + 51);
-
-// Macro 241
-Function TabCtrl_HighlightItem( hwnd : hwnd; i : WPARAM; fHighlight :bool):BOOL;
-
-
-
-CONST
- TCM_SETEXTENDEDSTYLE = (TCM_FIRST + 52); // optional wParam == mask
-
-// Macro 242
-Function TabCtrl_SetExtendedStyle( hwnd : hwnd; dw :LPARAM ):DWORD;
-
-
-CONST
- TCM_GETEXTENDEDSTYLE = (TCM_FIRST + 53);
-
-// Macro 243
-Function TabCtrl_GetExtendedStyle( hwnd : hwnd):DWORD;
-
-
-
-CONST
- TCM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT;
-
-// Macro 244
-Function TabCtrl_SetUnicodeFormat( hwnd : hwnd; fUnicode : WPARAM):BOOL;
-
-
-
-CONST
- TCM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT;
-
-// Macro 245
-Function TabCtrl_GetUnicodeFormat( hwnd : hwnd):BOOL;
-
-
-{$ENDIF} // _WIN32_IE >= 0x0400
-
-
-CONST
- TCN_KEYDOWN = (TCN_FIRST - 0);
-
-
-{$IFDEF _WIN32}
-// #include <pshpack1.h>
-{$ENDIF}
-
-TYPE
-
- tagTCKEYDOWN = Record
- hdr : NMHDR;
- wVKey : WORD;
- flags : UINT;
- END;
- NMTCKEYDOWN = tagTCKEYDOWN;
- TTCKEYDOWN = tagTCKEYDOWN;
- PTCKEYDOWN = ^tagTCKEYDOWN;
-
-{$ifdef ie3plus}
- TC_KEYDOWN = NMTCKEYDOWN;
-{$ELSE}
- tagTCKEYDOWN = _TC_KEYDOWN;
- NMTCKEYDOWN = TC_KEYDOWN;
-{$ENDIF}
-
-
-{$IFDEF _WIN32}
-// #include <poppack.h>
-{$ENDIF}
-
-
-CONST
- TCN_SELCHANGE = (TCN_FIRST - 1);
- TCN_SELCHANGING = (TCN_FIRST - 2);
-{$ifdef ie4plus}
- TCN_GETOBJECT = (TCN_FIRST - 3);
-{$ENDIF} // _WIN32_IE >= 0x0400
-{$ifdef ie5plus}
- TCN_FOCUSCHANGE = (TCN_FIRST - 4);
-{$ENDIF} // _WIN32_IE >= 0x0500
-{$ENDIF} // NOTABCONTROL
-
-//====== ANIMATE CONTROL ======================================================
-
-{$IFNDEF NOANIMATE}
-
-{$IFDEF _WIN32}
-
- ANIMATE_CLASSW = {L}'SysAnimate32';
- ANIMATE_CLASSA = 'SysAnimate32';
-
-{$IFDEF UNICODE}
- ANIMATE_CLASS = ANIMATE_CLASSW;
-{$ELSE}
- ANIMATE_CLASS = ANIMATE_CLASSA;
-{$ENDIF}
-
-// begin_r_commctrl
-
-
-CONST
- ACS_CENTER = $0001;
- ACS_TRANSPARENT = $0002;
- ACS_AUTOPLAY = $0004;
-{$ifdef ie3plus}
- ACS_TIMER = $0008; // don't use threads... use timers
-{$ENDIF}
-
-// end_r_commctrl
-
- ACM_OPENA = (WM_USER+100);
- ACM_OPENW = (WM_USER+103);
-
-{$IFDEF UNICODE}
-
-
- ACM_OPEN = ACM_OPENW;
-{$ELSE}
- ACM_OPEN = ACM_OPENA;
-{$ENDIF}
-
-
-CONST
- ACM_PLAY = (WM_USER+101);
- ACM_STOP = (WM_USER+102);
-
-
- ACN_START = 1;
- ACN_STOP = 2;
-
-
-// Macro 246
-
-
-Function Animate_Create(hwndP :HWND;id:HMENU;dwStyle:dword;hInstance:HINST):HWND;
-
-// Macro 247
-
-// #define Animate_Open(hwnd, szName) (BOOL)SNDMSG(hwnd, ACM_OPEN, 0, (LPARAM)(LPTSTR)(szName))
-// Macro 248
-
-// #define Animate_OpenEx(hwnd, hInst, szName) (BOOL)SNDMSG(hwnd, ACM_OPEN, (WPARAM)(hInst), (LPARAM)(LPTSTR)(szName))
-// Macro 249
-
-// #define Animate_Play(hwnd, from, to, rep) (BOOL)SNDMSG(hwnd, ACM_PLAY, (WPARAM)(rep), (LPARAM)MAKELONG(from, to))
-// Macro 250
-
-// #define Animate_Stop(hwnd) (BOOL)SNDMSG(hwnd, ACM_STOP, 0, 0)
-// Macro 251
-
-// #define Animate_Close(hwnd) Animate_Open(hwnd, NULL)
-// Macro 252
-
-// #define Animate_Seek(hwnd, frame) Animate_Play(hwnd, frame, frame, 1)
-{$ENDIF}
-
-{$ENDIF} // NOANIMATE
-
-{$ifdef ie3plus}
-//====== MONTHCAL CONTROL ======================================================
-
-{$IFNDEF NOMONTHCAL}
-{$IFDEF _WIN32}
-
-
-CONST
- MONTHCAL_CLASSW = {L}'SysMonthCal32';
- MONTHCAL_CLASSA = 'SysMonthCal32';
-
-
-{$IFDEF UNICODE}
- MONTHCAL_CLASS = MONTHCAL_CLASSW;
-{$ELSE}
- MONTHCAL_CLASS = MONTHCAL_CLASSA;
-{$ENDIF}
-
-TYPE
-// bit-packed array of "bold" info for a month
-// if a bit is on, that day is drawn bold
-
- MONTHDAYSTATE = DWORD;
- LPMONTHDAYSTATE = ^MONTHDAYSTATE;
- TMonthDayState = MONTHDAYSTATE;
- PMonthDayState = LPMONTHDAYSTATE;
-
-
-CONST
- MCM_FIRST = $1000;
-
-// BOOL MonthCal_GetCurSel(HWND hmc, LPSYSTEMTIME pst)
-// returns FALSE if MCS_MULTISELECT
-// returns TRUE and sets *pst to the currently selected date otherwise
-
-
-
-
-CONST
- MCM_GETCURSEL = (MCM_FIRST + 1);
-
-// Macro 253
-// #define MonthCal_GetCurSel(hmc, pst) (BOOL)SNDMSG(hmc, MCM_GETCURSEL, 0, (LPARAM)(pst))
-
-function MonthCal_GetCurSel(hwndMC:HWND; lpSysTime :LPSYSTEMTIME):Bool;
-
-// BOOL MonthCal_SetCurSel(HWND hmc, LPSYSTEMTIME pst)
-// returns FALSE if MCS_MULTISELECT
-// returns TURE and sets the currently selected date to *pst otherwise
-
-
-
-CONST
- MCM_SETCURSEL = (MCM_FIRST + 2);
-
-// Macro 254
-// #define MonthCal_SetCurSel(hmc, pst) (BOOL)SNDMSG(hmc, MCM_SETCURSEL, 0, (LPARAM)(pst))
-// DWORD MonthCal_GetMaxSelCount(HWND hmc)
-// returns the maximum number of selectable days allowed
-
-function MonthCal_SetCurSel(hwndMC:HWND; lpSysTime :LPSYSTEMTIME):Bool;inline;
-function MonthCal_SetCurSel(hwndMC:HWND; var lpSysTime :TSYSTEMTIME):Bool;inline;
-
-
-CONST
- MCM_GETMAXSELCOUNT = (MCM_FIRST + 3);
-
-// Macro 255
-// #define MonthCal_GetMaxSelCount(hmc) (DWORD)SNDMSG(hmc, MCM_GETMAXSELCOUNT, 0, 0L)
-// BOOL MonthCal_SetMaxSelCount(HWND hmc, UINT n)
-// sets the max number days that can be selected iff MCS_MULTISELECT
-
-function MonthCal_GetMaxSelCount(hwndMC:HWND):Bool;
-
-CONST
- MCM_SETMAXSELCOUNT = (MCM_FIRST + 4);
-
-// Macro 256
-// #define MonthCal_SetMaxSelCount(hmc, n) (BOOL)SNDMSG(hmc, MCM_SETMAXSELCOUNT, (WPARAM)(n), 0L)
-
-function MonthCal_SetMaxSelCount(hwndMC:HWND;n:uint):Bool;
-
-// BOOL MonthCal_GetSelRange(HWND hmc, LPSYSTEMTIME rgst)
-// sets rgst[0] to the first day of the selection range
-// sets rgst[1] to the last day of the selection range
-
-CONST
- MCM_GETSELRANGE = (MCM_FIRST + 5);
-
-// Macro 257
-// #define MonthCal_GetSelRange(hmc, rgst) SNDMSG(hmc, MCM_GETSELRANGE, 0, (LPARAM)(rgst))
-// BOOL MonthCal_SetSelRange(HWND hmc, LPSYSTEMTIME rgst)
-// selects the range of days from rgst[0] to rgst[1]
-
-function MonthCal_GetSelRange(hwndMC:HWND; lpSysTime :LPSYSTEMTIME):Bool;
-
-
-CONST
- MCM_SETSELRANGE = (MCM_FIRST + 6);
-
-// Macro 258
-// #define MonthCal_SetSelRange(hmc, rgst) SNDMSG(hmc, MCM_SETSELRANGE, 0, (LPARAM)(rgst))
-// DWORD MonthCal_GetMonthRange(HWND hmc, DWORD gmr, LPSYSTEMTIME rgst)
-// if rgst specified, sets rgst[0] to the starting date and
-// and rgst[1] to the ending date of the the selectable (non-grayed)
-// days if GMR_VISIBLE or all the displayed days (including grayed)
-// if GMR_DAYSTATE.
-// returns the number of months spanned by the above range.
-
-function MonthCal_SetSelRange(hwndMC:HWND; lpSysTime :LPSYSTEMTIME):Bool;
-
-
-CONST
- MCM_GETMONTHRANGE = (MCM_FIRST + 7);
-
-// Macro 259
-// #define MonthCal_GetMonthRange(hmc, gmr, rgst) (DWORD)SNDMSG(hmc, MCM_GETMONTHRANGE, (WPARAM)(gmr), (LPARAM)(rgst))
-// BOOL MonthCal_SetDayState(HWND hmc, int cbds, DAYSTATE *rgds)
-// cbds is the count of DAYSTATE items in rgds and it must be equal
-// to the value returned from MonthCal_GetMonthRange(hmc, GMR_DAYSTATE, NULL)
-// This sets the DAYSTATE bits for each month (grayed and non-grayed
-// days) displayed in the calendar. The first bit in a month's DAYSTATE
-// corresponts to bolding day 1, the second bit affects day 2, etc.
-
-function MonthCal_GetMonthRange(hwndMC:HWND; gmr: DWORD;lpSysTime :LPSYSTEMTIME):Bool;
-
-
-CONST
- MCM_SETDAYSTATE = (MCM_FIRST + 8);
-
-// Macro 260
-// #define MonthCal_SetDayState(hmc, cbds, rgds) SNDMSG(hmc, MCM_SETDAYSTATE, (WPARAM)(cbds), (LPARAM)(rgds))
-// BOOL MonthCal_GetMinReqRect(HWND hmc, LPRECT prc)
-// sets *prc the minimal size needed to display one month
-// To display two months, undo the AdjustWindowRect calculation already done to
-// this rect, double the width, and redo the AdjustWindowRect calculation --
-// the monthcal control will display two calendars in this window (if you also
-// double the vertical size, you will get 4 calendars)
-// NOTE: if you want to gurantee that the "Today" string is not clipped,
-// get the MCM_GETMAXTODAYWIDTH and use the max of that width and this width
-
-function MonthCal_SetDayState(hwndMC:HWND; gmr: Longint;lpDay :LPMONTHDAYSTATE):Bool;
-
-
-CONST
- MCM_GETMINREQRECT = (MCM_FIRST + 9);
-
-// Macro 261
-// #define MonthCal_GetMinReqRect(hmc, prc) SNDMSG(hmc, MCM_GETMINREQRECT, 0, (LPARAM)(prc))
-// set colors to draw control with -- see MCSC_ bits below
-
-function MonthCal_GetMinReqRect(hwndMC:HWND; lpr :LPRect):Bool;inline;
-function MonthCal_GetMinReqRect(hwndMC:HWND; var lpr :TRect):Bool;inline;
-
-
-CONST
- MCM_SETCOLOR = (MCM_FIRST + 10);
-
-// Macro 262
-// #define MonthCal_SetColor(hmc, iColor, clr) SNDMSG(hmc, MCM_SETCOLOR, iColor, clr)
-
-function MonthCal_SetColor(hwndMC:HWND; ic:longint;clr:COLORREF):DWORD;inline;
-
-
-CONST
- MCM_GETCOLOR = (MCM_FIRST + 11);
-
-// Macro 263
-// #define MonthCal_GetColor(hmc, iColor) SNDMSG(hmc, MCM_GETCOLOR, iColor, 0)
-
-function MonthCal_GetColor(hwndMC:HWND; ic:longint):Bool;
-
-
-CONST
- MCSC_BACKGROUND = 0; // the background color (between months)
- MCSC_TEXT = 1; // the dates
- MCSC_TITLEBK = 2; // background of the title
- MCSC_TITLETEXT = 3;
- MCSC_MONTHBK = 4; // background within the month cal
- MCSC_TRAILINGTEXT = 5; // the text color of header & trailing days
-
-// set what day is "today" send NULL to revert back to real date
- MCM_SETTODAY = (MCM_FIRST + 12);
-
-// Macro 264
-// #define MonthCal_SetToday(hmc, pst) SNDMSG(hmc, MCM_SETTODAY, 0, (LPARAM)(pst))
-// get what day is "today"
-// returns BOOL for success/failure
-
-function MonthCal_SetToday(hwndMC:HWND; lps:LPSYSTEMTIME):Bool;
-
-
-CONST
- MCM_GETTODAY = (MCM_FIRST + 13);
-
-// Macro 265
-// #define MonthCal_GetToday(hmc, pst) (BOOL)SNDMSG(hmc, MCM_GETTODAY, 0, (LPARAM)(pst))
-// determine what pinfo->pt is over
-
-function MonthCal_GetToday(hwndMC:HWND; lps:LPSYSTEMTIME):Bool;
-
-
-CONST
- MCM_HITTEST = (MCM_FIRST + 14);
-
-TYPE
-
- DummyStruct16 = Record
- cbSize : UINT;
- pt : POINT;
- uHit : UINT; // out param
- st : SYSTEMTIME;
-{$ifdef NTDDI_VISTA}
- rc : RECT;
- iOffset : cint;
- iRow : cint;
- iCol : cint;
-{$endif}
- END;
- MCHITTESTINFO = DummyStruct16;
- PMCHITTESTINFO = ^DummyStruct16;
- TDummyStruct16 = DummyStruct16;
- PDummyStruct16 = ^DummyStruct16;
-
-
-// Macro 266
-FUNCTION MonthCal_HitTest( hmc :HWND ; pinfo : PMCHITTESTINFO):DWORD;
-
-
-CONST
- MCHT_TITLE = $00010000;
- MCHT_CALENDAR = $00020000;
- MCHT_TODAYLINK = $00030000;
-
- MCHT_NEXT = $01000000; // these indicate that hitting
- MCHT_PREV = $02000000; // here will go to the next/prev month
-
- MCHT_NOWHERE = $00000000;
-
- MCHT_TITLEBK = (MCHT_TITLE);
- MCHT_TITLEMONTH = (MCHT_TITLE OR $0001);
- MCHT_TITLEYEAR = (MCHT_TITLE OR $0002);
- MCHT_TITLEBTNNEXT = (MCHT_TITLE OR MCHT_NEXT OR $0003);
- MCHT_TITLEBTNPREV = (MCHT_TITLE OR MCHT_PREV OR $0003);
-
- MCHT_CALENDARBK = (MCHT_CALENDAR);
- MCHT_CALENDARDATE = (MCHT_CALENDAR OR $0001);
- MCHT_CALENDARDATENEXT = (MCHT_CALENDARDATE OR MCHT_NEXT);
- MCHT_CALENDARDATEPREV = (MCHT_CALENDARDATE OR MCHT_PREV);
- MCHT_CALENDARDAY = (MCHT_CALENDAR OR $0002);
- MCHT_CALENDARWEEKNUM = (MCHT_CALENDAR OR $0003);
-
-// set first day of week to iDay:
-// 0 for Monday, 1 for Tuesday, ..., 6 for Sunday
-// -1 for means use locale info
- MCM_SETFIRSTDAYOFWEEK = (MCM_FIRST + 15);
-// Macro 267
-
-
-function MonthCal_SetFirstDayOfWeek( hmc : HWND ; iDay :LONGINT ):DWORD;
-
-
-// DWORD result... low word has the day. high word is bool if this is app set
-// or not (FALSE == using locale info)
-
-CONST
- MCM_GETFIRSTDAYOFWEEK = (MCM_FIRST + 16);
-// Macro 268
-
-
-Function MonthCal_GetFirstDayOfWeek( hmc : HWND ):DWORD;
-
-
-// DWORD MonthCal_GetRange(HWND hmc, LPSYSTEMTIME rgst)
-// modifies rgst[0] to be the minimum ALLOWABLE systemtime (or 0 if no minimum)
-// modifies rgst[1] to be the maximum ALLOWABLE systemtime (or 0 if no maximum)
-// returns GDTR_MIN|GDTR_MAX if there is a minimum|maximum limit
-
-CONST
- MCM_GETRANGE = (MCM_FIRST + 17);
-// Macro 269
-
-
-Function MonthCal_GetRange( hmc : HWND ; rgst : LPSYSTEMTIME):DWORD;
-
-
-// BOOL MonthCal_SetRange(HWND hmc, DWORD gdtr, LPSYSTEMTIME rgst)
-// if GDTR_MIN, sets the minimum ALLOWABLE systemtime to rgst[0], otherwise removes minimum
-// if GDTR_MAX, sets the maximum ALLOWABLE systemtime to rgst[1], otherwise removes maximum
-// returns TRUE on success, FALSE on error (such as invalid parameters)
-
-CONST
- MCM_SETRANGE = (MCM_FIRST + 18);
-// Macro 270
-
-
-Function MonthCal_SetRange( hmc : HWND ; gd : DWORD; rgst : LPSYSTEMTIME):BOOL;
-
-
-// int MonthCal_GetMonthDelta(HWND hmc)
-// returns the number of months one click on a next/prev button moves by
-
-CONST
- MCM_GETMONTHDELTA = (MCM_FIRST + 19);
-// Macro 271
-
-
-Function MonthCal_GetMonthDelta( hmc :hwnd ):cint;
-
-
-// int MonthCal_SetMonthDelta(HWND hmc, int n)
-// sets the month delta to n. n==0 reverts to moving by a page of months
-// returns the previous value of n.
-
-CONST
- MCM_SETMONTHDELTA = (MCM_FIRST + 20);
-// Macro 272
-
-
-Function MonthCal_SetMonthDelta( hmc :hwnd ; n :cint ):cint;
-
-
-// DWORD MonthCal_GetMaxTodayWidth(HWND hmc, LPSIZE psz)
-// sets *psz to the maximum width/height of the "Today" string displayed
-// at the bottom of the calendar (as long as MCS_NOTODAY is not specified)
-
-CONST
- MCM_GETMAXTODAYWIDTH = (MCM_FIRST + 21);
-// Macro 273
-
-
-Function MonthCal_GetMaxTodayWidth( hmc :hwnd ):DWORD;
-
-
-{$ifdef ie4plus}
-
-CONST
- MCM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT;
-// Macro 274
-
-
-Function MonthCal_SetUnicodeFormat( hwnd : hwnd; fUnicode : bool):BOOL;
-
-
-CONST
- MCM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT;
-// Macro 275
-
-
-Function MonthCal_GetUnicodeFormat( hwnd : hwnd):BOOL;
-
-{$ifdef NTDDI_VISTA}
-Const
-// View
- MCMV_MONTH = 0;
- MCMV_YEAR = 1;
- MCMV_DECADE = 2;
- MCMV_CENTURY = 3;
- MCMV_MAX = MCMV_CENTURY;
-
- MCM_GETCURRENTVIEW = (MCM_FIRST + 22);
- MCM_GETCALENDARCOUNT = (MCM_FIRST + 23);
- MCM_GETCALENDARGRIDINFO = (MCM_FIRST + 24);
- MCM_GETCALID = (MCM_FIRST + 27);
- MCM_SETCALID = (MCM_FIRST + 28);
-// Returns the min rect that will fit the max number of calendars for the passed in rect.
- MCM_SIZERECTTOMIN = (MCM_FIRST + 29);
- MCM_SETCALENDARBORDER = (MCM_FIRST + 30);
- MCM_GETCALENDARBORDER = (MCM_FIRST + 31);
- MCM_SETCURRENTVIEW = (MCM_FIRST + 32);
-
-// Part
- MCGIP_CALENDARCONTROL = 0;
- MCGIP_NEXT = 1;
- MCGIP_PREV = 2;
- MCGIP_FOOTER = 3;
- MCGIP_CALENDAR = 4;
- MCGIP_CALENDARHEADER = 5;
- MCGIP_CALENDARBODY = 6;
- MCGIP_CALENDARROW = 7;
- MCGIP_CALENDARCELL = 8;
-
- MCGIF_DATE = $00000001;
- MCGIF_RECT = $00000002;
- MCGIF_NAME = $00000004;
-
-// Note: iRow of -1 refers to the row header and iCol of -1 refers to the col header.
-
-Type
- tagMCGRIDINFO = record
- cbSize : UINT;
- dwPart : DWORD;
- dwFlags : DWORD;
- iCalendar : longint;
- iRow : longint;
- iCol : longint;
- bSelected : BOOL;
- stStart : SYSTEMTIME;
- stEnd : SYSTEMTIME;
- rc : RECT;
- pszName : LPWSTR;
- cchName : size_t;
- end;
- MCGRIDINFO = tagMCGRIDINFO;
- TPMCGRIDINFO = MCGRIDINFO;
- PMCGRIDINFO = ^MCGRIDINFO;
- LPMCGRIDINFO = PMCGRIDINFO;
-
-function MonthCal_GetCurrentView(hmc:HWND):DWORD;
-// (DWORD)SNDMSG(hmc, MCM_GETCURRENTVIEW, 0, 0)
-
-function MonthCal_GetCalendarCount(hmc:HWND):DWORD;
-// (DWORD)SNDMSG(hmc, MCM_GETCALENDARCOUNT, 0, 0)
-
-function MonthCal_GetCalendarGridInfo(hmc:HWND; pmc:pMCGRIDINFO):BOOL;
-// (BOOL)SNDMSG(hmc, MCM_GETCALENDARGRIDINFO, 0, (LPARAM)(PMCGRIDINFO)(pmcGridInfo))
-
-function MonthCal_GetCALID(hmc:HWND):CALID;
-// (CALID)SNDMSG(hmc, MCM_GETCALID, 0, 0)
-
-function MonthCal_SetCALID(hmc:HWND; calid:cuint):LRESULT;
-// SNDMSG(hmc, MCM_SETCALID, (WPARAM)(calid), 0)
-
-function MonthCal_SizeRectToMin(hmc:HWND; prc:prect):LRESULT;
-// SNDMSG(hmc, MCM_SIZERECTTOMIN, 0, (LPARAM)(prc))
-
-function MonthCal_SetCalendarBorder(hmc:HWND; fset:bool; xyborder:cint):LRESULT;
-// SNDMSG(hmc, MCM_SETCALENDARBORDER, (WPARAM)(fset), (LPARAM)(xyborder))
-
-function MonthCal_GetCalendarBorder(hmc:HWND):cint;
-// (int)SNDMSG(hmc, MCM_GETCALENDARBORDER, 0, 0)
-
-function MonthCal_SetCurrentView(hmc:HWND; dwNewView:DWord):BOOL;
-// (BOOL)SNDMSG(hmc, MCM_SETCURRENTVIEW, 0, (LPARAM)(dwNewView))
-
-
-{$endif}
-
-{$ENDIF}
-
-// MCN_SELCHANGE is sent whenever the currently displayed date changes
-// via month change, year change, keyboard navigation, prev/next button
-//
-TYPE
-
- tagNMSELCHANGE = Record
- nmhdr : NMHDR; // this must be first, so we don't break WM_NOTIFY
- stSelStart : SYSTEMTIME;
- stSelEnd : SYSTEMTIME;
- END;
- NMSELCHANGE = tagNMSELCHANGE;
- LPNMSELCHANGE = ^tagNMSELCHANGE;
- TNMSELCHANGE = tagNMSELCHANGE;
- PNMSELCHANGE = ^tagNMSELCHANGE;
-
-
-
-CONST
- MCN_SELCHANGE = (MCN_FIRST + 1);
-
-// MCN_GETDAYSTATE is sent for MCS_DAYSTATE controls whenever new daystate
-// information is needed (month or year scroll) to draw bolding information.
-// The app must fill in cDayState months worth of information starting from
-// stStart date. The app may fill in the array at prgDayState or change
-// prgDayState to point to a different array out of which the information
-// will be copied. (similar to tooltips)
-//
-TYPE
-
- tagNMDAYSTATE = Record
- nmhdr : NMHDR; // this must be first, so we don't break WM_NOTIFY
- stStart : SYSTEMTIME;
- cDayState : cint;
- prgDayState : LPMONTHDAYSTATE; // points to cDayState MONTHDAYSTATEs
- END;
- NMDAYSTATE = tagNMDAYSTATE;
- LPNMDAYSTATE = ^tagNMDAYSTATE;
- TNMDAYSTATE = tagNMDAYSTATE;
- PNMDAYSTATE = ^tagNMDAYSTATE;
-
-
-
-CONST
- MCN_GETDAYSTATE = (MCN_FIRST + 3);
-
-// MCN_SELECT is sent whenever a selection has occured (via mouse or keyboard)
-//
-TYPE
-
- NMSELECT = NMSELCHANGE;
- LPNMSELECT = ^NMSELCHANGE;
-
-
-CONST
- MCN_SELECT = (MCN_FIRST + 4);
-
-
-// begin_r_commctrl
-
- MCS_DAYSTATE = $0001;
- MCS_MULTISELECT = $0002;
- MCS_WEEKNUMBERS = $0004;
-{$ifdef ie4plus}
- MCS_NOTODAYCIRCLE = $0008;
- MCS_NOTODAY = $0010;
-{$ELSE}
- MCS_NOTODAY = $0008;
-{$ENDIF}
-{$ifdef NTDDI_Vista}
- MCS_NOTRAILINGDATES = $0040;
- MCS_SHORTDAYSOFWEEK = $0080;
- MCS_NOSELCHANGEONNAV = $0100;
-{$endif}
-
- GMR_VISIBLE = 0; // visible portion of display
- GMR_DAYSTATE = 1; // above plus the grayed out parts of
- // partially displayed months
-
-
-{$ENDIF} // _WIN32
-{$ENDIF} // NOMONTHCAL
-
-
-//====== DATETIMEPICK CONTROL ==================================================
-
-{$IFNDEF NODATETIMEPICK}
-{$IFDEF _WIN32}
-
- DATETIMEPICK_CLASSW = {L}'SysDateTimePick32';
- DATETIMEPICK_CLASSA = 'SysDateTimePick32';
-
-{$IFDEF UNICODE}
- DATETIMEPICK_CLASS = DATETIMEPICK_CLASSW;
-{$ELSE}
- DATETIMEPICK_CLASS = DATETIMEPICK_CLASSA;
-{$ENDIF}
-
-{$ifdef NTDDI_VISTA}
-Type
- tagDATETIMEPICKERINFO = packed record
- cbSize : DWORD;
- rcCheck : RECT;
- stateCheck : DWORD;
- rcButton : RECT;
- stateButton : DWORD;
- hwndEdit : HWND;
- hwndUD : HWND;
- hwndDropDown : HWND;
- end;
- DATETIMEPICKERINFO = tagDATETIMEPICKERINFO;
- PDATETIMEPICKERINFO = ^DATETIMEPICKERINFO;
- LPDATETIMEPICKERINFO = PDATETIMEPICKERINFO;
- TDATETIMEPICKERINFO = DATETIMEPICKERINFO;
-{$endif}
-
-CONST
- DTM_FIRST = $1000;
-
-// DWORD DateTimePick_GetSystemtime(HWND hdp, LPSYSTEMTIME pst)
-// returns GDT_NONE if "none" is selected (DTS_SHOWNONE only)
-// returns GDT_VALID and modifies *pst to be the currently selected value
- DTM_GETSYSTEMTIME = (DTM_FIRST + 1);
-// Macro 276
-
-// #define DateTime_GetSystemtime(hdp, pst) (DWORD)SNDMSG(hdp, DTM_GETSYSTEMTIME, 0, (LPARAM)(pst))
-
-// BOOL DateTime_SetSystemtime(HWND hdp, DWORD gd, LPSYSTEMTIME pst)
-// if gd==GDT_NONE, sets datetimepick to None (DTS_SHOWNONE only)
-// if gd==GDT_VALID, sets datetimepick to *pst
-// returns TRUE on success, FALSE on error (such as bad params)
-
-CONST
- DTM_SETSYSTEMTIME = (DTM_FIRST + 2);
-// Macro 277
-
-// #define DateTime_SetSystemtime(hdp, gd, pst) (BOOL)SNDMSG(hdp, DTM_SETSYSTEMTIME, (WPARAM)(gd), (LPARAM)(pst))
-function DateTime_SetSystemTime(hdp: HWND; gd: DWORD; const pst: TSystemTime): BOOL;inline;
-
-// DWORD DateTime_GetRange(HWND hdp, LPSYSTEMTIME rgst)
-// modifies rgst[0] to be the minimum ALLOWABLE systemtime (or 0 if no minimum)
-// modifies rgst[1] to be the maximum ALLOWABLE systemtime (or 0 if no maximum)
-// returns GDTR_MIN|GDTR_MAX if there is a minimum|maximum limit
-
-CONST
- DTM_GETRANGE = (DTM_FIRST + 3);
-// Macro 278
-
-// #define DateTime_GetRange(hdp, rgst) (DWORD)SNDMSG(hdp, DTM_GETRANGE, 0, (LPARAM)(rgst))
-
-// BOOL DateTime_SetRange(HWND hdp, DWORD gdtr, LPSYSTEMTIME rgst)
-// if GDTR_MIN, sets the minimum ALLOWABLE systemtime to rgst[0], otherwise removes minimum
-// if GDTR_MAX, sets the maximum ALLOWABLE systemtime to rgst[1], otherwise removes maximum
-// returns TRUE on success, FALSE on error (such as invalid parameters)
-
-CONST
- DTM_SETRANGE = (DTM_FIRST + 4);
-// Macro 279
-
-// #define DateTime_SetRange(hdp, gd, rgst) (BOOL)SNDMSG(hdp, DTM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
-function DateTime_SetRange(hdp: HWND; gdtr: DWORD; rgst: PSystemTime): BOOL;inline;
-
-// BOOL DateTime_SetFormat(HWND hdp, LPCTSTR sz)
-// sets the display formatting string to sz (see GetDateFormat and GetTimeFormat for valid formatting chars)
-// NOTE: 'X' is a valid formatting character which indicates that the application
-// will determine how to display information. Such apps must support DTN_WMKEYDOWN,
-// DTN_FORMAT, and DTN_FORMATQUERY.
-
-CONST
- DTM_SETFORMATA = (DTM_FIRST + 5);
- DTM_SETFORMATW = (DTM_FIRST + 50);
-
-{$IFDEF UNICODE}
-
-TYPE
- DTM_SETFORMAT = DTM_SETFORMATW;
-{$ELSE}
- DTM_SETFORMAT = DTM_SETFORMATA;
-{$ENDIF}
-
-// Macro 280
-
-// #define DateTime_SetFormat(hdp, sz) (BOOL)SNDMSG(hdp, DTM_SETFORMAT, 0, (LPARAM)(sz))
-
-
-
-CONST
- DTM_SETMCCOLOR = (DTM_FIRST + 6);
-// Macro 281
-
-// #define DateTime_SetMonthCalColor(hdp, iColor, clr) SNDMSG(hdp, DTM_SETMCCOLOR, iColor, clr)
-function DateTime_SetMonthCalColor(hdp: HWND; iColor: DWORD; clr: TColorRef): TColorRef;inline;
-
-CONST
- DTM_GETMCCOLOR = (DTM_FIRST + 7);
-// Macro 282
-
-// #define DateTime_GetMonthCalColor(hdp, iColor) SNDMSG(hdp, DTM_GETMCCOLOR, iColor, 0)
-
-// HWND DateTime_GetMonthCal(HWND hdp)
-// returns the HWND of the MonthCal popup window. Only valid
-// between DTN_DROPDOWN and DTN_CLOSEUP notifications.
-
-CONST
- DTM_GETMONTHCAL = (DTM_FIRST + 8);
-// Macro 283
-
-// #define DateTime_GetMonthCal(hdp) (HWND)SNDMSG(hdp, DTM_GETMONTHCAL, 0, 0)
-function DateTime_GetMonthCal(hdp: HWND): HWND;inline;
-
-{$ifdef ie4plus}
-
-
-CONST
- DTM_SETMCFONT = (DTM_FIRST + 9);
-
-// Macro 284
-procedure DateTime_SetMonthCalFont(hdp:HWND; hfont:HFONT; fRedraw:LPARAM);
-// SNDMSG(hdp, DTM_SETMCFONT, (WPARAM)(hfont), (LPARAM)(fRedraw))
-
-
-CONST
- DTM_GETMCFONT = (DTM_FIRST + 10);
-
-// Macro 285
-function DateTime_GetMonthCalFont(hdp:HWND):HFONT;
-// SNDMSG(hdp, DTM_GETMCFONT, 0, 0)
-
-{$ifdef NTDDI_VISTA}
-Const
- DTM_SETMCSTYLE = (DTM_FIRST + 11);
- DTM_GETMCSTYLE = (DTM_FIRST + 12);
- DTM_CLOSEMONTHCAL = (DTM_FIRST + 13);
- DTM_GETDATETIMEPICKERINFO = (DTM_FIRST + 14);
- DTM_GETIDEALSIZE = (DTM_FIRST + 15);
-
-function DateTime_SetMonthCalStyle(hdp:HWND; dwStyle:DWord):LResult;
-// SNDMSG(hdp, DTM_SETMCSTYLE, 0, (LPARAM)dwStyle)
-
-function DateTime_GetMonthCalStyle(hdp:HWND):LRESULT;
-// SNDMSG(hdp, DTM_GETMCSTYLE, 0, 0)
-
-function DateTime_CloseMonthCal(hdp:HWND):LRESULT;
-// SNDMSG(hdp, DTM_CLOSEMONTHCAL, 0, 0)
-
-// DateTime_GetDateTimePickerInfo(HWND hdp, DATETIMEPICKERINFO* pdtpi)
-// Retrieves information about the selected date time picker.
-
-function DateTime_GetDateTimePickerInfo(hdp:HWND; pdtpi:PDATETIMEPICKERINFO):LRESULT;
-// SNDMSG(hdp, DTM_GETDATETIMEPICKERINFO, 0, (LPARAM)(pdtpi))
-
-function DateTime_GetIdealSize(hdp:HWND; ps:PSIZE): LResult;
-// (BOOL)SNDMSG((hdp), DTM_GETIDEALSIZE, 0, (LPARAM)(psize))
-
-{$endif}
-
-
-{$ENDIF} // _WIN32_IE >= 0x0400
-
-// begin_r_commctrl
-
-
-CONST
- DTS_UPDOWN = $0001; // use UPDOWN instead of MONTHCAL
- DTS_SHOWNONE = $0002; // allow a NONE selection
- DTS_SHORTDATEFORMAT = $0000; // use the short date format (app must forward WM_WININICHANGE messages)
- DTS_LONGDATEFORMAT = $0004; // use the long date format (app must forward WM_WININICHANGE messages)
-{$ifdef ie5plus}
- DTS_SHORTDATECENTURYFORMAT = $000C; // short date format with century (app must forward WM_WININICHANGE messages)
-{$ENDIF} // (_WIN32_IE >= 0x500)
- DTS_TIMEFORMAT = $0009; // use the time format (app must forward WM_WININICHANGE messages)
- DTS_APPCANPARSE = $0010; // allow user entered strings (app MUST respond to DTN_USERSTRING)
- DTS_RIGHTALIGN = $0020; // right-align popup instead of left-align it
-
-// end_r_commctrl
-
- DTN_DATETIMECHANGE = (DTN_FIRST + 1); // the systemtime has changed
-TYPE
-
- tagNMDATETIMECHANGE = Record
- nmhdr : NMHDR;
- dwFlags : DWORD; // GDT_VALID or GDT_NONE
- st : SYSTEMTIME; // valid iff dwFlags==GDT_VALID
- END;
- NMDATETIMECHANGE = tagNMDATETIMECHANGE;
- LPNMDATETIMECHANGE = ^tagNMDATETIMECHANGE;
- TNMDATETIMECHANGE = tagNMDATETIMECHANGE;
- PNMDATETIMECHANGE = ^tagNMDATETIMECHANGE;
-
-
-
-CONST
- DTN_USERSTRINGA = (DTN_FIRST + 2); // the user has entered a string
- DTN_USERSTRINGW = (DTN_FIRST + 15);
-TYPE
-
- tagNMDATETIMESTRINGA = Record
- nmhdr : NMHDR;
- pszUserString : LPCSTR; // string user entered
- st : SYSTEMTIME; // app fills this in
- dwFlags : DWORD; // GDT_VALID or GDT_NONE
- END;
- NMDATETIMESTRINGA = tagNMDATETIMESTRINGA;
- LPNMDATETIMESTRINGA = ^tagNMDATETIMESTRINGA;
- TNMDATETIMESTRINGA = tagNMDATETIMESTRINGA;
- PNMDATETIMESTRINGA = ^tagNMDATETIMESTRINGA;
-
-
- tagNMDATETIMESTRINGW = Record
- nmhdr : NMHDR;
- pszUserString : LPCWSTR; // string user entered
- st : SYSTEMTIME; // app fills this in
- dwFlags : DWORD; // GDT_VALID or GDT_NONE
- END;
- NMDATETIMESTRINGW = tagNMDATETIMESTRINGW;
- LPNMDATETIMESTRINGW = ^tagNMDATETIMESTRINGW;
- TNMDATETIMESTRINGW = tagNMDATETIMESTRINGW;
- PNMDATETIMESTRINGW = ^tagNMDATETIMESTRINGW;
-
-
-{$IFDEF UNICODE}
-CONST
- DTN_USERSTRING = DTN_USERSTRINGW;
-TYPE
- NMDATETIMESTRING = NMDATETIMESTRINGW;
- LPNMDATETIMESTRING = LPNMDATETIMESTRINGW;
-{$ELSE}
-CONST
- DTN_USERSTRING = DTN_USERSTRINGA;
-TYPE
- NMDATETIMESTRING = NMDATETIMESTRINGA;
- LPNMDATETIMESTRING = LPNMDATETIMESTRINGA;
-{$ENDIF}
- TNMDateTimeString = NMDATETIMESTRING;
- PNMDateTimeString = LPNMDATETIMESTRING;
-
-
-
-CONST
- DTN_WMKEYDOWNA = (DTN_FIRST + 3); // modify keydown on app format field (X)
- DTN_WMKEYDOWNW = (DTN_FIRST + 16);
-TYPE
-
- tagNMDATETIMEWMKEYDOWNA = Record
- nmhdr : NMHDR;
- nVirtKey : cint; // virtual key code of WM_KEYDOWN which MODIFIES an X field
- pszFormat : LPCSTR; // format substring
- st : SYSTEMTIME; // current systemtime, app should modify based on key
- END;
- NMDATETIMEWMKEYDOWNA = tagNMDATETIMEWMKEYDOWNA;
- LPNMDATETIMEWMKEYDOWNA = ^tagNMDATETIMEWMKEYDOWNA;
- TNMDATETIMEWMKEYDOWNA = tagNMDATETIMEWMKEYDOWNA;
- PNMDATETIMEWMKEYDOWNA = ^tagNMDATETIMEWMKEYDOWNA;
-
-
- tagNMDATETIMEWMKEYDOWNW = Record
- nmhdr : NMHDR;
- nVirtKey : cint; // virtual key code of WM_KEYDOWN which MODIFIES an X field
- pszFormat : LPCWSTR; // format substring
- st : SYSTEMTIME; // current systemtime, app should modify based on key
- END;
- NMDATETIMEWMKEYDOWNW = tagNMDATETIMEWMKEYDOWNW;
- LPNMDATETIMEWMKEYDOWNW = ^tagNMDATETIMEWMKEYDOWNW;
- TNMDATETIMEWMKEYDOWNW = tagNMDATETIMEWMKEYDOWNW;
- PNMDATETIMEWMKEYDOWNW = ^tagNMDATETIMEWMKEYDOWNW;
-
-
-{$IFDEF UNICODE}
-CONST
- DTN_WMKEYDOWN = DTN_WMKEYDOWNW;
-TYPE
- NMDATETIMEWMKEYDOWN = NMDATETIMEWMKEYDOWNW;
- LPNMDATETIMEWMKEYDOWN= LPNMDATETIMEWMKEYDOWNW;
-{$ELSE}
-CONST
- DTN_WMKEYDOWN = DTN_WMKEYDOWNA;
-TYPE
- NMDATETIMEWMKEYDOWN = NMDATETIMEWMKEYDOWNA;
- LPNMDATETIMEWMKEYDOWN= LPNMDATETIMEWMKEYDOWNA;
-{$ENDIF}
-
-
-
-CONST
- DTN_FORMATA = (DTN_FIRST + 4); // query display for app format field (X)
- DTN_FORMATW = (DTN_FIRST + 17);
-TYPE
-
- tagNMDATETIMEFORMATA = Record
- nmhdr : NMHDR;
- pszFormat : LPCSTR; // format substring
- st : SYSTEMTIME; // current systemtime
- pszDisplay : LPCSTR; // string to display
- szDisplay : Array [0..63] OF CHAR; // buffer pszDisplay originally points at
- END;
- NMDATETIMEFORMATA = tagNMDATETIMEFORMATA;
- LPNMDATETIMEFORMATA = ^tagNMDATETIMEFORMATA;
- TNMDATETIMEFORMATA = tagNMDATETIMEFORMATA;
- PNMDATETIMEFORMATA = ^tagNMDATETIMEFORMATA;
-
-
- tagNMDATETIMEFORMATW = Record
- nmhdr : NMHDR;
- pszFormat : LPCWSTR; // format substring
- st : SYSTEMTIME; // current systemtime
- pszDisplay : LPCWSTR; // string to display
- szDisplay : Array [0..63] OF WCHAR; // buffer pszDisplay originally points at
- END;
- NMDATETIMEFORMATW = tagNMDATETIMEFORMATW;
- LPNMDATETIMEFORMATW = ^tagNMDATETIMEFORMATW;
- TNMDATETIMEFORMATW = tagNMDATETIMEFORMATW;
- PNMDATETIMEFORMATW = ^tagNMDATETIMEFORMATW;
-
-
-{$IFDEF UNICODE}
-CONST
- DTN_FORMAT = DTN_FORMATW;
-TYPE
- NMDATETIMEFORMAT = NMDATETIMEFORMATW;
- LPNMDATETIMEFORMAT = LPNMDATETIMEFORMATW;
-{$ELSE}
-CONST
- DTN_FORMAT = DTN_FORMATA;
-TYPE
- NMDATETIMEFORMAT = NMDATETIMEFORMATA;
- LPNMDATETIMEFORMAT = LPNMDATETIMEFORMATA;
-{$ENDIF}
-
-
-
-CONST
- DTN_FORMATQUERYA = (DTN_FIRST + 5); // query formatting info for app format field (X)
- DTN_FORMATQUERYW = (DTN_FIRST + 18);
-TYPE
-
- tagNMDATETIMEFORMATQUERYA = Record
- nmhdr : NMHDR;
- pszFormat : LPCSTR; // format substring
- szMax : SIZE; // max bounding rectangle app will use for this format string
- END;
- NMDATETIMEFORMATQUERYA = tagNMDATETIMEFORMATQUERYA;
- LPNMDATETIMEFORMATQUERYA = ^tagNMDATETIMEFORMATQUERYA;
- TNMDATETIMEFORMATQUERYA = tagNMDATETIMEFORMATQUERYA;
- PNMDATETIMEFORMATQUERYA = ^tagNMDATETIMEFORMATQUERYA;
-
-
- tagNMDATETIMEFORMATQUERYW = Record
- nmhdr : NMHDR;
- pszFormat : LPCWSTR; // format substring
- szMax : SIZE; // max bounding rectangle app will use for this format string
- END;
- NMDATETIMEFORMATQUERYW = tagNMDATETIMEFORMATQUERYW;
- LPNMDATETIMEFORMATQUERYW = ^tagNMDATETIMEFORMATQUERYW;
- TNMDATETIMEFORMATQUERYW = tagNMDATETIMEFORMATQUERYW;
- PNMDATETIMEFORMATQUERYW = ^tagNMDATETIMEFORMATQUERYW;
-
-
-{$IFDEF UNICODE}
-CONST
- DTN_FORMATQUERY = DTN_FORMATQUERYW;
-TYPE
- NMDATETIMEFORMATQUERY= NMDATETIMEFORMATQUERYW;
- LPNMDATETIMEFORMATQUERY= LPNMDATETIMEFORMATQUERYW;
-{$ELSE}
-CONST
- DTN_FORMATQUERY = DTN_FORMATQUERYA;
-TYPE
- NMDATETIMEFORMATQUERY= NMDATETIMEFORMATQUERYA;
- LPNMDATETIMEFORMATQUERY= LPNMDATETIMEFORMATQUERYA;
-{$ENDIF}
-
-
-
-CONST
- DTN_DROPDOWN = (DTN_FIRST + 6); // MonthCal has dropped down
- DTN_CLOSEUP = (DTN_FIRST + 7); // MonthCal is popping up
-
-
- GDTR_MIN = $0001;
- GDTR_MAX = $0002;
-
- GDT_ERROR = -1;
- GDT_VALID = 0;
- GDT_NONE = 1;
-
-
-{$ENDIF} // _WIN32
-{$ENDIF} // NODATETIMEPICK
-
-
-{$ifdef ie4plus}
-
-{$IFNDEF NOIPADDRESS}
-
-///////////////////////////////////////////////
-/// IP Address edit control
-
-// Messages sent to IPAddress controls
-
- IPM_CLEARADDRESS = (WM_USER+100); // no parameters
- IPM_SETADDRESS = (WM_USER+101); // lparam = TCP/IP address
- IPM_GETADDRESS = (WM_USER+102); // lresult = # of non black fields. lparam = LPDWORD for TCP/IP address
- IPM_SETRANGE = (WM_USER+103); // wparam = field, lparam = range
- IPM_SETFOCUS = (WM_USER+104); // wparam = field
- IPM_ISBLANK = (WM_USER+105); // no parameters
-
- WC_IPADDRESSW = {L}'SysIPAddress32';
- WC_IPADDRESSA = 'SysIPAddress32';
-
-{$IFDEF UNICODE}
-
-TYPE
- WC_IPADDRESS = WC_IPADDRESSW;
-{$ELSE}
- WC_IPADDRESS = WC_IPADDRESSA;
-{$ENDIF}
-
-
-CONST
- IPN_FIELDCHANGED = (IPN_FIRST - 0);
-TYPE
-
- tagNMIPADDRESS = Record
- hdr : NMHDR;
- iField : cint;
- iValue : cint;
- END;
- NMIPADDRESS = tagNMIPADDRESS;
- LPNMIPADDRESS = ^tagNMIPADDRESS;
- TNMIPADDRESS = tagNMIPADDRESS;
- PNMIPADDRESS = ^tagNMIPADDRESS;
-
-
-// The following is a useful macro for passing the range values in the
-// IPM_SETRANGE message.
-
-// Macro 286
-
-// #define MAKEIPRANGE(low, high) ((LPARAM)(WORD)(((BYTE)(high) << 8) + (BYTE)(low)))
-
-// And this is a useful macro for making the IP Address to be passed
-// as a LPARAM.
-
-// Macro 287
-
-// #define MAKEIPADDRESS(b1,b2,b3,b4) ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
-
-// Get individual number
-// Macro 288
-
-// #define FIRST_IPADDRESS(x) ((x>>24) & 0xff)
-// Macro 289
-
-// #define SECOND_IPADDRESS(x) ((x>>16) & 0xff)
-// Macro 290
-
-// #define THIRD_IPADDRESS(x) ((x>>8) & 0xff)
-// Macro 291
-
-// #define FOURTH_IPADDRESS(x) (x & 0xff)
-
-
-{$ENDIF} // NOIPADDRESS
-
-
-//---------------------------------------------------------------------------------------
-//---------------------------------------------------------------------------------------
-/// ====================== Pager Control =============================
-//---------------------------------------------------------------------------------------
-//---------------------------------------------------------------------------------------
-
-{$IFNDEF NOPAGESCROLLER}
-
-//Pager Class Name
-
-CONST
- WC_PAGESCROLLERW = {L}'SysPager';
- WC_PAGESCROLLERA = 'SysPager';
-
-{$IFDEF UNICODE}
-
-TYPE
- WC_PAGESCROLLER = WC_PAGESCROLLERW;
-{$ELSE}
- WC_PAGESCROLLER = WC_PAGESCROLLERA;
-{$ENDIF}
-
-
-//---------------------------------------------------------------------------------------
-// Pager Control Styles
-//---------------------------------------------------------------------------------------
-// begin_r_commctrl
-
-
-CONST
- PGS_VERT = $00000000;
- PGS_HORZ = $00000001;
- PGS_AUTOSCROLL = $00000002;
- PGS_DRAGNDROP = $00000004;
-
-// end_r_commctrl
-
-
-//---------------------------------------------------------------------------------------
-// Pager Button State
-//---------------------------------------------------------------------------------------
-//The scroll can be in one of the following control State
- PGF_INVISIBLE = 0; // Scroll button is not visible
- PGF_NORMAL = 1; // Scroll button is in normal state
- PGF_GRAYED = 2; // Scroll button is in grayed state
- PGF_DEPRESSED = 4; // Scroll button is in depressed state
- PGF_HOT = 8; // Scroll button is in hot state
-
-
-// The following identifiers specifies the button control
- PGB_TOPORLEFT = 0;
- PGB_BOTTOMORRIGHT = 1;
-
-//---------------------------------------------------------------------------------------
-// Pager Control Messages
-//---------------------------------------------------------------------------------------
- PGM_SETCHILD = (PGM_FIRST + 1); // lParam == hwnd
-// Macro 292
-
-
-Procedure Pager_SetChild( hwnd : hwnd; hwndChild : LPARAM);
-
-
-
-CONST
- PGM_RECALCSIZE = (PGM_FIRST + 2);
-// Macro 293
-
-
-Procedure Pager_RecalcSize( hwnd : hwnd);
-
-
-
-CONST
- PGM_FORWARDMOUSE = (PGM_FIRST + 3);
-// Macro 294
-
-
-Procedure Pager_ForwardMouse( hwnd : hwnd; bForward : WPARAM);
-
-
-
-CONST
- PGM_SETBKCOLOR = (PGM_FIRST + 4);
-// Macro 295
-
-
-Function Pager_SetBkColor( hwnd : hwnd; clr : LPARAM):COLORREF;
-
-
-
-CONST
- PGM_GETBKCOLOR = (PGM_FIRST + 5);
-// Macro 296
-
-
-Function Pager_GetBkColor( hwnd : hwnd):COLORREF;
-
-
-
-CONST
- PGM_SETBORDER = (PGM_FIRST + 6);
-// Macro 297
-
-
-Function Pager_SetBorder( hwnd : hwnd; iBorder : LPARAM):cint;
-
-
-
-CONST
- PGM_GETBORDER = (PGM_FIRST + 7);
-// Macro 298
-
-
-Function Pager_GetBorder( hwnd : hwnd):cint;
-
-
-
-CONST
- PGM_SETPOS = (PGM_FIRST + 8);
-// Macro 299
-
-
-Function Pager_SetPos( hwnd : hwnd; iPos : LPARAM):cint;
-
-
-
-CONST
- PGM_GETPOS = (PGM_FIRST + 9);
-// Macro 300
-
-
-Function Pager_GetPos( hwnd : hwnd):cint;
-
-
-
-CONST
- PGM_SETBUTTONSIZE = (PGM_FIRST + 10);
-// Macro 301
-
-
-Function Pager_SetButtonSize( hwnd : hwnd; iSize : LPARAM):cint;
-
-
-
-CONST
- PGM_GETBUTTONSIZE = (PGM_FIRST + 11);
-// Macro 302
-
-
-Function Pager_GetButtonSize( hwnd : hwnd):cint;
-
-
-
-CONST
- PGM_GETBUTTONSTATE = (PGM_FIRST + 12);
-// Macro 303
-
-
-Function Pager_GetButtonState( hwnd : hwnd; iButton : LPARAM):DWORD;
-
-
-
-CONST
- PGM_GETDROPTARGET = CCM_GETDROPTARGET;
-// Macro 304
-
-
-Procedure Pager_GetDropTarget( hwnd : hwnd; ppdt : LPARAM);
-
-//---------------------------------------------------------------------------------------
-//Pager Control Notification Messages
-//---------------------------------------------------------------------------------------
-
-
-// PGN_SCROLL Notification Message
-
-
-CONST
- PGN_SCROLL = (PGN_FIRST-1);
-
- PGF_SCROLLUP = 1;
- PGF_SCROLLDOWN = 2;
- PGF_SCROLLLEFT = 4;
- PGF_SCROLLRIGHT = 8;
-
-
-//Keys down
- PGK_SHIFT = 1;
- PGK_CONTROL = 2;
- PGK_MENU = 4;
-
-
-{$IFDEF _WIN32}
-// #include <pshpack1.h>
-{$ENDIF}
-
-// This structure is sent along with PGN_SCROLL notifications
-TYPE
-
- DummyStruct17 = Record
- hdr : NMHDR;
- fwKeys : WORD; // Specifies which keys are down when this notification is send
- rcParent : RECT; // Contains Parent Window Rect
- iDir : cint; // Scrolling Direction
- iXpos : cint; // Horizontal scroll position
- iYpos : cint; // Vertical scroll position
- iScroll : cint; // [in/out] Amount to scroll
- END;
- NMPGSCROLL = DummyStruct17;
- LPNMPGSCROLL = ^DummyStruct17;
- TNMPGScroll = NMPGSCROLL;
- PNMPGScroll = LPNMPGSCROLL;
-
-
-{$IFDEF _WIN32}
-// #include <poppack.h>
-{$ENDIF}
-
-// PGN_CALCSIZE Notification Message
-
-
-CONST
- PGN_CALCSIZE = (PGN_FIRST-2);
-
- PGF_CALCWIDTH = 1;
- PGF_CALCHEIGHT = 2;
-
-TYPE
-
- DummyStruct18 = Record
- hdr : NMHDR;
- dwFlag : DWORD;
- iWidth : cint;
- iHeight : cint;
- END;
- NMPGCALCSIZE = DummyStruct18;
- LPNMPGCALCSIZE = ^DummyStruct18;
- TNMPGCalcSize = DummyStruct18;
- PNMPGCalcSize = LPNMPGCALCSIZE;
-
-
-
-// PGN_HOTITEMCHANGE Notification Message
-
-
-CONST
- PGN_HOTITEMCHANGE = (PGN_FIRST-3);
-
-{
-The PGN_HOTITEMCHANGE notification uses these notification
-flags defined in TOOLBAR:
-
- HICF_ENTERING = $00000010; // idOld is invalid
- HICF_LEAVING = $00000020; // idNew is invalid
-}
-
-// Structure for PGN_HOTITEMCHANGE notification
-//
-TYPE
-
- tagNMPGHOTITEM = Record
- hdr : NMHDR;
- idOld : cint;
- idNew : cint;
- dwFlags : DWORD; // HICF_*
- END;
- NMPGHOTITEM = tagNMPGHOTITEM;
- LPNMPGHOTITEM = ^tagNMPGHOTITEM;
- TNMPGHOTITEM = tagNMPGHOTITEM;
- PNMPGHOTITEM = ^tagNMPGHOTITEM;
-
-
-{$ENDIF} // NOPAGESCROLLER
-
-////====================== End Pager Control ==========================================
-
-//
-// === Native Font Control ===
-//
-{$IFNDEF NONATIVEFONTCTL}
-//NativeFont Class Name
-
-CONST
- WC_NATIVEFONTCTLW = {L}'NativeFontCtl';
- WC_NATIVEFONTCTLA = 'NativeFontCtl';
-
-{$IFDEF UNICODE}
-
-TYPE
- WC_NATIVEFONTCTL = WC_NATIVEFONTCTLW;
-{$ELSE}
- WC_NATIVEFONTCTL = WC_NATIVEFONTCTLA;
-{$ENDIF}
-
-// begin_r_commctrl
-
-// style definition
-
-CONST
- NFS_EDIT = $0001;
- NFS_STATIC = $0002;
- NFS_LISTCOMBO = $0004;
- NFS_BUTTON = $0008;
- NFS_ALL = $0010;
- NFS_USEFONTASSOC = $0020;
-
-// end_r_commctrl
-
-{$ENDIF} // NONATIVEFONTCTL
-// === End Native Font Control ===
-
-/// ====================== Button Control =============================
-
-{$IFNDEF NOBUTTON}
-
-{$IFDEF _WIN32}
-
-// Button Class Name
- WC_BUTTONA = 'Button';
- WC_BUTTONW = {L}'Button';
-
-CONST
-{$IFDEF UNICODE}
- WC_BUTTON = WC_BUTTONW;
-{$ELSE}
- WC_BUTTON = WC_BUTTONA;
-{$ENDIF}
-
-{$ELSE}
-
- WC_BUTTON = 'Button';
-{$ENDIF}
-
-{$ifdef win32xp}
- BUTTON_IMAGELIST_ALIGN_LEFT = 0;
- BUTTON_IMAGELIST_ALIGN_RIGHT = 1;
- BUTTON_IMAGELIST_ALIGN_TOP = 2;
- BUTTON_IMAGELIST_ALIGN_BOTTOM = 3;
- BUTTON_IMAGELIST_ALIGN_CENTER = 4; // Doesn't draw text
-
-TYPE
-
- DummyStruct19 = Record
- himl : HIMAGELIST; // Index: Normal, hot pushed, disabled. If count is less than 4, we use index 1
- margin : RECT; // Margin around icon.
- uAlign : UINT;
- END;
- BUTTON_IMAGELIST = DummyStruct19;
- PBUTTON_IMAGELIST = ^DummyStruct19;
- TDummyStruct19 = DummyStruct19;
- PDummyStruct19 = ^DummyStruct19;
-
-
-
-CONST
- BCM_GETIDEALSIZE = (BCM_FIRST + $0001);
-// Macro 305
-
-
-Function Button_GetIdealSize( hwnd : hwnd; psize : LPARAM):BOOL;
-
-
-
-CONST
- BCM_SETIMAGELIST = (BCM_FIRST + $0002);
-// Macro 306
-
-
-Function Button_SetImageList( hwnd : hwnd; pbuttonImagelist : LPARAM):BOOL;
-
-
-
-CONST
- BCM_GETIMAGELIST = (BCM_FIRST + $0003);
-// Macro 307
-
-
-Function Button_GetImageList( hwnd : hwnd; pbuttonImagelist : LPARAM):BOOL;
-
-
-
-CONST
- BCM_SETTEXTMARGIN = (BCM_FIRST + $0004);
-// Macro 308
-
-
-Function Button_SetTextMargin( hwnd : hwnd; pmargin : LPARAM):BOOL;
-
-
-CONST
- BCM_GETTEXTMARGIN = (BCM_FIRST + $0005);
-// Macro 309
-
-
-Function Button_GetTextMargin( hwnd : hwnd; pmargin : LPARAM):BOOL;
-
-
-TYPE
-
- tagNMBCHOTITEM = Record
- hdr : NMHDR;
- dwFlags : DWORD; // HICF_*
- END;
- NMBCHOTITEM = tagNMBCHOTITEM;
- LPNMBCHOTITEM = ^tagNMBCHOTITEM;
- TNMBCHOTITEM = tagNMBCHOTITEM;
- PNMBCHOTITEM = ^tagNMBCHOTITEM;
-
-
-
-CONST
- BCN_HOTITEMCHANGE = (BCN_FIRST + $0001);
-
- BST_HOT = $0200;
-{$ifdef win32vista}
- BST_DROPDOWNPUSHED = $0400;
-
-// BUTTON STYLES
- BS_SPLITBUTTON = $00000000C; // This block L suffixed (unsigned)
- BS_DEFSPLITBUTTON = $00000000D;
- BS_COMMANDLINK = $00000000E;
- BS_DEFCOMMANDLINK = $00000000F;
-
-// SPLIT BUTTON INFO mask flags
- BCSIF_GLYPH = $00001;
- BCSIF_IMAGE = $00002;
- BCSIF_STYLE = $00004;
- BCSIF_SIZE = $00008;
-
-// SPLIT BUTTON STYLE flags
- BCSS_NOSPLIT = $00001;
- BCSS_STRETCH = $00002;
- BCSS_ALIGNLEFT = $00004;
- BCSS_IMAGE = $00008;
-
- BCM_SETDROPDOWNSTATE = (BCM_FIRST + $0006);
- BCM_SETSPLITINFO = (BCM_FIRST + $0007);
- BCM_GETSPLITINFO = (BCM_FIRST + $0008);
- BCM_SETNOTE = (BCM_FIRST + $0009);
- BCM_GETNOTE = (BCM_FIRST + $000A);
- BCM_GETNOTELENGTH = (BCM_FIRST + $000B);
- BCM_SETSHIELD = (BCM_FIRST + $000C);
-
-
-// Value to pass to BCM_SETIMAGELIST to indicate that no glyph should be
-// displayed
- BCCL_NOGLYPH = HIMAGELIST(-1);
-
- BCN_DROPDOWN = (BCN_FIRST + $0002);
-Type
-
- tagBUTTON_SPLITINFO = record
- mask : UINT;
- himlGlyph : HIMAGELIST;
- uSplitStyle : UINT;
- size : SIZE;
- end;
- BUTTON_SPLITINFO = tagBUTTON_SPLITINFO;
- PBUTTON_SPLITINFO = ^BUTTON_SPLITINFO;
- LPBUTTON_SPLITINFO = PBUTTON_SPLITINFO;
-
- { NOTIFICATION MESSAGES }
-
- tagNMBCDROPDOWN = packed record
- hdr : NMHDR;
- rcButton : RECT;
- end;
- NMBCDROPDOWN = tagNMBCDROPDOWN;
- PNMBCDROPDOWN = ^NMBCDROPDOWN;
- LPNMBCDROPDOWN = PNMBCDROPDOWN;
-
-// BUTTON MESSAGES
-
-function Button_SetDropDownState(hwnd:HWND; fDropDown:BOOL) : BOOL;
-// (BOOL)SNDMSG((hwnd), BCM_SETDROPDOWNSTATE, (WPARAM)(fDropDown), 0)
-
-function Button_SetSplitInfo(hwnd:HWND; pInfo:PBUTTON_SPLITINFO):BOOL;
-// (BOOL)SNDMSG((hwnd), BCM_SETSPLITINFO, 0, (LPARAM)(pInfo))
-
-function Button_GetSplitInfo(hwnd:HWND; pInfo:PBUTTON_SPLITINFO) :BOOL;
-// (BOOL)SNDMSG((hwnd), BCM_GETSPLITINFO, 0, (LPARAM)(pInfo))
-
-function Button_SetNote(hwnd:HWND; psz:LPCWSTR) :BOOL;
-// (BOOL)SNDMSG((hwnd), BCM_SETNOTE, 0, (LPARAM)(psz))
-
-function Button_GetNote(hwnd:HWND; psz:LPCWSTR; pcc:cint) :BOOL;
-// (BOOL)SNDMSG((hwnd), BCM_GETNOTE, (WPARAM)pcc, (LPARAM)psz)
-
-function Button_GetNoteLength(hwnd:HWND) :LRESULT;
-// (LRESULT)SNDMSG((hwnd), BCM_GETNOTELENGTH, 0, 0)
-
-// Macro to use on a button or command link to display an elevated icon
-
-function Button_SetElevationRequiredState(hwnd:HWND; fRequired:BOOL) :LRESULT;
-// (LRESULT)SNDMSG((hwnd), BCM_SETSHIELD, 0, (LPARAM)fRequired)
-
-{$endif}
-{$ENDIF}
-{$ENDIF} // NOBUTTON
-
-
-/// ===================== End Button Control =========================
-
-/// ====================== Static Control =============================
-
-{$IFNDEF NOSTATIC}
-
-const
-{$IFDEF _WIN32}
-
-// Static Class Name
- WC_STATICA = 'Static';
- WC_STATICW = {L}'Static';
-
-{$IFDEF UNICODE}
-
-TYPE
- WC_STATIC = WC_STATICW;
-{$ELSE}
- WC_STATIC = WC_STATICA;
-{$ENDIF}
-
-{$ELSE}
-
-CONST
- WC_STATIC = 'Static';
-{$ENDIF}
-
-{$ENDIF} // NOSTATIC
-
-/// ===================== End Static Control =========================
-
-/// ====================== Edit Control =============================
-
-{$IFNDEF NOEDIT}
-
-{$IFDEF _WIN32}
-
-// Edit Class Name
- WC_EDITA = 'Edit';
- WC_EDITW = {L}'Edit';
-
-{$IFDEF UNICODE}
-
-TYPE
- WC_EDIT = WC_EDITW;
-{$ELSE}
- WC_EDIT = WC_EDITA;
-{$ENDIF}
-
-{$ELSE}
-
-CONST
- WC_EDIT = 'Edit';
-{$ENDIF}
-
-{$ifdef win32xp}
- EM_SETCUEBANNER = (ECM_FIRST + 1); // Set the cue banner with the lParm = LPCWSTR
-// Macro 310
-
-
-Function Edit_SetCueBannerText( hwnd : hwnd; lpcwText : LPARAM):BOOL;
-
-
-CONST
- EM_GETCUEBANNER = (ECM_FIRST + 2); // Set the cue banner with the lParm = LPCWSTR
-// Macro 311
-
-
-Function Edit_GetCueBannerText( hwnd : hwnd; lpwText : WPARAM; cchText : LPARAM):BOOL;
-
-
-TYPE
-
- _tagEDITBALLOONTIP = Record
- cbStruct : DWORD;
- pszTitle : LPCWSTR;
- pszText : LPCWSTR;
- ttiIcon : cint; // From TTI_*
- END;
- EDITBALLOONTIP = _tagEDITBALLOONTIP;
- PEDITBALLOONTIP = ^_tagEDITBALLOONTIP;
- TEDITBALLOONTIP = _tagEDITBALLOONTIP;
-
-
-
-CONST
- EM_SHOWBALLOONTIP = (ECM_FIRST + 3); // Show a balloon tip associated to the edit control
-// Macro 312
-
-
-Function Edit_ShowBalloonTip( hwnd : hwnd; peditballoontip : LPARAM):BOOL;
-
-
-CONST
- EM_HIDEBALLOONTIP = (ECM_FIRST + 4); // Hide any balloon tip associated with the edit control
-// Macro 313
-
-
-Function Edit_HideBalloonTip( hwnd : hwnd):BOOL;
-
-{$ifdef win32vista}
-const
- EM_SETHILITE = (ECM_FIRST + 5);
- EM_GETHILITE = (ECM_FIRST + 6);
-
-// both are "unimplemented" in MSDN, so probably typing is off.
-procedure Edit_SetHilite(hwndCtl:hwnd; ichStart:Wparam; ichEnd:lparam);
-// ((void)SNDMSG((hwndCtl), EM_SETHILITE, (ichStart), (ichEnd)))
-
-function Edit_GetHilite(hwndCtl:hwnd):DWORD;
-// ((DWORD)SNDMSG((hwndCtl), EM_GETHILITE, 0L, 0L))
-{$endif}
-
-{$ENDIF}
-
-{$ENDIF} // NOEDIT
-
-/// ===================== End Edit Control =========================
-
-/// ====================== Listbox Control =============================
-
-{$IFNDEF NOLISTBOX}
-
-{$IFDEF _WIN32}
-
-// Listbox Class Name
-
-CONST
- WC_LISTBOXA = 'ListBox';
- WC_LISTBOXW = {L}'ListBox';
-
-{$IFDEF UNICODE}
-
-TYPE
- WC_LISTBOX = WC_LISTBOXW;
-{$ELSE}
- WC_LISTBOX = WC_LISTBOXA;
-{$ENDIF}
-
-{$ELSE}
-
-CONST
- WC_LISTBOX = 'ListBox';
-{$ENDIF}
-
-{$ENDIF} // NOLISTBOX
-
-
-/// ===================== End Listbox Control =========================
-
-/// ====================== Combobox Control =============================
-
-{$IFNDEF NOCOMBOBOX}
-
-{$IFDEF _WIN32}
-
-// Combobox Class Name
- WC_COMBOBOXA = 'ComboBox';
- WC_COMBOBOXW = {L}'ComboBox';
-
-{$IFDEF UNICODE}
-
-TYPE
- WC_COMBOBOX = WC_COMBOBOXW;
-{$ELSE}
- WC_COMBOBOX = WC_COMBOBOXA;
-{$ENDIF}
-
-{$ELSE}
-
-CONST
- WC_COMBOBOX = 'ComboBox';
-{$ENDIF}
-
-{$ENDIF} // NOCOMBOBOX
-
-
-{$ifdef win32xp}
-
-// custom combobox control messages
- CB_SETMINVISIBLE = (CBM_FIRST + 1);
- CB_GETMINVISIBLE = (CBM_FIRST + 2);
-
-// Macro 314
-
-
-Function ComboBox_SetMinVisible( hwnd : hwnd; iMinVisible : WPARAM):BOOL;
-
-
-// Macro 315
-
-
-Function ComboBox_GetMinVisible( hwnd : hwnd):cint;
-
-
-{$ENDIF}
-
-/// ===================== End Combobox Control =========================
-
-/// ====================== Scrollbar Control ============================
-
-{$IFNDEF NOSCROLLBAR}
-
-{$IFDEF _WIN32}
-
-// Scrollbar Class Name
-
-CONST
- WC_SCROLLBARA = 'ScrollBar';
- WC_SCROLLBARW = {L}'ScrollBar';
-
-{$IFDEF UNICODE}
-
-TYPE
- WC_SCROLLBAR = WC_SCROLLBARW;
-{$ELSE}
- WC_SCROLLBAR = WC_SCROLLBARA;
-{$ENDIF}
-
-{$ELSE}
-
-CONST
- WC_SCROLLBAR = 'ScrollBar';
-{$ENDIF}
-
-{$ENDIF} // NOSCROLLBAR
-
-
-/// ===================== End Scrollbar Control =========================
-
-
-//====== SysLink control =========================================
-
-{$IFDEF _WIN32}
-{$ifdef win32xp}
-
- INVALID_LINK_INDEX = (-1);
-
-
-
- WC_LINK = {L}'SysLink';
-
- LWS_TRANSPARENT = $0001;
- LWS_IGNORERETURN = $0002;
-
-{$ifdef win32vista}
- LWS_NOPREFIX = $0004;
- LWS_USEVISUALSTYLE = $0008;
- LWS_USECUSTOMTEXT = $0010;
- LWS_RIGHT = $0020;
-{$endif}
-
- LIF_ITEMINDEX = $00000001;
- LIF_STATE = $00000002;
- LIF_ITEMID = $00000004;
- LIF_URL = $00000008;
-
- LIS_FOCUSED = $00000001;
- LIS_ENABLED = $00000002;
- LIS_VISITED = $00000004;
-{$ifdef win32vista}
- LIS_HOTTRACK = $00000008;
- LIS_DEFAULTCOLORS = $00000010; // Don't use any custom text colors
-{$endif}
-
-TYPE
-
-
- tagLHITTESTINFO = Record
- pt : POINT;
- item : LITEM;
- END;
- LHITTESTINFO = tagLHITTESTINFO;
- PLHITTESTINFO = ^tagLHITTESTINFO;
- TLHITTESTINFO = tagLHITTESTINFO;
-// PLHITTESTINFO = ^tagLHITTESTINFO;
-
-
- tagNMLINK = Record
- hdr : NMHDR;
- item : LITEM;
- END;
- NMLINK = tagNMLINK;
- PNMLINK = ^tagNMLINK;
- TNMLINK = tagNMLINK;
-// PNMLINK = ^tagNMLINK;
-
-
-// SysLink notifications
-// NM_CLICK // wParam: control ID, lParam: PNMLINK, ret: ignored.
-
-// LinkWindow messages
-
-CONST
- LM_HITTEST = (WM_USER+$300); // wParam: n/a, lparam: PLHITTESTINFO, ret: BOOL
- LM_GETIDEALHEIGHT = (WM_USER+$301); // wParam: n/a, lparam: n/a, ret: cy
- LM_SETITEM = (WM_USER+$302); // wParam: n/a, lparam: LITEM*, ret: BOOL
- LM_GETITEM = (WM_USER+$303); // wParam: n/a, lparam: LITEM*, ret: BOOL
-
-{$ENDIF}
-{$ENDIF} // _WIN32
-//====== End SysLink control =========================================
-
-
-//
-// === MUI APIs ===
-//
-{$IFNDEF NOMUI}
-procedure InitMUILanguage(uiLang:LANGID); stdcall; external commctrldll name 'InitMUILanguage';
-
-
-function GetMUILanguage:LANGID; stdcall; external commctrldll name 'GetMUILanguage';
-{$ENDIF} // NOMUI
-
-{$ENDIF} // _WIN32_IE >= 0x0400
-
-{$IFDEF _WIN32}
-//====== TrackMouseEvent =====================================================
-
-{$IFNDEF NOTRACKMOUSEEVENT}
-
-//
-// If the messages for TrackMouseEvent have not been defined then define them
-// now.
-//
-{$IFNDEF WM_MOUSEHOVER}
-
-CONST
- WM_MOUSEHOVER = $02A1;
- WM_MOUSELEAVE = $02A3;
-{$ENDIF}
-
-//
-// If the TRACKMOUSEEVENT structure and associated flags havent been declared
-// then declare them now.
-//
-{$IFNDEF TME_HOVER}
-
- TME_HOVER = $00000001;
- TME_LEAVE = $00000002;
-{$ifdef win32xp}
- TME_NONCLIENT = $00000010;
-{$ENDIF} { WINVER >= 0x0500 }
- TME_QUERY = $40000000;
- TME_CANCEL = $80000000;
-
-
-
- HOVER_DEFAULT = $FFFFFFFF;
-
-TYPE
-
- tagTRACKMOUSEEVENT = Record
- cbSize : DWORD;
- dwFlags : DWORD;
- hwndTrack : HWND;
- dwHoverTime : DWORD;
- END;
- TRACKMOUSEEVENT = tagTRACKMOUSEEVENT;
- LPTRACKMOUSEEVENT = ^tagTRACKMOUSEEVENT;
- TTRACKMOUSEEVENT = tagTRACKMOUSEEVENT;
- PTRACKMOUSEEVENT = ^tagTRACKMOUSEEVENT;
-
-
-{$ENDIF} // !TME_HOVER
-
-
-
-//
-// Declare _TrackMouseEvent. This API tries to use the window manager's
-// implementation of TrackMouseEvent if it is present, otherwise it emulates.
-//
-function _TrackMouseEvent(lpEventTrack:LPTRACKMOUSEEVENT):BOOL; stdcall; external commctrldll name '_TrackMouseEvent';
-
-{$ENDIF} // !NOTRACKMOUSEEVENT
-
-{$ifdef ie4plus}
-
-//====== Flat Scrollbar APIs=========================================
-{$IFNDEF NOFLATSBAPIS}
-
-
-CONST
- WSB_PROP_CYVSCROLL = LONG($00000001);
- WSB_PROP_CXHSCROLL = LONG($00000002);
- WSB_PROP_CYHSCROLL = LONG($00000004);
- WSB_PROP_CXVSCROLL = LONG($00000008);
- WSB_PROP_CXHTHUMB = LONG($00000010);
- WSB_PROP_CYVTHUMB = LONG($00000020);
- WSB_PROP_VBKGCOLOR = LONG($00000040);
- WSB_PROP_HBKGCOLOR = LONG($00000080);
- WSB_PROP_VSTYLE = LONG($00000100);
- WSB_PROP_HSTYLE = LONG($00000200);
- WSB_PROP_WINSTYLE = LONG($00000400);
- WSB_PROP_PALETTE = LONG($00000800);
- WSB_PROP_MASK = LONG($00000FFF);
-
- FSB_FLAT_MODE = 2;
- FSB_ENCARTA_MODE = 1;
- FSB_REGULAR_MODE = 0;
-
-function FlatSB_EnableScrollBar(hwnd:HWND;code : cint;p3 : UINT):BOOL; stdcall; external commctrldll name 'FlatSB_EnableScrollBar';
-function FlatSB_ShowScrollBar(hwnd:HWND;code : cint;p3 : BOOL):BOOL; stdcall; external commctrldll name 'FlatSB_ShowScrollBar';
-
-function FlatSB_GetScrollRange(hwnd:HWND;code : cint;p3 : LPINT;p4 : LPINT):BOOL; stdcall; external commctrldll name 'FlatSB_GetScrollRange';
-function FlatSB_GetScrollRange(hwnd:HWND;code : cint;var p3,p4 : cint):BOOL; stdcall; external commctrldll name 'FlatSB_GetScrollRange';
-function FlatSB_GetScrollInfo(hwnd:HWND;code : cint;ScrollInfo : LPSCROLLINFO):BOOL; stdcall; external commctrldll name 'FlatSB_GetScrollInfo';
-function FlatSB_GetScrollInfo(hwnd:HWND;code : cint;var ScrollInfo : TSCROLLINFO):BOOL; stdcall; external commctrldll name 'FlatSB_GetScrollInfo';
-
-function FlatSB_GetScrollPos(hwnd:HWND;code : cint):cint; stdcall; external commctrldll name 'FlatSB_GetScrollPos';
-
-
-function FlatSB_GetScrollProp(hwnd:HWND):BOOL; stdcall; external commctrldll name 'FlatSB_GetScrollProp';
-{$IFDEF _WIN64}
-function FlatSB_GetScrollPropPtr(hwnd:HWND;propIndex : cint;p3 : LPINT):BOOL; stdcall; external commctrldll name 'FlatSB_GetScrollPropPtr';
-{$ELSE}
-function FlatSB_GetScrollPropPtr(hwnd:HWND;code : cint):BOOL; stdcall; external commctrldll name 'FlatSB_GetScrollProp';
-{$ENDIF}
-
-
-function FlatSB_SetScrollPos(hWnd:HWND;nBar,nPos:cint;bRedraw:BOOL):cint; stdcall; external commctrldll name 'FlatSB_SetScrollPos';
-
-function FlatSB_SetScrollInfo(hWnd:HWND;BarFlag:cint;const ScrollInfo:TScrollInfo;Redraw:BOOL):cint; stdcall; external commctrldll name 'FlatSB_SetScrollInfo';
-
-
-function FlatSB_SetScrollRange(hWnd: HWND; nBar,nMinPos,nMaxPos: cint; bRedraw: BOOL):cint; stdcall; external commctrldll name 'FlatSB_SetScrollRange';
-function FlatSB_SetScrollProp(p1: HWND; index : UINT; newValue: INT_PTR; p4: BOOL):BOOL; stdcall; external commctrldll name 'FlatSB_SetScrollProp';
-
-function InitializeFlatSB(hWnd:HWND):BOOL; stdcall; external commctrldll name 'InitializeFlatSB';
-function UninitializeFlatSB(hWnd:HWND):HRESULT; stdcall; external commctrldll name 'UninitializeFlatSB';
-
-{$ENDIF} // NOFLATSBAPIS
-
-{$ENDIF} // _WIN32_IE >= 0x0400
-
-{$ENDIF} { _WIN32 }
-
-{$ENDIF} // _WIN32_IE >= 0x0300
-
-{$ifdef win32xp}
-//
-// subclassing stuff
-//
-TYPE
- subclassproc=function (hwnd:HWND;uMsg:cUINT; wParam:WPARAM;lparam:LPARAM;uISubClass : UINT_PTR;dwRefData:DWORD_PTR):LRESULT; stdcall;
-
-{
- (CALLBACK *SUBCLASSPROC)(HWND hWnd, UINT uMsg, WPARAM wParam, = LRESULT
- LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData);
-
-typedef LRESULT (CALLBACK *SUBCLASSPROC)(HWND hWnd, UINT uMsg, WPARAM wParam,
- LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData);
-
- hwnd:HWND;uMsg:cUINT; wParam:WPARAM;lparam:LPARAM;uISubClass : CUINT_PTR;dwRefData:DWORD_PTR):LRESULT; stdcall;
-}
-
-function SetWindowSubclass(hWnd:HWND;pfnSubclass:SUBCLASSPROC;uIdSubclass:UINT_PTR;dwRefData:DWORD_PTR):BOOL; stdcall; external commctrldll name 'SetWindowSubclass';
-function GetWindowSubclass(hWnd:HWND;pfnSubclass:SUBCLASSPROC;uIdSubclass:UINT_PTR;pdwRefData:PDWORD_PTR):BOOL; stdcall; external commctrldll name 'GetWindowSubclass';
-function RemoveWindowSubclass(hWnd:HWND;pfnSubclass:SUBCLASSPROC;uIdSubclass:UINT_PTR):BOOL; stdcall; external commctrldll name 'RemoveWindowSubclass';
-
-function DefSubclassProc(hWnd:HWND;uMsg:UINT;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall; external commctrldll name 'DefSubclassProc';
-{$ENDIF}
-
-{$ifdef NTDDI_VISTA}
-type _LI_METRIC= (
-
- LIM_SMALL=0, // corresponds to SM_CXSMICON/SM_CYSMICON
- LIM_LARGE // corresponds to SM_CXICON/SM_CYICON
- );
-
-Function LoadIconMetric( hinst:HINST; pszName:LPCWStr;lims:cint; var phico: HICON ):HRESULT; stdcall; external commctrldll name 'LoadIconMetric';
-Function LoadIconWithScaleDown( hinst:HINST; pszName:LPCWStr;cx:cint;cy:cint;var phico: HICON ):HRESULT; stdcall; external commctrldll name 'LoadIconMetric';
-
-{$endif}
-
-{$ifdef win32xp}
-
-function DrawShadowText(hdc:HDC;pszText:LPCWSTR;cch:UINT;prc:PRECT;dwFlags:DWORD;crText:COLORREF;crShadow:COLORREF;ixOffset:cint;iyOffset:cint):cint; stdcall; external commctrldll name 'DrawShadowText';
-{$ENDIF}
-
-// ===================== Task Dialog =========================
-
-Type
- PFTASKDIALOGCALLBACK = function(hwnd: HWND; msg: UINT; wParam: WPARAM; lParam: LPARAM; lpRefData: LONG_PTR): HRESULT; stdcall;
-
- // _TASKDIALOG_FLAGS enum
-const
- TDF_ENABLE_HYPERLINKS = $0001;
- TDF_USE_HICON_MAIN = $0002;
- TDF_USE_HICON_FOOTER = $0004;
- TDF_ALLOW_DIALOG_CANCELLATION = $0008;
- TDF_USE_COMMAND_LINKS = $0010;
- TDF_USE_COMMAND_LINKS_NO_ICON = $0020;
- TDF_EXPAND_FOOTER_AREA = $0040;
- TDF_EXPANDED_BY_DEFAULT = $0080;
- TDF_VERIFICATION_FLAG_CHECKED = $0100;
- TDF_SHOW_PROGRESS_BAR = $0200;
- TDF_SHOW_MARQUEE_PROGRESS_BAR = $0400;
- TDF_CALLBACK_TIMER = $0800;
- TDF_POSITION_RELATIVE_TO_WINDOW = $1000;
- TDF_RTL_LAYOUT = $2000;
- TDF_NO_DEFAULT_RADIO_BUTTON = $4000;
- TDF_CAN_BE_MINIMIZED = $8000;
-
-type
- TASKDIALOG_FLAGS = Integer; // Note: _TASKDIALOG_FLAGS is an int
-
- // _TASKDIALOG_MESSAGES enum
-const
- TDM_NAVIGATE_PAGE = WM_USER+101;
- TDM_CLICK_BUTTON = WM_USER+102; // wParam = Button ID
- TDM_SET_MARQUEE_PROGRESS_BAR = WM_USER+103; // wParam = 0 (nonMarque) wParam != 0 (Marquee)
- TDM_SET_PROGRESS_BAR_STATE = WM_USER+104; // wParam = new progress state
- TDM_SET_PROGRESS_BAR_RANGE = WM_USER+105; // lParam = MAKELPARAM(nMinRange, nMaxRange)
- TDM_SET_PROGRESS_BAR_POS = WM_USER+106; // wParam = new position
- TDM_SET_PROGRESS_BAR_MARQUEE = WM_USER+107; // wParam = 0 (stop marquee), wParam != 0 (start marquee), lparam = speed (milliseconds between repaints)
- TDM_SET_ELEMENT_TEXT = WM_USER+108; // wParam = element (TASKDIALOG_ELEMENTS), lParam = new element text (LPCWSTR)
- TDM_CLICK_RADIO_BUTTON = WM_USER+110; // wParam = Radio Button ID
- TDM_ENABLE_BUTTON = WM_USER+111; // lParam = 0 (disable), lParam != 0 (enable), wParam = Button ID
- TDM_ENABLE_RADIO_BUTTON = WM_USER+112; // lParam = 0 (disable), lParam != 0 (enable), wParam = Radio Button ID
- TDM_CLICK_VERIFICATION = WM_USER+113; // wParam = 0 (unchecked), 1 (checked), lParam = 1 (set key focus)
- TDM_UPDATE_ELEMENT_TEXT = WM_USER+114; // wParam = element (TASKDIALOG_ELEMENTS), lParam = new element text (LPCWSTR)
- TDM_SET_BUTTON_ELEVATION_REQUIRED_STATE = WM_USER+115; // wParam = Button ID, lParam = 0 (elevation not required), lParam != 0 (elevation required)
- TDM_UPDATE_ICON = WM_USER+116; // wParam = icon element (TASKDIALOG_ICON_ELEMENTS), lParam = new icon (hIcon if TDF_USE_HICON_* was set, PCWSTR otherwise)
-
- // _TASKDIALOG_NOTIFICATIONS enum
-const
- TDN_CREATED = 0;
- TDN_NAVIGATED = 1;
- TDN_BUTTON_CLICKED = 2; // wParam = Button ID
- TDN_HYPERLINK_CLICKED = 3; // lParam = (LPCWSTR)pszHREF
- TDN_TIMER = 4; // wParam = Milliseconds since dialog created or timer reset
- TDN_DESTROYED = 5;
- TDN_RADIO_BUTTON_CLICKED = 6; // wParam = Radio Button ID
- TDN_DIALOG_CONSTRUCTED = 7;
- TDN_VERIFICATION_CLICKED = 8; // wParam = 1 if checkbox checked, 0 if not, lParam is unused and always 0
- TDN_HELP = 9;
- TDN_EXPANDO_BUTTON_CLICKED = 10; // wParam = 0 (dialog is now collapsed), wParam != 0 (dialog is now expanded)
-
-type
- _TASKDIALOG_BUTTON = packed record
- nButtonID: Integer;
- pszButtonText: PCWSTR;
- end;
- TASKDIALOG_BUTTON = _TASKDIALOG_BUTTON;
- TTASKDIALOG_BUTTON = TASKDIALOG_BUTTON;
- PTASKDIALOG_BUTTON = ^TASKDIALOG_BUTTON;
-
- // _TASKDIALOG_ELEMENTS enum
-const
- TDE_CONTENT = 0;
- TDE_EXPANDED_INFORMATION = 1;
- TDE_FOOTER = 2;
- TDE_MAIN_INSTRUCTION = 3;
-
- // _TASKDIALOG_ICON_ELEMENTS enum
- TDIE_ICON_MAIN = 0;
- TDIE_ICON_FOOTER = 1;
-
- TD_WARNING_ICON = MAKEINTRESOURCEW(Word(-1));
- TD_ERROR_ICON = MAKEINTRESOURCEW(Word(-2));
- TD_INFORMATION_ICON = MAKEINTRESOURCEW(Word(-3));
- TD_SHIELD_ICON = MAKEINTRESOURCEW(Word(-4));
- TD_SHIELD_GRADIENT_ICON = MAKEINTRESOURCEW(Word(-5));
- TD_SHIELD_WARNING_ICON = MAKEINTRESOURCEW(Word(-6));
- TD_SHIELD_ERROR_ICON = MAKEINTRESOURCEW(Word(-7));
- TD_SHIELD_OK_ICON = MAKEINTRESOURCEW(Word(-8));
- TD_SHIELD_GRAY_ICON = MAKEINTRESOURCEW(Word(-9));
-
- // _TASKDIALOG_COMMON_BUTTON_FLAGS enum
- TDCBF_OK_BUTTON = $0001; // selected control return value IDOK
- TDCBF_YES_BUTTON = $0002; // selected control return value IDYES
- TDCBF_NO_BUTTON = $0004; // selected control return value IDNO
- TDCBF_CANCEL_BUTTON = $0008; // selected control return value IDCANCEL
- TDCBF_RETRY_BUTTON = $0010; // selected control return value IDRETRY
- TDCBF_CLOSE_BUTTON = $0020; // selected control return value IDCLOSE
-
-type
- TASKDIALOG_COMMON_BUTTON_FLAGS = Integer; // Note: _TASKDIALOG_COMMON_BUTTON_FLAGS is an int
-
- _TASKDIALOGCONFIG = packed record
- cbSize: UINT;
- hwndParent: HWND;
- hInstance: HINST; // used for MAKEINTRESOURCE() strings
- dwFlags: TASKDIALOG_FLAGS; // TASKDIALOG_FLAGS (TDF_XXX) flags
- dwCommonButtons: TASKDIALOG_COMMON_BUTTON_FLAGS; // TASKDIALOG_COMMON_BUTTON (TDCBF_XXX) flags
- pszWindowTitle: PCWSTR; // string or MAKEINTRESOURCE()
- case PtrInt of
- 0: (hMainIcon: HICON);
- 1: (
- pszMainIcon: PCWSTR;
- pszMainInstruction: PCWSTR;
- pszContent: PCWSTR;
- cButtons: UINT;
- pButtons: PTASKDIALOG_BUTTON;
- nDefaultButton: Integer;
- cRadioButtons: UINT;
- pRadioButtons: PTASKDIALOG_BUTTON;
- nDefaultRadioButton: Integer;
- pszVerificationText: PCWSTR;
- pszExpandedInformation: PCWSTR;
- pszExpandedControlText: PCWSTR;
- pszCollapsedControlText: PCWSTR;
- case PtrInt of
- 0: (hFooterIcon: HICON);
- 1: (
- pszFooterIcon: PCWSTR;
- pszFooter: PCWSTR;
- pfCallback: PFTASKDIALOGCALLBACK;
- lpCallbackData: LONG_PTR;
- cxWidth: UINT; // width of the Task Dialog's client area in DLU's. If 0, Task Dialog will calculate the ideal width.
- );
- );
- end;
- TASKDIALOGCONFIG = _TASKDIALOGCONFIG;
- PTASKDIALOGCONFIG = ^TASKDIALOGCONFIG;
- TTASKDIALOGCONFIG = TASKDIALOGCONFIG;
-
-var
- TaskDialogIndirect: function(const pTaskConfig: PTASKDIALOGCONFIG; pnButton: PInteger; pnRadioButton: PInteger; pfVerificationFlagChecked: PBOOL): HRESULT; stdcall;
- TaskDialog: function(hwndParent: HWND; hInstance: HINST; pszWindowTitle: PCWSTR; pszMainInstruction: PCWSTR; pszContent: PCWSTR;
- dwCommonButtons: TASKDIALOG_COMMON_BUTTON_FLAGS; pszIcon: PCWSTR; pnButton: PInteger): HRESULT; stdcall;
-
-
-// ==================== End TaskDialog =======================
-
-
-IMPLEMENTATION
-
-// Macro 8
-
-//#define HANDLE_WM_NOTIFY(hwnd, wParam, lParam, fn) \
-// (fn)((hwnd), (int)(wParam), (NMHDR *)(lParam))
-
-Procedure HANDLE_WM_NOTIFY( hwnd : hwnd; wParam : cint;var _lParam : NMHDR ;fn:Pointer);
-
-TYPE FnType=procedure ( hwnd : hwnd; wParam : cint;tst:LPARAM); stdcall;
-
-Begin
- fnType(fn)(hwnd, wParam, LPARAM(@_lParam));
-end;
-
-// Macro 9
-
-//#define FORWARD_WM_NOTIFY(hwnd, idFrom, pnmhdr, fn) \
-// (LRESULT)(fn)((hwnd), WM_NOTIFY, (WPARAM)(int)(idFrom), (LPARAM)(NMHDR *)(pnmhdr))
-
-Function FORWARD_WM_NOTIFY( hwnd : hwnd; idFrom : cint;var pnmhdr : NMHDR ; fn : pointer ):LRESULT;
-
-TYPE FnType=Function( hwnd : hwnd; wParam : cint;wparam2:cint;lparam1:lparam):LResult; stdcall;
-
-Begin
- Result:=LRESULT(fntype(fn)(hwnd, WM_NOTIFY, idFrom, LPARAM(@pnmhdr)));
-end;
-
-// Macro 10
-// #define CCSIZEOF_STRUCT(structname, member) (((int)((LPBYTE)(&((structname*)0)->member) - ((LPBYTE)((structname*)0)))) + sizeof(((structname*)0)->member))
-
-
-// Macro 11
-// #define ImageList_AddIcon(himl, hicon) ImageList_ReplaceIcon(himl, -1, hicon)
-
-Function ImageList_AddIcon(Himl:HIMAGELIST;hicon:HICON):cint;
-Begin
- Result:=ImageList_ReplaceIcon(himl,-1,hicon);
-end;
-
-
-// Macro 12
-// #define INDEXTOOVERLAYMASK(i) ((i) << 8)
-
-// Macro 13
-// #define ImageList_RemoveAll(himl) ImageList_Remove(himl, -1)
-
-Procedure ImageList_RemoveAll(himl:HIMAGELIST);
-Begin
- ImageList_Remove(himl, -1)
-End;
-
-// Macro 14
-// #define ImageList_ExtractIcon(hi, himl, i) ImageList_GetIcon(himl, i, 0)
-
-function ImageList_ExtractIcon(hi:longint; himl:HIMAGELIST;i:longint):HICON;
-
-Begin
- result:=ImageList_GetIcon(himl, i,0);
-end;
-
-
-// Macro 15
-// #define ImageList_LoadBitmap(hi, lpbmp, cx, cGrow, crMask)
-// ImageList_LoadImage(hi, lpbmp, cx, cGrow, crMask, IMAGE_BITMAP, 0)
-
-Procedure ImageList_LoadBitmap(hi:HINST;bmp:LPCTSTR;cx:cint;cGrow:cint;crMask:COLORREF);
-
-Begin
- ImageList_LoadImage(hi, bmp, cx, cGrow, crMask, IMAGE_BITMAP, 0);
-End;
-
-// Macro 16
-// #define Header_GetItemCount(hwndHD) \
-// (int)SNDMSG((hwndHD), HDM_GETITEMCOUNT, 0, DWord(0))
-
-Function Header_GetItemCount( hwndHD : hwnd):cint;
-
-Begin
- Result:=cint(SendMessage((hwndHD), HDM_GETITEMCOUNT, 0, LPARAM(0)))
-end;
-
-
-// Macro 17
-//#define Header_InsertItem(hwndHD, i, phdi) \
-// (int)SNDMSG((hwndHD), HDM_INSERTITEM, (WPARAM)(int)(i), (LPARAM)(const HD_ITEM *)(phdi))
-
-Function Header_InsertItem( hwndHD : hwnd; i : cint;const phdi : HD_ITEM ):cint;
-
-Begin
- Result:=cint(SendMessage((hwndHD), HDM_INSERTITEM, (i), LPARAM(@phdi)));
-end;
-
-// Macro 18
-//#define Header_DeleteItem(hwndHD, i) \
-// (BOOL)SNDMSG((hwndHD), HDM_DELETEITEM, (WPARAM)(int)(i), LPARAM(0))
-
-Function Header_DeleteItem( hwndHD : hwnd; i : cint):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwndHD), HDM_DELETEITEM, (i), LPARAM(0)));
-end;
-
-
-// Macro 19
-// #define Header_GetItem(hwndHD, i, phdi) \
-// (BOOL)SNDMSG((hwndHD), HDM_GETITEM, (WPARAM)(int)(i), (LPARAM)(HD_ITEM *)(phdi))
-
-Function Header_GetItem( hwndHD : hwnd; i : cint;var phdi : HD_ITEM ):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwndHD), HDM_GETITEM, (i), LPARAM(@phdi)));
-end;
-
-
-// Macro 20
-// #define Header_SetItem(hwndHD, i, phdi) \
-// (BOOL)SNDMSG((hwndHD), HDM_SETITEM, (WPARAM)(int)(i), (LPARAM)(const HD_ITEM *)(phdi))
-
-Function Header_SetItem( hwndHD : hwnd; i : cint;const phdi : HD_ITEM ):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwndHD), HDM_SETITEM, (i), LPARAM(@phdi)));
-end;
-
-
-// Macro 21
-// #define Header_Layout(hwndHD, playout) \
-// (BOOL)SNDMSG((hwndHD), HDM_LAYOUT, 0, (LPARAM)(HD_LAYOUT *)(playout))
-
-Function Header_Layout( hwndHD : hwnd;var playout : HD_LAYOUT ):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwndHD), HDM_LAYOUT, 0, LPARAM(@playout)))
-end;
-
-
-// Macro 22
-// #define Header_GetItemRect(hwnd, iItem, lprc) \
-// (BOOL)SNDMSG((hwnd), HDM_GETITEMRECT, (WPARAM)(iItem), (LPARAM)(lprc))
-
-Function Header_GetItemRect( hwnd : hwnd; iItem : WPARAM; lprc : LPARAM):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), HDM_GETITEMRECT, iItem, lprc));
-end;
-
-
-// Macro 23
-// #define Header_SetImageList(hwnd, himl) \
-// (HIMAGELIST)SNDMSG((hwnd), HDM_SETIMAGELIST, 0, (LPARAM)(himl))
-
-Function Header_SetImageList( hwnd : hwnd; himl : LPARAM):HIMAGELIST;
-
-Begin
- Result:=HIMAGELIST(SendMessage((hwnd), HDM_SETIMAGELIST, 0, himl))
-end;
-
-
-// Macro 24
-// #define Header_GetImageList(hwnd) \
-// (HIMAGELIST)SNDMSG((hwnd), HDM_GETIMAGELIST, 0, 0)
-
-Function Header_GetImageList( hwnd : hwnd):HIMAGELIST;
-
-Begin
- Result:=HIMAGELIST(SendMessage((hwnd), HDM_GETIMAGELIST, 0, 0))
-end;
-
-
-// Macro 25
-// #define Header_OrderToIndex(hwnd, i) \
-// (int)SNDMSG((hwnd), HDM_ORDERTOINDEX, (WPARAM)(i), 0)
-
-Function Header_OrderToIndex( hwnd : hwnd; i : WPARAM):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), HDM_ORDERTOINDEX, (i), 0))
-end;
-
-
-// Macro 26
-// #define Header_CreateDragImage(hwnd, i) \
-// (HIMAGELIST)SNDMSG((hwnd), HDM_CREATEDRAGIMAGE, (WPARAM)(i), 0)
-
-Function Header_CreateDragImage( hwnd : hwnd; i : WPARAM):HIMAGELIST;
-
-Begin
- Result:=HIMAGELIST(SendMessage((hwnd), HDM_CREATEDRAGIMAGE, (i), 0))
-end;
-
-
-// Macro 27
-// #define Header_GetOrderArray(hwnd, iCount, lpi) \
-// (BOOL)SNDMSG((hwnd), HDM_GETORDERARRAY, (WPARAM)(iCount), (LPARAM)(lpi))
-
-Function Header_GetOrderArray( hwnd : hwnd; iCount : WPARAM; lpi : LPARAM):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), HDM_GETORDERARRAY, iCount, lpi))
-end;
-
-
-// Macro 28
-// #define Header_SetOrderArray(hwnd, iCount, lpi) \
-// (BOOL)SNDMSG((hwnd), HDM_SETORDERARRAY, (WPARAM)(iCount), (LPARAM)(lpi))
-
-Function Header_SetOrderArray( hwnd : hwnd; iCount : WPARAM; lpi : PInteger):BOOL;inline;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), HDM_SETORDERARRAY, iCount, LPARAM(lpi)))
-end;
-
-
-// Macro 29
-// #define Header_SetHotDivider(hwnd, fPos, dw) \
-// (int)SNDMSG((hwnd), HDM_SETHOTDIVIDER, (WPARAM)(fPos), (LPARAM)(dw))
-
-Function Header_SetHotDivider( hwnd : hwnd; fPos : WPARAM; dw : LPARAM):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), HDM_SETHOTDIVIDER, fPos, dw))
-end;
-
-
-{$ifdef ie5plus}
-// Macro 30
-// #define Header_SetBitmapMargin(hwnd, iWidth) \
-// (int)SNDMSG((hwnd), HDM_SETBITMAPMARGIN, (WPARAM)(iWidth), 0)
-
-Function Header_SetBitmapMargin( hwnd : hwnd; iWidth : WPARAM):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), HDM_SETBITMAPMARGIN, iWidth, 0))
-end;
-
-
-// Macro 31
-// #define Header_GetBitmapMargin(hwnd) \
-// (int)SNDMSG((hwnd), HDM_GETBITMAPMARGIN, 0, 0)
-
-Function Header_GetBitmapMargin( hwnd : hwnd):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), HDM_GETBITMAPMARGIN, 0, 0))
-end;
-
-{$ENDIF}
-
-// Macro 32
-// #define Header_SetUnicodeFormat(hwnd, fUnicode) \
-// (BOOL)SNDMSG((hwnd), HDM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
-
-Function Header_SetUnicodeFormat( hwnd : hwnd; fUnicode : WPARAM):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), HDM_SETUNICODEFORMAT, fUnicode, 0));
-end;
-
-
-// Macro 33
-// #define Header_GetUnicodeFormat(hwnd) \
-// (BOOL)SNDMSG((hwnd), HDM_GETUNICODEFORMAT, 0, 0)
-
-Function Header_GetUnicodeFormat( hwnd : hwnd):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), HDM_GETUNICODEFORMAT, 0, 0))
-end;
-
-
-{$ifdef IE5plus}
-// Macro 34
-// #define Header_SetFilterChangeTimeout(hwnd, i) \
-// (int)SNDMSG((hwnd), HDM_SETFILTERCHANGETIMEOUT, 0, (LPARAM)(i))
-
-Function Header_SetFilterChangeTimeout( hwnd : hwnd; i : LPARAM):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), HDM_SETFILTERCHANGETIMEOUT, 0, (i)))
-end;
-
-
-// Macro 35
-// #define Header_EditFilter(hwnd, i, fDiscardChanges) \
-// (int)SNDMSG((hwnd), HDM_EDITFILTER, (WPARAM)(i), MAKELPARAM(fDiscardChanges, 0))
-
-Function Header_EditFilter( hwnd : hwnd; i : WPARAM; fDiscardChanges :cint ):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), HDM_EDITFILTER, (i), MAKELPARAM(fDiscardChanges, 0)));
-end;
-
-
-// Macro 36
-// #define Header_ClearFilter(hwnd, i) \
-// (int)SNDMSG((hwnd), HDM_CLEARFILTER, (WPARAM)(i), 0)
-
-Function Header_ClearFilter( hwnd : hwnd; i : WPARAM):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), HDM_CLEARFILTER, (i), 0))
-end;
-
-
-// Macro 37
-// #define Header_ClearAllFilters(hwnd) \
-// (int)SNDMSG((hwnd), HDM_CLEARFILTER, (WPARAM)-1, 0)
-
-Function Header_ClearAllFilters( hwnd : hwnd):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), HDM_CLEARFILTER, WPARAM(-1), 0))
-end;
-{$endif}
-{$ifdef win32vista}
-// macro 37a ..37d
-function Header_GetOverflowRect( hwnd : hwnd; lprc:lprect):bool;
-begin
- result:=bool(sendmessage(hwnd, HDM_GETOVERFLOWRECT, 0, LPARAM(lprc)));
-end;
-
-function Header_GetFocusedItem(hwnd : hwnd):cint;
-begin
- Result:=cint(SendMessage((hwnd), HDM_GETFOCUSEDITEM, WPARAM(0), LPARAM(0)));
-end;
-
-function Header_SetFocusedItem(hwnd:hwnd; iItem:cint):BOOL;
-begin
- result:=bool(sendmessage(hwnd, HDM_SETFOCUSEDITEM, WPARAM(0),LPARAM(iItem)));
-end;
-function Header_GetItemDropDownRect(hwnd : hwnd;iItem:cint; lprc:lprect):bool;
-begin
- result:=bool(sendmessage(hwnd, HDM_GETITEMDROPDOWNRECT, WPARAM(iItem), LPARAM(lprc)));
-end;
-{$endif}
-
-// Macro 38
-// #define ListView_SetUnicodeFormat(hwnd, fUnicode) \
-// (BOOL)SNDMSG((hwnd), LVM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
-
-Function ListView_SetUnicodeFormat( hwnd : hwnd; fUnicode : WPARAM):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_SETUNICODEFORMAT, fUnicode, 0));
-end;
-
-
-// Macro 39
-// #define ListView_GetUnicodeFormat(hwnd) \
-// (BOOL)SNDMSG((hwnd), LVM_GETUNICODEFORMAT, 0, 0)
-
-Function ListView_GetUnicodeFormat( hwnd : hwnd):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_GETUNICODEFORMAT, 0, 0))
-end;
-
-
-// Macro 40
-// #define ListView_GetBkColor(hwnd) \
-// (COLORREF)SNDMSG((hwnd), LVM_GETBKCOLOR, 0, LPARAM(0))
-
-Function ListView_GetBkColor( hwnd : hwnd):COLORREF;
-
-Begin
- Result:=COLORREF(SendMessage((hwnd), LVM_GETBKCOLOR, 0, LPARAM(0)))
-end;
-
-
-// Macro 41
-// #define ListView_SetBkColor(hwnd, clrBk) \
-// (BOOL)SNDMSG((hwnd), LVM_SETBKCOLOR, 0, (LPARAM)(COLORREF)(clrBk))
-
-Function ListView_SetBkColor( hwnd : hwnd; clrBk : COLORREF):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_SETBKCOLOR, 0, clrBk))
-end;
-
-
-// Macro 42
-// #define ListView_GetImageList(hwnd, iImageList) \
-// (HIMAGELIST)SNDMSG((hwnd), LVM_GETIMAGELIST, (WPARAM)(INT)(iImageList), DWord(0))
-
-Function ListView_GetImageList( hwnd : hwnd; iImageList : CINT):HIMAGELIST;
-
-Begin
- Result:=HIMAGELIST(SendMessage((hwnd), LVM_GETIMAGELIST, iImageList, LPARAM(0)))
-end;
-
-
-// Macro 43
-// #define ListView_SetImageList(hwnd, himl, iImageList) \
-// (HIMAGELIST)SNDMSG((hwnd), LVM_SETIMAGELIST, (WPARAM)(iImageList), (LPARAM)(HIMAGELIST)(himl))
-
-Function ListView_SetImageList( hwnd : hwnd; himl : HIMAGELIST; iImageList : WPARAM):HIMAGELIST;
-
-Begin
- Result:=HIMAGELIST(SendMessage((hwnd), LVM_SETIMAGELIST, iImageList, himl))
-end;
-
-
-// Macro 44
-// #define ListView_GetItemCount(hwnd) \
-// (int)SNDMSG((hwnd), LVM_GETITEMCOUNT, 0, DWord(0))
-
-Function ListView_GetItemCount( hwnd : hwnd):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), LVM_GETITEMCOUNT, 0, LPARAM(0)))
-end;
-
-
-// Macro 45
-// #define INDEXTOSTATEIMAGEMASK(i) ((i) << 12)
-
-// Macro 46
-// #define ListView_GetItem(hwnd, pitem) \
-// (BOOL)SNDMSG((hwnd), LVM_GETITEM, 0, (LPARAM)(LV_ITEM *)(pitem))
-
-Function ListView_GetItem( hwnd : hwnd;var pitem : LV_ITEM ):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_GETITEM, 0, LPARAM(@pitem)))
-end;
-
-
-// Macro 47
-// #define ListView_SetItem(hwnd, pitem) \
-// (BOOL)SNDMSG((hwnd), LVM_SETITEM, 0, (LPARAM)(const LV_ITEM *)(pitem))
-
-Function ListView_SetItem( hwnd : hwnd;const pitem : LV_ITEM ):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_SETITEM, 0, LPARAM(@pitem)))
-end;
-
-
-// Macro 48
-// #define ListView_InsertItem(hwnd, pitem) \
-// (int)SNDMSG((hwnd), LVM_INSERTITEM, 0, (LPARAM)(const LV_ITEM *)(pitem))
-
-Function ListView_InsertItem( hwnd : hwnd;Const pitem : LV_ITEM ):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), LVM_INSERTITEM, 0, LPARAM(@pitem)))
-end;
-
-
-// Macro 49
-// #define ListView_DeleteItem(hwnd, i) \
-// (BOOL)SNDMSG((hwnd), LVM_DELETEITEM, (WPARAM)(int)(i), DWord(0))
-
-Function ListView_DeleteItem( hwnd : hwnd; i : cint):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_DELETEITEM, (i), LPARAM(0)))
-end;
-
-
-// Macro 50
-// #define ListView_DeleteAllItems(hwnd) \
-// (BOOL)SNDMSG((hwnd), LVM_DELETEALLITEMS, 0, DWord(0))
-
-Function ListView_DeleteAllItems( hwnd : hwnd):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_DELETEALLITEMS, 0, LPARAM(0)))
-end;
-
-
-// Macro 51
-// #define ListView_GetCallbackMask(hwnd) \
-// (BOOL)SNDMSG((hwnd), LVM_GETCALLBACKMASK, 0, 0)
-
-Function ListView_GetCallbackMask( hwnd : hwnd):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_GETCALLBACKMASK, 0, 0))
-end;
-
-
-// Macro 52
-// #define ListView_SetCallbackMask(hwnd, mask) \
-// (BOOL)SNDMSG((hwnd), LVM_SETCALLBACKMASK, (WPARAM)(UINT)(mask), 0)
-
-Function ListView_SetCallbackMask( hwnd : hwnd; mask : UINT):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_SETCALLBACKMASK, mask, 0))
-end;
-
-
-// Macro 53
-// #define ListView_GetNextItem(hwnd, i, flags) \
-// (int)SNDMSG((hwnd), LVM_GETNEXTITEM, (WPARAM)(int)(i), MAKELPARAM((flags), 0))
-
-Function ListView_GetNextItem( hwnd : hwnd; i : cint; flags : cint):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), LVM_GETNEXTITEM, (i), MAKELPARAM((flags), 0)))
-end;
-
-
-// Macro 54
-// #define ListView_FindItem(hwnd, iStart, plvfi) \
-// (int)SNDMSG((hwnd), LVM_FINDITEM, (WPARAM)(int)(iStart), (LPARAM)(const LV_FINDINFO *)(plvfi))
-
-Function ListView_FindItem( hwnd : hwnd; iStart : cint;const plvfi : LV_FINDINFO ):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), LVM_FINDITEM, iStart, LPARAM(@plvfi)))
-end;
-
-
-// Macro 55
-// #define ListView_GetItemRect(hwnd, i, prc, code) \
-// (BOOL)SNDMSG((hwnd), LVM_GETITEMRECT, (WPARAM)(int)(i), \
-// ((prc) ? (((RECT *)(prc))->left = (code),(LPARAM)(RECT *)(prc)) : (LPARAM)(RECT *)NULL))
-
-Function ListView_GetItemRect( hwnd : hwnd; i : cint;var prc : TRect;code : cint):BOOL;
-begin
- if assigned(@prc) then
- begin
- prc.left:=Code;
- Result:=BOOL(SendMessage(hWnd,LVM_GETITEMRECT,i,LPARAM(@prc)));
- end
- else
- Result:=BOOL(SendMessage(hWnd,LVM_GETITEMRECT,i,0));
-end;
-
-
-// Macro 56
-// #define ListView_SetItemPosition(hwndLV, i, x, y) \
-// (BOOL)SNDMSG((hwndLV), LVM_SETITEMPOSITION, (WPARAM)(int)(i), MAKELPARAM((x), (y)))
-
-Function ListView_SetItemPosition( hwndLV : hwnd; i : cint; x : cint ; y : cint ):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwndLV), LVM_SETITEMPOSITION, (i), MAKELPARAM((x), (y))))
-end;
-
-
-// Macro 57
-// #define ListView_GetItemPosition(hwndLV, i, ppt) \
-// (BOOL)SNDMSG((hwndLV), LVM_GETITEMPOSITION, (WPARAM)(int)(i), (LPARAM)(POINT *)(ppt))
-
-Function ListView_GetItemPosition( hwndLV : hwnd; i : cint;var ppt : POINT ):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwndLV), LVM_GETITEMPOSITION, (i), LPAram(@ppt)))
-end;
-
-// Macro 58
-// #define ListView_GetStringWidth(hwndLV, psz) \
-// (int)SNDMSG((hwndLV), LVM_GETSTRINGWIDTH, 0, (LPARAM)(LPCTSTR)(psz))
-
-Function ListView_GetStringWidth( hwndLV : hwnd; psz : LPCTSTR):cint;
-
-Begin
- Result:=cint(SendMessage((hwndLV), LVM_GETSTRINGWIDTH, 0, LPARAM(psz)))
-end;
-
-
-// Macro 59
-// #define ListView_HitTest(hwndLV, pinfo) \
-// (int)SNDMSG((hwndLV), LVM_HITTEST, 0, (LPARAM)(LV_HITTESTINFO *)(pinfo))
-
-Function ListView_HitTest( hwndLV : hwnd;var pinfo : LV_HITTESTINFO ):cint;
-
-Begin
- Result:=cint(SendMessage((hwndLV), LVM_HITTEST, 0, LParam(@pinfo)))
-end;
-
-
-// Macro 60
-// #define ListView_EnsureVisible(hwndLV, i, fPartialOK) \
-// (BOOL)SNDMSG((hwndLV), LVM_ENSUREVISIBLE, (WPARAM)(int)(i), MAKELPARAM((fPartialOK), 0))
-
-Function ListView_EnsureVisible( hwndLV : hwnd; i : cint; fPartialOK : cint ):BOOL;inline;
-
-Begin
- Result:=BOOL(SendMessage((hwndLV), LVM_ENSUREVISIBLE, (i), MAKELPARAM((fPartialOK), 0)))
-end;
-
-
-Function ListView_EnsureVisible( hwndLV : hwnd; i : cint; fPartialOK : BOOL ):BOOL;inline;
-
-Begin
- Result:=BOOL(SendMessage((hwndLV), LVM_ENSUREVISIBLE, (i), LPARAM(fPartialOK)))
-end;
-
-
-// Macro 61
-// #define ListView_Scroll(hwndLV, dx, dy) \
-// (BOOL)SNDMSG((hwndLV), LVM_SCROLL, (WPARAM)(int)(dx), (LPARAM)(int)(dy))
-
-Function ListView_Scroll( hwndLV : hwnd; dx : cint; dy : cint):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwndLV), LVM_SCROLL, dx, dy))
-end;
-
-
-// Macro 62
-// #define ListView_RedrawItems(hwndLV, iFirst, iLast) \
-// (BOOL)SNDMSG((hwndLV), LVM_REDRAWITEMS, (WPARAM)(int)(iFirst), (LPARAM)(int)(iLast))
-
-Function ListView_RedrawItems( hwndLV : hwnd; iFirst : cint; iLast : cint):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwndLV), LVM_REDRAWITEMS, iFirst, iLast))
-end;
-
-
-// Macro 63
-// #define ListView_Arrange(hwndLV, code) \
-// (BOOL)SNDMSG((hwndLV), LVM_ARRANGE, (WPARAM)(UINT)(code), DWord(0))
-
-Function ListView_Arrange( hwndLV : hwnd; code : UINT):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwndLV), LVM_ARRANGE, code, LPARAM(0)))
-end;
-
-
-// Macro 64
-// #define ListView_EditLabel(hwndLV, i) \
-// (HWND)SNDMSG((hwndLV), LVM_EDITLABEL, (WPARAM)(int)(i), DWord(0))
-
-Function ListView_EditLabel( hwndLV : hwnd; i : cint):HWND;
-
-Begin
- Result:=HWND(SendMessage((hwndLV), LVM_EDITLABEL, (i), LPARAM(0)))
-end;
-
-
-// Macro 65
-// #define ListView_GetEditControl(hwndLV) \
-// (HWND)SNDMSG((hwndLV), LVM_GETEDITCONTROL, 0, DWord(0))
-
-Function ListView_GetEditControl( hwndLV : hwnd):HWND;
-
-Begin
- Result:=HWND(SendMessage((hwndLV), LVM_GETEDITCONTROL, 0, LPARAM(0)))
-end;
-
-
-// Macro 66
-// #define ListView_GetColumn(hwnd, iCol, pcol) \
-// (BOOL)SNDMSG((hwnd), LVM_GETCOLUMN, (WPARAM)(int)(iCol), (LPARAM)(LV_COLUMN *)(pcol))
-
-Function ListView_GetColumn( hwnd : hwnd; iCol : cint;var pcol : LV_COLUMN ):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_GETCOLUMN, iCol, LPARAM(@pcol)))
-end;
-
-
-// Macro 67
-// #define ListView_SetColumn(hwnd, iCol, pcol) \
-// (BOOL)SNDMSG((hwnd), LVM_SETCOLUMN, (WPARAM)(int)(iCol), (LPARAM)(const LV_COLUMN *)(pcol))
-
-Function ListView_SetColumn( hwnd : hwnd; iCol : cint; Const pcol : LV_COLUMN ):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_SETCOLUMN, iCol, LPARAM(@pcol)))
-end;
-
-
-// Macro 68
-// #define ListView_InsertColumn(hwnd, iCol, pcol) \
-// (int)SNDMSG((hwnd), LVM_INSERTCOLUMN, (WPARAM)(int)(iCol), (LPARAM)(const LV_COLUMN *)(pcol))
-
-Function ListView_InsertColumn( hwnd : hwnd; iCol : cint;const pcol : LV_COLUMN ):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), LVM_INSERTCOLUMN, iCol, LPARAM(@pcol)))
-end;
-
-
-// Macro 69
-// #define ListView_DeleteColumn(hwnd, iCol) \
-// (BOOL)SNDMSG((hwnd), LVM_DELETECOLUMN, (WPARAM)(int)(iCol), 0)
-
-Function ListView_DeleteColumn( hwnd : hwnd; iCol : cint):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_DELETECOLUMN, iCol, 0))
-end;
-
-
-// Macro 70
-// #define ListView_GetColumnWidth(hwnd, iCol) \
-// (int)SNDMSG((hwnd), LVM_GETCOLUMNWIDTH, (WPARAM)(int)(iCol), 0)
-
-Function ListView_GetColumnWidth( hwnd : hwnd; iCol : cint):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), LVM_GETCOLUMNWIDTH, iCol, 0))
-end;
-
-
-// Macro 71
-// #define ListView_SetColumnWidth(hwnd, iCol, cx) \
-// (BOOL)SNDMSG((hwnd), LVM_SETCOLUMNWIDTH, (WPARAM)(int)(iCol), MAKELPARAM((cx), 0))
-
-Function ListView_SetColumnWidth( hwnd : hwnd; iCol : cint; cx :cint ):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_SETCOLUMNWIDTH, iCol, MAKELPARAM((cx), 0)))
-end;
-
-
-// Macro 72
-// #define ListView_GetHeader(hwnd)\
-// (HWND)SNDMSG((hwnd), LVM_GETHEADER, 0, DWord(0))
-
-Function ListView_GetHeader( hwnd : hwnd):HWND;
-
-Begin
- Result:=Windows.HWND(SendMessage((hwnd), LVM_GETHEADER, 0, LPARAM(0)));
-end;
-
-
-// Macro 73
-// #define ListView_CreateDragImage(hwnd, i, lpptUpLeft) \
-// (HIMAGELIST)SNDMSG((hwnd), LVM_CREATEDRAGIMAGE, (WPARAM)(int)(i), (LPARAM)(LPPOINT)(lpptUpLeft))
-
-Function ListView_CreateDragImage( hwnd : hwnd; i : cint; lpptUpLeft : LPPOINT):HIMAGELIST;inline;
-
-Begin
- Result:=HIMAGELIST(SendMessage((hwnd), LVM_CREATEDRAGIMAGE, WPARAM(i), LPARAM(lpptUpLeft)))
-end;
-
-Function ListView_CreateDragImage( hwnd : hwnd; i : cint; const lpptUpLeft : POINT):HIMAGELIST;inline;
-
-Begin
- Result:=HIMAGELIST(SendMessage((hwnd), LVM_CREATEDRAGIMAGE, WPARAM(i), LPARAM(@lpptUpLeft)))
-end;
-
-
-// Macro 74
-// #define ListView_GetViewRect(hwnd, prc) \
-// (BOOL)SNDMSG((hwnd), LVM_GETVIEWRECT, 0, (LPARAM)(RECT *)(prc))
-
-Function ListView_GetViewRect( hwnd : hwnd;var prc : RECT ):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_GETVIEWRECT, 0, LPARAM(@prc)))
-end;
-
-// Macro 75
-// #define ListView_GetTextColor(hwnd) \
-// (COLORREF)SNDMSG((hwnd), LVM_GETTEXTCOLOR, 0, DWord(0))
-
-Function ListView_GetTextColor( hwnd : hwnd):COLORREF;
-
-Begin
- Result:=COLORREF(SendMessage((hwnd), LVM_GETTEXTCOLOR, 0, LPARAM(0)))
-end;
-
-
-// Macro 76
-// #define ListView_SetTextColor(hwnd, clrText) \
-// (BOOL)SNDMSG((hwnd), LVM_SETTEXTCOLOR, 0, (LPARAM)(COLORREF)(clrText))
-
-Function ListView_SetTextColor( hwnd : hwnd; clrText : COLORREF):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_SETTEXTCOLOR, 0, clrText))
-end;
-
-
-// Macro 77
-// #define ListView_GetTextBkColor(hwnd) \
-// (COLORREF)SNDMSG((hwnd), LVM_GETTEXTBKCOLOR, 0, DWord(0))
-
-Function ListView_GetTextBkColor( hwnd : hwnd):COLORREF;
-
-Begin
- Result:=COLORREF(SendMessage((hwnd), LVM_GETTEXTBKCOLOR, 0, LPARAM(0)))
-end;
-
-
-// Macro 78
-// #define ListView_SetTextBkColor(hwnd, clrTextBk) \
-// (BOOL)SNDMSG((hwnd), LVM_SETTEXTBKCOLOR, 0, (LPARAM)(COLORREF)(clrTextBk))
-
-Function ListView_SetTextBkColor( hwnd : hwnd; clrTextBk : COLORREF):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_SETTEXTBKCOLOR, 0, clrTextBk))
-end;
-
-
-// Macro 79
-// #define ListView_GetTopIndex(hwndLV) \
-// (int)SNDMSG((hwndLV), LVM_GETTOPINDEX, 0, 0)
-
-Function ListView_GetTopIndex( hwndLV : hwnd):cint;
-
-Begin
- Result:=cint(SendMessage((hwndLV), LVM_GETTOPINDEX, 0, 0))
-end;
-
-
-// Macro 80
-// #define ListView_GetCountPerPage(hwndLV) \
-// (int)SNDMSG((hwndLV), LVM_GETCOUNTPERPAGE, 0, 0)
-
-Function ListView_GetCountPerPage( hwndLV : hwnd):cint;
-
-Begin
- Result:=cint(SendMessage((hwndLV), LVM_GETCOUNTPERPAGE, 0, 0))
-end;
-
-
-// Macro 81
-//
-// #define ListView_GetOrigin(hwndLV, ppt) \
-// (BOOL)SNDMSG((hwndLV), LVM_GETORIGIN, (WPARAM)0, (LPARAM)(POINT *)(ppt))
-
-Function ListView_GetOrigin( hwndLV : hwnd;var ppt : POINT ):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwndLV), LVM_GETORIGIN, WPARAM(0), LPARAM(@ppt)))
-end;
-
-
-// Macro 82
-// #define ListView_Update(hwndLV, i) \
-// (BOOL)SNDMSG((hwndLV), LVM_UPDATE, (WPARAM)(i), DWord(0))
-
-Function ListView_Update( hwndLV : hwnd; i : WPARAM):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwndLV), LVM_UPDATE, (i), LPARAM(0)))
-end;
-
-
-// Macro 83
-// #define ListView_SetItemState(hwndLV, i, data, mask) \
-// { LV_ITEM _ms_lvi;\
-// _ms_lvi.stateMask = mask;\
-// _ms_lvi.state = data;\
-// SNDMSG((hwndLV), LVM_SETITEMSTATE, (WPARAM)(i), (LPARAM)(LV_ITEM *)&_ms_lvi);\
-// }
-
-Procedure ListView_SetItemState(hwndLV :hwnd; i :cint ;data,mask:UINT);
-
-Var _ms_lvi : LV_ITEM;
-
-Begin
- _ms_lvi.stateMask:=mask;
- _ms_lvi.state:=data;
- SendMessage(hwndLV, LVM_SETITEMSTATE, i,LPARAM(@_ms_lvi));
-end;
-
-
-// Macro 84
-// #define ListView_SetCheckState(hwndLV, i, fCheck) \
-// ListView_SetItemState(hwndLV, i, INDEXTOSTATEIMAGEMASK((fCheck)?2:1), LVIS_STATEIMAGEMASK)
-
-Procedure ListView_SetCheckState( hwndLV : hwnd; i : cint ; fCheck : BOOL );
-
-var j:longint;
-Begin
- IF not fCheck Then // (or inc(longint(fCheck)) if you like it dirty)
- j:=1
- Else
- j:=2;
-ListView_SetItemState(hwndLV, i, INDEXTOSTATEIMAGEMASK(j), LVIS_STATEIMAGEMASK);
-end;
-
-
-// Macro 85
-// #define ListView_GetItemState(hwndLV, i, mask) \
-// (UINT)SNDMSG((hwndLV), LVM_GETITEMSTATE, (WPARAM)(i), (LPARAM)(mask))
-
-Function ListView_GetItemState( hwndLV : hwnd; i : WPARAM; mask : LPARAM):UINT;
-
-Begin
- Result:=UINT(SendMessage((hwndLV), LVM_GETITEMSTATE, (i), mask))
-end;
-
-
-// Macro 86
-// #define ListView_GetCheckState(hwndLV, i) \
-// ((((UINT)(SNDMSG((hwndLV), LVM_GETITEMSTATE, (WPARAM)(i), LVIS_STATEIMAGEMASK))) >> 12) -1)
-
-Function ListView_GetCheckState( hwndLV : hwnd; i : WPARAM):UINT;
-
-Begin
- Result:=(SendMessage((hwndLV), LVM_GETITEMSTATE, (i), LVIS_STATEIMAGEMASK) shl 12) -1;
-end;
-
-
-// Macro 87
-// #define ListView_GetItemText(hwndLV, i, iSubItem_, pszText_, cchTextMax_) \
-// { LV_ITEM _ms_lvi;\
-// _ms_lvi.iSubItem = iSubItem_;\
-// _ms_lvi.cchTextMax = cchTextMax_;\
-// _ms_lvi.pszText = pszText_;\
-// SNDMSG((hwndLV), LVM_GETITEMTEXT, (WPARAM)(i), (LPARAM)(LV_ITEM *)&_ms_lvi);\
-// }
-
-Procedure ListView_GetItemText(hwndLV:hwnd; i : WPARAM ;iSubItem : cint ;pszText : Pointer;cchTextMax :cint);
-
-Var _ms_lvi : LV_ITEM;
-
-Begin
- _ms_lvi.iSubItem := iSubItem;
- _ms_lvi.cchTextMax := cchTextMax;
- _ms_lvi.pszText := pszText; // unicode dependant!
- SendMessage(hwndLV, LVM_GETITEMTEXT, i, LPARAM(@_ms_LVI));
-end;
-
-
-// Macro 88
-// #define ListView_SetItemText(hwndLV, i, iSubItem_, pszText_) \
-// { LV_ITEM _ms_lvi;\
-// _ms_lvi.iSubItem = iSubItem_;\
-// _ms_lvi.pszText = pszText_;\
-// SNDMSG((hwndLV), LVM_SETITEMTEXT, (WPARAM)(i), (LPARAM)(LV_ITEM *)&_ms_lvi);\
-// }
-
-Procedure ListView_SetItemText(hwndLV:hwnd; i : WPARAM ;iSubItem : cint ;pszText : Pointer);
-
-Var _ms_lvi : LV_ITEM;
-
-Begin
- _ms_lvi.iSubItem := iSubItem;
- _ms_lvi.pszText := pszText; // unicode dependant!
- SendMessage(hwndLV, LVM_SETITEMTEXT, i, LPARAM(@_ms_lvi));
-End;
-
-// Macro 89
-// #define ListView_SetItemCount(hwndLV, cItems) \
-// SNDMSG((hwndLV), LVM_SETITEMCOUNT, (WPARAM)(cItems), 0)
-
-Procedure ListView_SetItemCount( hwndLV : hwnd; cItems : WPARAM);
-
-Begin
- SendMessage((hwndLV), LVM_SETITEMCOUNT, cItems, 0)
-end;
-
-
-// Macro 90
-// #define ListView_SetItemCountEx(hwndLV, cItems, dwFlags) \
-// SNDMSG((hwndLV), LVM_SETITEMCOUNT, (WPARAM)(cItems), (LPARAM)(dwFlags))
-
-Procedure ListView_SetItemCountEx( hwndLV : hwnd; cItems : WPARAM; dwFlags : LPARAM);
-
-Begin
- SendMessage((hwndLV), LVM_SETITEMCOUNT, cItems, dwFlags)
-end;
-
-
-// Macro 91
-// #define ListView_SortItems(hwndLV, _pfnCompare, _lPrm) \
-// (BOOL)SNDMSG((hwndLV), LVM_SORTITEMS, (WPARAM)(LPARAM)(_lPrm), \
-// (LPARAM)(PFNLVCOMPARE)(_pfnCompare))
-
-Function ListView_SortItems( hwndLV : hwnd;pfnCompare : PFNLVCOMPARE; lPrm : LPARAM):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwndLV), LVM_SORTITEMS, lPrm, LPARAM(@pfncompare)));
-end;
-
-
-// Macro 92
-// #define ListView_SetItemPosition32(hwndLV, i, x0, y0) \
-// { POINT ptNewPos; \
-// ptNewPos.x = x0; ptNewPos.y = y0; \
-// SNDMSG((hwndLV), LVM_SETITEMPOSITION32, (WPARAM)(int)(i), (LPARAM)&ptNewPos); \
-// }
-
-Procedure ListView_SetItemPosition32(hwndLV:hwnd; i:cint;x0,y0:long);
-
-Var ptNewPos:POINT;
-
-Begin
- ptNewPos.X:=x0; ptNewPos.Y:=y0;
- SendMessage(hwndlv, LVM_SETITEMPOSITION32, I,LPARAM(@ptNewPos));
-end;
-
-
-// Macro 93
-// #define ListView_GetSelectedCount(hwndLV) \
-// (UINT)SNDMSG((hwndLV), LVM_GETSELECTEDCOUNT, 0, DWord(0))
-
-Function ListView_GetSelectedCount( hwndLV : hwnd):UINT;
-
-Begin
- Result:=SendMessage(hwndLV, LVM_GETSELECTEDCOUNT, 0, LPARAM(0));
-end;
-
-// Macro 94
-// #define ListView_GetItemSpacing(hwndLV, fSmall) \
-// (DWORD)SNDMSG((hwndLV), LVM_GETITEMSPACING, fSmall, DWord(0))
-
-Function ListView_GetItemSpacing( hwndLV : hwnd; fSmall : cint ):DWORD;
-
-Begin
- Result:=LPARAM(SendMessage((hwndLV), LVM_GETITEMSPACING, fSmall, LPARAM(0)));
-end;
-
-// Macro 95
-// #define ListView_GetISearchString(hwndLV, lpsz) \
-// (BOOL)SNDMSG((hwndLV), LVM_GETISEARCHSTRING, 0, (LPARAM)(LPTSTR)(lpsz))
-
-Function ListView_GetISearchString( hwndLV : hwnd; lpsz : LPTSTR):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwndLV), LVM_GETISEARCHSTRING, 0, LPARAM(lpsz)))
-end;
-
-// Macro 96
-// #define ListView_SetIconSpacing(hwndLV, cx, cy) \
-// (DWORD)SNDMSG((hwndLV), LVM_SETICONSPACING, 0, MAKELONG(cx,cy))
-
-Function ListView_SetIconSpacing( hwndLV : hwnd; cx,cy : cint ):DWORD;
-
-Begin
- Result:=DWORD(SendMessage((hwndLV), LVM_SETICONSPACING, 0, MAKELONG(cx,cy)))
-end;
-
-
-// Macro 97
-// #define ListView_SetExtendedListViewStyle(hwndLV, dw)\
-// (DWORD)SNDMSG((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dw)
-
-Function ListView_SetExtendedListViewStyle( hwndLV : hwnd; dw :cint ):DWORD;
-
-Begin
- Result:=DWORD(SendMessage((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dw))
-end;
-
-
-// Macro 98
-// #define ListView_SetExtendedListViewStyleEx(hwndLV, dwMask, dw)\
-// (DWORD)SNDMSG((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, dwMask, dw)
-
-Function ListView_SetExtendedListViewStyleEx( hwndLV : hwnd; dwMask, dw : cint ):DWORD;
-
-Begin
- Result:=DWORD(SendMessage((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, dwMask, dw))
-end;
-
-
-// Macro 99
-// #define ListView_GetExtendedListViewStyle(hwndLV)\
-// (DWORD)SNDMSG((hwndLV), LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0)
-
-Function ListView_GetExtendedListViewStyle( hwndLV : hwnd):DWORD;
-
-Begin
- Result:=DWORD(SendMessage((hwndLV), LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0))
-end;
-
-
-// Macro 100
-// #define ListView_GetSubItemRect(hwnd, iItem, iSubItem, code, prc) \
-// (BOOL)SNDMSG((hwnd), LVM_GETSUBITEMRECT, (WPARAM)(int)(iItem), \
-// ((prc) ? ((((LPRECT)(prc))->top = iSubItem), (((LPRECT)(prc))->left = code), (LPARAM)(prc)) : (LPARAM)(LPRECT)NULL))
-
-Function ListView_GetSubItemRect( hwnd : hwnd; iItem : cint;iSubItem, code :cint ;prc:LPRECT):BOOL;
-
-VAR LastParam : LPRECT;
-Begin
- if prc<>nil then
- begin
- prc^.top:=iSubItem;
- prc^.left:=code;
- lastparam:=prc;
- end
- else
- lastparam:=nil;
- Result:=bool(SendMessage((hwnd), LVM_GETSUBITEMRECT, iItem, LPARAM(lastparam)));
-End;
-
-// Macro 101
-// #define ListView_SubItemHitTest(hwnd, plvhti) \
-// (int)SNDMSG((hwnd), LVM_SUBITEMHITTEST, 0, (LPARAM)(LPLVHITTESTINFO)(plvhti))
-
-Function ListView_SubItemHitTest( hwnd : hwnd; plvhti : LPLVHITTESTINFO):cint;
-Begin
- Result:=cint(SendMessage((hwnd), LVM_SUBITEMHITTEST, 0, LParam(plvhti)))
-end;
-
-
-// Macro 102
-// #define ListView_SetColumnOrderArray(hwnd, iCount, pi) \
-// (BOOL)SNDMSG((hwnd), LVM_SETCOLUMNORDERARRAY, (WPARAM)(iCount), (LPARAM)(LPINT)(pi))
-
-Function ListView_SetColumnOrderArray( hwnd : hwnd; iCount : WPARAM; pi : LPINT):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_SETCOLUMNORDERARRAY, iCount, LPARAM(pi)));
-end;
-
-
-// Macro 103
-// #define ListView_GetColumnOrderArray(hwnd, iCount, pi) \
-// (BOOL)SNDMSG((hwnd), LVM_GETCOLUMNORDERARRAY, (WPARAM)(iCount), (LPARAM)(LPINT)(pi))
-
-Function ListView_GetColumnOrderArray( hwnd : hwnd; iCount : WPARAM; pi : LPINT):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_GETCOLUMNORDERARRAY, iCount, LPARAM(pi)))
-end;
-
-
-// Macro 104
-// #define ListView_SetHotItem(hwnd, i) \
-// (int)SNDMSG((hwnd), LVM_SETHOTITEM, (WPARAM)(i), 0)
-
-Function ListView_SetHotItem( hwnd : hwnd; i : WPARAM):cint;
-Begin
- Result:=cint(SendMessage((hwnd), LVM_SETHOTITEM, (i), 0))
-end;
-
-// Macro 105
-// #define ListView_GetHotItem(hwnd) \
-// (int)SNDMSG((hwnd), LVM_GETHOTITEM, 0, 0)
-
-Function ListView_GetHotItem( hwnd : hwnd):cint;
-Begin
- Result:=cint(SendMessage((hwnd), LVM_GETHOTITEM, 0, 0))
-end;
-
-// Macro 106
-// #define ListView_SetHotCursor(hwnd, hcur) \
-// (HCURSOR)SNDMSG((hwnd), LVM_SETHOTCURSOR, 0, (LPARAM)(hcur))
-
-Function ListView_SetHotCursor( hwnd : hwnd; hcur : LPARAM):HCURSOR;
-Begin
- Result:=HCURSOR(SendMessage((hwnd), LVM_SETHOTCURSOR, 0, hcur))
-end;
-
-// Macro 107
-// #define ListView_GetHotCursor(hwnd) \
-// (HCURSOR)SNDMSG((hwnd), LVM_GETHOTCURSOR, 0, 0)
-
-Function ListView_GetHotCursor( hwnd : hwnd):HCURSOR;
-Begin
- Result:=HCURSOR(SendMessage((hwnd), LVM_GETHOTCURSOR, 0, 0))
-end;
-
-
-// Macro 108
-// #define ListView_ApproximateViewRect(hwnd, iWidth, iHeight, iCount) \
-// (DWORD)SNDMSG((hwnd), LVM_APPROXIMATEVIEWRECT, iCount, MAKELPARAM(iWidth, iHeight))
-
-Function ListView_ApproximateViewRect( hwnd : hwnd; iWidth, iHeight, iCount : cint ):DWORD;
-Begin
- Result:=DWORD(SendMessage((hwnd), LVM_APPROXIMATEVIEWRECT, iCount, MAKELPARAM(iWidth, iHeight)));
-end;
-
-
-// Macro 109
-// #define ListView_SetWorkAreas(hwnd, nWorkAreas, prc) \
-// (BOOL)SNDMSG((hwnd), LVM_SETWORKAREAS, (WPARAM)(int)(nWorkAreas), (LPARAM)(RECT *)(prc))
-
-Function ListView_SetWorkAreas( hwnd : hwnd; nWorkAreas : cint;var prc : RECT ):BOOL;inline;
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_SETWORKAREAS, nWorkAreas, LPARAM(@prc)))
-end;
-
-
-Function ListView_SetWorkAreas( hwnd : hwnd; nWorkAreas : cint; prc : PRECT ):BOOL;inline;
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_SETWORKAREAS, nWorkAreas, LPARAM(prc)))
-end;
-
-// Macro 110
-// #define ListView_GetWorkAreas(hwnd, nWorkAreas, prc) \
-// (BOOL)SNDMSG((hwnd), LVM_GETWORKAREAS, (WPARAM)(int)(nWorkAreas), (LPARAM)(RECT *)(prc))
-
-Function ListView_GetWorkAreas( hwnd : hwnd; nWorkAreas : cint;var prc : RECT ):BOOL;
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_GETWORKAREAS, nWorkAreas, LPARAM(@prc)))
-end;
-
-
-// Macro 111
-// #define ListView_GetNumberOfWorkAreas(hwnd, pnWorkAreas) \
-// (BOOL)SNDMSG((hwnd), LVM_GETNUMBEROFWORKAREAS, 0, (LPARAM)(UINT *)(pnWorkAreas))
-
-Function ListView_GetNumberOfWorkAreas( hwnd : hwnd;var pnWorkAreas : UINT ):BOOL;
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_GETNUMBEROFWORKAREAS, 0, LPARAM(@pnWorkAreas)))
-end;
-
-
-// Macro 112
-// #define ListView_GetSelectionMark(hwnd) \
-// (int)SNDMSG((hwnd), LVM_GETSELECTIONMARK, 0, 0)
-
-Function ListView_GetSelectionMark( hwnd : hwnd):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), LVM_GETSELECTIONMARK, 0, 0))
-end;
-
-
-// Macro 113
-// #define ListView_SetSelectionMark(hwnd, i) \
-// (int)SNDMSG((hwnd), LVM_SETSELECTIONMARK, 0, (LPARAM)(i))
-
-Function ListView_SetSelectionMark( hwnd : hwnd; i : LPARAM):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), LVM_SETSELECTIONMARK, 0, (i)))
-end;
-
-
-// Macro 114
-// #define ListView_SetHoverTime(hwndLV, dwHoverTimeMs)\
-// (DWORD)SNDMSG((hwndLV), LVM_SETHOVERTIME, 0, (LPARAM)(dwHoverTimeMs))
-
-Function ListView_SetHoverTime( hwndLV : hwnd; dwHoverTimeMs : LPARAM):DWORD;
-
-Begin
- Result:=DWORD(SendMessage((hwndLV), LVM_SETHOVERTIME, 0, dwHoverTimeMs))
-end;
-
-
-// Macro 115
-// #define ListView_GetHoverTime(hwndLV)\
-// (DWORD)SNDMSG((hwndLV), LVM_GETHOVERTIME, 0, 0)
-
-Function ListView_GetHoverTime( hwndLV : hwnd):DWORD;
-
-Begin
- Result:=DWORD(SendMessage((hwndLV), LVM_GETHOVERTIME, 0, 0))
-end;
-
-
-// Macro 116
-// #define ListView_SetToolTips(hwndLV, hwndNewHwnd)\
-// (HWND)SNDMSG((hwndLV), LVM_SETTOOLTIPS, (WPARAM)(hwndNewHwnd), 0)
-
-Function ListView_SetToolTips( hwndLV : hwnd; hwndNewHwnd : WPARAM):HWND;
-
-Begin
- Result:=HWND(SendMessage((hwndLV), LVM_SETTOOLTIPS, hwndNewHwnd, 0))
-end;
-
-
-// Macro 117
-// #define ListView_GetToolTips(hwndLV)\
-// (HWND)SNDMSG((hwndLV), LVM_GETTOOLTIPS, 0, 0)
-
-Function ListView_GetToolTips( hwndLV : hwnd):HWND;
-
-Begin
- Result:=HWND(SendMessage((hwndLV), LVM_GETTOOLTIPS, 0, 0))
-end;
-
-
-// Macro 118
-// #define ListView_SortItemsEx(hwndLV, _pfnCompare, _lPrm) \
-// (BOOL)SNDMSG((hwndLV), LVM_SORTITEMSEX, (WPARAM)(LPARAM)(_lPrm), (LPARAM)(PFNLVCOMPARE)(_pfnCompare))
-
-Function ListView_SortItemsEx( hwndLV : hwnd; _pfnCompare : PFNLVCOMPARE; _lPrm : LPARAM):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwndLV), LVM_SORTITEMSEX, _lPrm, LPAram(@_pfnCompare)))
-end;
-
-{$ifdef win32xp}
-// Macro 119
-// #define ListView_SetSelectedColumn(hwnd, iCol) \
-// SNDMSG((hwnd), LVM_SETSELECTEDCOLUMN, (WPARAM)iCol, 0)
-
-Procedure ListView_SetSelectedColumn( hwnd : hwnd; iCol : WPARAM);
-
-Begin
- SendMessage((hwnd), LVM_SETSELECTEDCOLUMN, iCol, 0)
-end;
-
-// Macro 120
-// #define ListView_SetTileWidth(hwnd, cpWidth) \
-// SNDMSG((hwnd), LVM_SETTILEWIDTH, (WPARAM)cpWidth, 0)
-
-Procedure ListView_SetTileWidth( hwnd : hwnd; cpWidth : WPARAM);
-
-Begin
- SendMessage((hwnd), LVM_SETTILEWIDTH, cpWidth, 0)
-end;
-
-
-// Macro 121
-// #define ListView_SetView(hwnd, iView) \
-// (DWORD)SNDMSG((hwnd), LVM_SETVIEW, (WPARAM)(DWORD)iView, 0)
-
-Function ListView_SetView( hwnd : hwnd; iView : DWORD):DWORD;
-
-Begin
- Result:=DWORD(SendMessage((hwnd), LVM_SETVIEW, iView, 0))
-end;
-
-
-// Macro 122
-// #define ListView_GetView(hwnd) \
-// (DWORD)SNDMSG((hwnd), LVM_GETVIEW, 0, 0)
-
-Function ListView_GetView( hwnd : hwnd):DWORD;
-Begin
- Result:=DWORD(SendMessage((hwnd), LVM_GETVIEW, 0, 0))
-end;
-
-
-// Macro 123
-// #define ListView_InsertGroup(hwnd, index, pgrp) \
-// SNDMSG((hwnd), LVM_INSERTGROUP, (WPARAM)index, (LPARAM)pgrp)
-
-Procedure ListView_InsertGroup( hwnd : hwnd; index : WPARAM; pgrp : LPARAM);
-Begin
- SendMessage((hwnd), LVM_INSERTGROUP, index, pgrp)
-end;
-
-
-// Macro 124
-// #define ListView_SetGroupInfo(hwnd, iGroupId, pgrp) \
-// SNDMSG((hwnd), LVM_SETGROUPINFO, (WPARAM)iGroupId, (LPARAM)pgrp)
-
-Procedure ListView_SetGroupInfo( hwnd : hwnd; iGroupId : WPARAM; pgrp : LPARAM);
-Begin
- SendMessage((hwnd), LVM_SETGROUPINFO, iGroupId, pgrp)
-end;
-
-
-// Macro 125
-// #define ListView_GetGroupInfo(hwnd, iGroupId, pgrp) \
-// SNDMSG((hwnd), LVM_GETGROUPINFO, (WPARAM)iGroupId, (LPARAM)pgrp)
-
-Procedure ListView_GetGroupInfo( hwnd : hwnd; iGroupId : WPARAM; pgrp : LPARAM);
-Begin
- SendMessage((hwnd), LVM_GETGROUPINFO, iGroupId, pgrp)
-end;
-
-
-// Macro 126
-// #define ListView_RemoveGroup(hwnd, iGroupId) \
-// SNDMSG((hwnd), LVM_REMOVEGROUP, (WPARAM)iGroupId, 0)
-
-Procedure ListView_RemoveGroup( hwnd : hwnd; iGroupId : WPARAM);
-Begin
- SendMessage((hwnd), LVM_REMOVEGROUP, iGroupId, 0)
-end;
-
-
-// Macro 127
-// #define ListView_MoveGroup(hwnd, iGroupId, toIndex) \
-// SNDMSG((hwnd), LVM_MOVEGROUP, (WPARAM)iGroupId, (LPARAM)toIndex)
-
-Procedure ListView_MoveGroup( hwnd : hwnd; iGroupId : WPARAM; toIndex : LPARAM);
-Begin
- SendMessage((hwnd), LVM_MOVEGROUP, iGroupId, toIndex)
-end;
-
-
-// Macro 128
-// #define ListView_MoveItemToGroup(hwnd, idItemFrom, idGroupTo) \
-// SNDMSG((hwnd), LVM_MOVEITEMTOGROUP, (WPARAM)idItemFrom, (LPARAM)idGroupTo)
-
-Procedure ListView_MoveItemToGroup( hwnd : hwnd; idItemFrom : WPARAM; idGroupTo : LPARAM);
-
-Begin
- SendMessage((hwnd), LVM_MOVEITEMTOGROUP, idItemFrom, idGroupTo)
-end;
-
-
-// Macro 129
-// #define ListView_SetGroupMetrics(hwnd, pGroupMetrics) \
-// SNDMSG((hwnd), LVM_SETGROUPMETRICS, 0, (LPARAM)pGroupMetrics)
-
-Procedure ListView_SetGroupMetrics( hwnd : hwnd; pGroupMetrics : LPARAM);
-
-Begin
- SendMessage((hwnd), LVM_SETGROUPMETRICS, 0, pGroupMetrics)
-end;
-
-
-// Macro 130
-// #define ListView_GetGroupMetrics(hwnd, pGroupMetrics) \
-// SNDMSG((hwnd), LVM_GETGROUPMETRICS, 0, (LPARAM)pGroupMetrics)
-
-Procedure ListView_GetGroupMetrics( hwnd : hwnd; pGroupMetrics : LPARAM);
-
-Begin
-SendMessage((hwnd), LVM_GETGROUPMETRICS, 0, pGroupMetrics)
-end;
-
-
-// Macro 131
-// #define ListView_EnableGroupView(hwnd, fEnable) \
-// SNDMSG((hwnd), LVM_ENABLEGROUPVIEW, (WPARAM)fEnable, 0)
-
-Procedure ListView_EnableGroupView( hwnd : hwnd; fEnable : WPARAM);
-
-Begin
- SendMessage((hwnd), LVM_ENABLEGROUPVIEW, fEnable, 0)
-end;
-
-
-// Macro 132
-// #define ListView_SortGroups(hwnd, _pfnGroupCompate, _plv) \
-// SNDMSG((hwnd), LVM_SORTGROUPS, (WPARAM)_pfnGroupCompate, (LPARAM)_plv)
-
-Procedure ListView_SortGroups( hwnd : hwnd; _pfnGroupCompate : WPARAM; _plv : LPARAM);
-
-Begin
- SendMessage((hwnd), LVM_SORTGROUPS, _pfnGroupCompate, _plv)
-end;
-
-// Macro 133
-// #define ListView_InsertGroupSorted(hwnd, structInsert) \
-// SNDMSG((hwnd), LVM_INSERTGROUPSORTED, (WPARAM)structInsert, 0)
-
-Procedure ListView_InsertGroupSorted( hwnd : hwnd; structInsert : WPARAM);
-
-Begin
- SendMessage((hwnd), LVM_INSERTGROUPSORTED, structInsert, 0)
-end;
-
-
-// Macro 134
-// #define ListView_RemoveAllGroups(hwnd) \
-// SNDMSG((hwnd), LVM_REMOVEALLGROUPS, 0, 0)
-
-Procedure ListView_RemoveAllGroups( hwnd : hwnd);
-
-Begin
-SendMessage((hwnd), LVM_REMOVEALLGROUPS, 0, 0)
-end;
-
-
-// Macro 135
-// #define ListView_HasGroup(hwnd, dwGroupId) \
-// SNDMSG((hwnd), LVM_HASGROUP, dwGroupId, 0)
-
-Procedure ListView_HasGroup( hwnd : hwnd; dwGroupId :DWORD );
-
-Begin
- SendMessage((hwnd), LVM_HASGROUP, dwGroupId, 0)
-end;
-
-
-// Macro 136
-// #define ListView_SetTileViewInfo(hwnd, ptvi) \
-// SNDMSG((hwnd), LVM_SETTILEVIEWINFO, 0, (LPARAM)ptvi)
-
-Procedure ListView_SetTileViewInfo( hwnd : hwnd; ptvi : LPARAM);
-
-Begin
- SendMessage((hwnd), LVM_SETTILEVIEWINFO, 0, ptvi)
-end;
-
-
-// Macro 137
-// #define ListView_GetTileViewInfo(hwnd, ptvi) \
-// SNDMSG((hwnd), LVM_GETTILEVIEWINFO, 0, (LPARAM)ptvi)
-
-Procedure ListView_GetTileViewInfo( hwnd : hwnd; ptvi : LPARAM);
-
-Begin
- SendMessage((hwnd), LVM_GETTILEVIEWINFO, 0, ptvi)
-end;
-
-
-// Macro 138
-// #define ListView_SetTileInfo(hwnd, pti) \
-// SNDMSG((hwnd), LVM_SETTILEINFO, 0, (LPARAM)pti)
-
-Procedure ListView_SetTileInfo( hwnd : hwnd; pti : LPARAM);
-
-Begin
- SendMessage((hwnd), LVM_SETTILEINFO, 0, pti)
-end;
-
-
-// Macro 139
-// #define ListView_GetTileInfo(hwnd, pti) \
-// SNDMSG((hwnd), LVM_GETTILEINFO, 0, (LPARAM)pti)
-
-Procedure ListView_GetTileInfo( hwnd : hwnd; pti : LPARAM);
-
-Begin
- SendMessage((hwnd), LVM_GETTILEINFO, 0, pti)
-end;
-
-
-// Macro 140
-// #define ListView_SetInsertMark(hwnd, lvim) \
-// (BOOL)SNDMSG((hwnd), LVM_SETINSERTMARK, (WPARAM) 0, (LPARAM) (lvim))
-
-Function ListView_SetInsertMark( hwnd : hwnd; lvim : lparam ):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_SETINSERTMARK, 0, lvim));
-end;
-
-
-// Macro 141
-// #define ListView_GetInsertMark(hwnd, lvim) \
-// (BOOL)SNDMSG((hwnd), LVM_GETINSERTMARK, (WPARAM) 0, (LPARAM) (lvim))
-
-Function ListView_GetInsertMark( hwnd : hwnd; lvim : lparam ):BOOL;
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_GETINSERTMARK, WPARAM (0), LPARAM (lvim)));
-end;
-
-
-// Macro 142
-// #define ListView_InsertMarkHitTest(hwnd, point, lvim) \
-// (int)SNDMSG((hwnd), LVM_INSERTMARKHITTEST, (WPARAM)(LPPOINT)(point), (LPARAM)(LPLVINSERTMARK)(lvim))
-
-Function ListView_InsertMarkHitTest( hwnd : hwnd; point : LPPOINT; lvim : LPLVINSERTMARK):cint;
-Begin
- Result:=cint(SendMessage((hwnd), LVM_INSERTMARKHITTEST, wparam(point), lparam(lvim)));
-end;
-
-
-// Macro 143
-// #define ListView_GetInsertMarkRect(hwnd, rc) \
-// (int)SNDMSG((hwnd), LVM_GETINSERTMARKRECT, (WPARAM)0, (LPARAM)(LPRECT)(rc))
-
-Function ListView_GetInsertMarkRect( hwnd : hwnd; rc : LPRECT):cint;
-Begin
- Result:=cint(SendMessage((hwnd), LVM_GETINSERTMARKRECT, WPARAM(0), LPARAM(rc)))
-end;
-
-
-// Macro 144
-// #define ListView_SetInsertMarkColor(hwnd, color) \
-// (COLORREF)SNDMSG((hwnd), LVM_SETINSERTMARKCOLOR, (WPARAM)0, (LPARAM)(COLORREF)(color))
-
-Function ListView_SetInsertMarkColor( hwnd : hwnd; color : COLORREF):COLORREF;
-
-Begin
- Result:=COLORREF(SendMessage((hwnd), LVM_SETINSERTMARKCOLOR, WPARAM(0), color));
-end;
-
-// Macro 145
-// #define ListView_GetInsertMarkColor(hwnd) \
-// (COLORREF)SNDMSG((hwnd), LVM_GETINSERTMARKCOLOR, (WPARAM)0, (LPARAM)0)
-
-Function ListView_GetInsertMarkColor( hwnd : hwnd):COLORREF;
-
-Begin
- Result:=COLORREF(SendMessage((hwnd), LVM_GETINSERTMARKCOLOR, WPARAM(0), LPARAM(0)));
-end;
-
-// Macro 146
-// #define ListView_SetInfoTip(hwndLV, plvInfoTip)\
-// (BOOL)SNDMSG((hwndLV), LVM_SETINFOTIP, (WPARAM)0, (LPARAM)plvInfoTip)
-
-Function ListView_SetInfoTip( hwndLV : hwnd; plvInfoTip : LPARAM):BOOL;
-Begin
- Result:=BOOL(SendMessage((hwndLV), LVM_SETINFOTIP, WPARAM(0), plvInfoTip));
-end;
-
-// Macro 147
-// #define ListView_GetSelectedColumn(hwnd) \
-// (UINT)SNDMSG((hwnd), LVM_GETSELECTEDCOLUMN, 0, 0)
-
-Function ListView_GetSelectedColumn( hwnd : hwnd):UINT;
-Begin
- Result:=UINT(SendMessage((hwnd), LVM_GETSELECTEDCOLUMN, 0, 0));
-end;
-
-// Macro 148
-// #define ListView_IsGroupViewEnabled(hwnd) \
-// (BOOL)SNDMSG((hwnd), LVM_ISGROUPVIEWENABLED, 0, 0)
-
-Function ListView_IsGroupViewEnabled( hwnd : hwnd):BOOL;
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_ISGROUPVIEWENABLED, 0, 0));
-end;
-
-// Macro 149
-// #define ListView_GetOutlineColor(hwnd) \
-// (COLORREF)SNDMSG((hwnd), LVM_GETOUTLINECOLOR, 0, 0)
-
-Function ListView_GetOutlineColor( hwnd : hwnd):COLORREF;
-Begin
- Result:=COLORREF(SendMessage((hwnd), LVM_GETOUTLINECOLOR, 0, 0));
-end;
-
-
-// Macro 150
-// #define ListView_SetOutlineColor(hwnd, color) \
-// (COLORREF)SNDMSG((hwnd), LVM_SETOUTLINECOLOR, (WPARAM)0, (LPARAM)(COLORREF)(color))
-
-Function ListView_SetOutlineColor( hwnd : hwnd; color : COLORREF):COLORREF;
-Begin
- Result:=COLORREF(SendMessage((hwnd), LVM_SETOUTLINECOLOR, WPARAM(0), color));
-end;
-
-// Macro 151
-// #define ListView_CancelEditLabel(hwnd) \
-// (VOID)SNDMSG((hwnd), LVM_CANCELEDITLABEL, (WPARAM)0, (LPARAM)0)
-
-procedure ListView_CancelEditLabel( hwnd : hwnd);
-Begin
- SendMessage((hwnd), LVM_CANCELEDITLABEL, WPARAM(0), LPARAM(0));
-end;
-
-// Macro 152
-// #define ListView_MapIndexToID(hwnd, index) \
-// (UINT)SNDMSG((hwnd), LVM_MAPINDEXTOID, (WPARAM)index, (LPARAM)0)
-
-Function ListView_MapIndexToID( hwnd : hwnd; index : WPARAM):UINT;
-
-Begin
- Result:=UINT(SendMessage((hwnd), LVM_MAPINDEXTOID, index, LPARAM(0)));
-end;
-
-// Macro 153
-// #define ListView_MapIDToIndex(hwnd, id) \
-// (UINT)SNDMSG((hwnd), LVM_MAPIDTOINDEX, (WPARAM)id, (LPARAM)0)
-
-Function ListView_MapIDToIndex( hwnd : hwnd; id : WPARAM):UINT;
-Begin
- Result:=UINT(SendMessage((hwnd), LVM_MAPIDTOINDEX, id, LPARAM(0)));
-end;
-
-function ListView_IsItemVisible(hwnd:hwnd; aindex:cuint):cuint;
-begin
- Result:=UINT(SendMessage((hwnd),LVM_ISITEMVISIBLE, WPARAM(aindex), LPARAM(0)));
-end;
-{$ENDIF}
-
-{$ifdef win32vista}
-
-function ListView_SetGroupHeaderImageList(hwnd:HWNd;himl:HIMAGELIST):HIMAGELIST;
-begin
- Result:=HIMAGELIST(SendMessage((hwnd),LVM_SETIMAGELIST, WPARAM(LVSIL_GROUPHEADER), LPARAM(HIMAGELIST((himl)))));
-end;
-
-function ListView_GetGroupHeaderImageList(hwnd:HWND):HIMAGELIST;
-begin
- Result:=HIMAGELIST(SendMessage((hwnd),LVM_GETIMAGELIST, WPARAM(LVSIL_GROUPHEADER),LPARAM(0)));
-end;
-
-function ListView_GetEmptyText(hwnd:HWND;pszText:LPWSTR; cchText:CUINT):BOOL;
-begin
- Result:=BOOL(SendMessage((hwnd),LVM_GETEMPTYTEXT, WPARAM(cchText), LPARAM(pszText)));
-end;
-
-function ListView_GetFooterRect(hwnd:HWND; prc:PRECT):BOOL;
-begin
- Result:=BOOL(SendMessage((hwnd),LVM_GETFOOTERRECT, WPARAM(0), LPARAM(prc)));
-end;
-
-function ListView_GetFooterInfo(hwnd:HWND;plvfi: LPLVFOOTERINFO ):BOOL;
-begin
- Result:=BOOL(SendMessage((hwnd),LVM_GETFOOTERINFO, WPARAM(0), LPARAM(plvfi)));
-end;
-
-function ListView_GetFooterItemRect(hwnd:HWND;iItem:CUINT;prc:PRECT):BOOL;
-begin
- Result:=BOOL(SendMessage((hwnd),LVM_GETFOOTERITEMRECT, WPARAM(iItem), LPARAM(prc)));
-end;
-
-function ListView_GetFooterItem(hwnd:HWND;iItem:CUINT; pfi:PLVFOOTERITEM):BOOL;
-begin
- Result:=BOOL(SendMessage((hwnd),LVM_GETFOOTERITEM, WPARAM(iItem), LPARAM(pfi)));
-end;
-
-// (hwnd), LVM_GETITEMINDEXRECT, (WPARAM)(LVITEMINDEX*)(plvii), \
-// ((prc) ? ((((LPRECT)(prc))->top = (iSubItem)), (((LPRECT)(prc))->left = (code)), (LPARAM)(prc)) : (LPARAM)(LPRECT)NULL))
-
-function ListView_GetItemIndexRect(hwnd:hwnd; plvii:PLVITEMINDEX; iSubItem:clong; code:clong; prc:LPRECT) :BOOL;
-begin
- if assigned(prc) then
- begin
- prc^.top:=iSubItem;
- prc^.left:=code;
- end;
- Result:=BOOL(SendMessage((hwnd), LVM_GETITEMINDEXRECT, WPARAM(pLVITEMINDEX(plvii)), LPARAM(PRC)));
-end;
-
-function ListView_SetItemIndexState(hwndLV:HWND; plvii:PLVITEMINDEX; data:CUINT; mask:CUINT):HRESULT;
- var macro_lvi: LV_ITEM ;
-begin
- macro_lvi.stateMask := (mask);
- macro_lvi.state := (data);
- Result:=HRESULT(SendMessage((hwndLV),LVM_SETITEMINDEXSTATE, WPARAM(pLVITEMINDEX(plvii)), LPARAM(PLV_ITEM(@macro_lvi))));
-end;
-
-function ListView_GetNextItemIndex(hwnd:HWND;plvii:PLVITEMINDEX; flags:LPARAM):BOOL;
-begin
- Result:=BOOL(SendMessage((hwnd),LVM_GETNEXTITEMINDEX, WPARAM(pLVITEMINDEX(plvii)), MAKELPARAM(flags, 0)));
-end;
-{$endif}
-
-// Macro 154
-// #define ListView_SetBkImage(hwnd, plvbki) \
-// (BOOL)SNDMSG((hwnd), LVM_SETBKIMAGE, 0, (LPARAM)(plvbki))
-
-Function ListView_SetBkImage( hwnd : hwnd; plvbki : LPARAM):BOOL;
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_SETBKIMAGE, 0, plvbki));
-end;
-
-// Macro 155
-// #define ListView_GetBkImage(hwnd, plvbki) \
-// (BOOL)SNDMSG((hwnd), LVM_GETBKIMAGE, 0, (LPARAM)(plvbki))
-
-Function ListView_GetBkImage( hwnd : hwnd; plvbki : LPARAM):BOOL;
-Begin
- Result:=BOOL(SendMessage((hwnd), LVM_GETBKIMAGE, 0, plvbki));
-end;
-
-// Macro 156
-// #define TreeView_InsertItem(hwnd, lpis) \
-// (HTREEITEM)SNDMSG((hwnd), TVM_INSERTITEM, 0, (LPARAM)(LPTV_INSERTSTRUCT)(lpis))
-
-Function TreeView_InsertItem( hwnd : hwnd; lpis : LPTV_INSERTSTRUCT):HTREEITEM;inline;
-Begin
- Result:=HTREEITEM(SendMessage((hwnd), TVM_INSERTITEM, 0, LPARAM(lpis)));
-end;
-
-
-Function TreeView_InsertItem( hwnd : hwnd; const lpis : TV_INSERTSTRUCT):HTREEITEM;inline;
-Begin
- Result:=HTREEITEM(SendMessage((hwnd), TVM_INSERTITEM, 0, LPARAM(@lpis)));
-end;
-
-// Macro 157
-// #define TreeView_DeleteItem(hwnd, hitem) \
-// (BOOL)SNDMSG((hwnd), TVM_DELETEITEM, 0, (LPARAM)(HTREEITEM)(hitem))
-
-Function TreeView_DeleteItem( hwnd : hwnd; hitem : HTREEITEM):BOOL;
-Begin
- Result:=BOOL(SendMessage((hwnd), TVM_DELETEITEM, 0, LPARAM(hitem)));
-end;
-
-
-// Macro 158
-// #define TreeView_DeleteAllItems(hwnd) \
-// (BOOL)SNDMSG((hwnd), TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT)
-
-Function TreeView_DeleteAllItems( hwnd : hwnd):BOOL;
-Begin
- Result:=BOOL(SendMessage((hwnd), TVM_DELETEITEM, 0, LPARAM(HTREEITEM(TVI_ROOT))));
-end;
-
-
-// Macro 159
-// #define TreeView_Expand(hwnd, hitem, code) \
-// (BOOL)SNDMSG((hwnd), TVM_EXPAND, (WPARAM)(code), (LPARAM)(HTREEITEM)(hitem))
-
-Function TreeView_Expand( hwnd : hwnd; hitem : HTREEITEM; code : WPARAM):BOOL;
-Begin
- Result:=BOOL(SendMessage((hwnd), TVM_EXPAND, code, lparam(hitem)))
-end;
-
-
-// Macro 160
-// #define TreeView_GetItemRect(hwnd, hitem, prc, code) \
-// (*(HTREEITEM *)prc = (hitem), (BOOL)SNDMSG((hwnd), TVM_GETITEMRECT, (WPARAM)(code), (LPARAM)(RECT *)(prc)))
-
-Function TreeView_GetItemRect( hwnd : hwnd; hitem: HTREEITEM; code : WPARAM; prc : pRECT):BOOL;inline;
-Begin
- HTREEITEM(prc):=HITEM;
- Result:=Bool(SendMessage((hwnd), TVM_GETITEMRECT, code, LPARAM(prc)));
-end;
-
-Function TreeView_GetItemRect( hwnd : hwnd; hitem: HTREEITEM; var prc : TRECT;code : Bool):BOOL;inline;
-Begin
- HTREEITEM(Pointer(@prc)^):=HITEM;
- Result:=Bool(SendMessage((hwnd), TVM_GETITEMRECT, WPARAM(code), LPARAM(@prc)));
-end;
-
-// Macro 161
-// #define TreeView_GetCount(hwnd) \
-// (UINT)SNDMSG((hwnd), TVM_GETCOUNT, 0, 0)
-
-Function TreeView_GetCount( hwnd : hwnd):UINT;
-Begin
- Result:=UINT(SendMessage((hwnd), TVM_GETCOUNT, 0, 0))
-end;
-
-// Macro 162
-// #define TreeView_GetIndent(hwnd) \
-// (UINT)SNDMSG((hwnd), TVM_GETINDENT, 0, 0)
-
-Function TreeView_GetIndent( hwnd : hwnd):UINT;
-Begin
- Result:=UINT(SendMessage((hwnd), TVM_GETINDENT, 0, 0))
-end;
-
-
-// Macro 163
-// #define TreeView_SetIndent(hwnd, indent) \
-// (BOOL)SNDMSG((hwnd), TVM_SETINDENT, (WPARAM)(indent), 0)
-
-Function TreeView_SetIndent( hwnd : hwnd; indent : WPARAM):BOOL;
-Begin
- Result:=BOOL(SendMessage((hwnd), TVM_SETINDENT, indent, 0))
-end;
-
-
-// Macro 164
-// #define TreeView_GetImageList(hwnd, iImage) \
-// (HIMAGELIST)SNDMSG((hwnd), TVM_GETIMAGELIST, iImage, 0)
-
-Function TreeView_GetImageList( hwnd : hwnd; iImage : cint ):HIMAGELIST;
-Begin
- Result:=HIMAGELIST(SendMessage((hwnd), TVM_GETIMAGELIST, iImage, 0))
-end;
-
-
-// Macro 165
-// #define TreeView_SetImageList(hwnd, himl, iImage) \
-// (HIMAGELIST)SNDMSG((hwnd), TVM_SETIMAGELIST, iImage, (LPARAM)(HIMAGELIST)(himl))
-
-Function TreeView_SetImageList( hwnd : hwnd; himl : HIMAGELIST; iImage : cint ):HIMAGELIST;
-Begin
- Result:=HIMAGELIST(SendMessage((hwnd), TVM_SETIMAGELIST, iImage, himl))
-end;
-
-// Macro 166
-// #define TreeView_GetNextItem(hwnd, hitem, code) \
-// (HTREEITEM)SNDMSG((hwnd), TVM_GETNEXTITEM, (WPARAM)(code), (LPARAM)(HTREEITEM)(hitem))
-
-Function TreeView_GetNextItem( hwnd : hwnd; hitem : HTREEITEM; code : WPARAM):HTREEITEM;
-
-Begin
- Result:=HTREEITEM(SendMessage((hwnd), TVM_GETNEXTITEM, code, lparam(hitem)))
-end;
-
-
-// Macro 167
-
-function TreeView_GetChild(hwnd:hwnd; hitem:HTREEITEM) : HTREEITEM;
-
-Begin
- Result:=TreeView_GetNextItem(hwnd, hitem, TVGN_CHILD)
-End;
-// Macro 168
-
-// #define TreeView_GetNextSibling(hwnd:hwnd; hitem:HTREEITEM);
-// (hwnd, hitem)
-// TreeView_GetNextItem(hwnd, hitem, TVGN_NEXT)
-
-
-
-function TreeView_GetNextSibling(hwnd:hwnd; hitem:HTREEITEM) : HTREEITEM;
-// (hwnd, hitem)
-// TreeView_GetNextItem(hwnd, hitem, TVGN_NEXT)
-
-Begin
- Result:=TreeView_getNextItem(hwnd,hitem,TVGN_NEXT);
-end;
-
-// Macro 169
-function TreeView_GetPrevSibling(hwnd:hwnd; hitem:HTREEITEM) : HTREEITEM;
-begin
- Result:=TreeView_GetNextItem(hwnd, hitem, TVGN_PREVIOUS);
-end;
-
-// Macro 170
-
-function TreeView_GetParent(hwnd:hwnd; hitem:HTREEITEM) : HTREEITEM;
-begin
- Result:=TreeView_GetNextItem(hwnd, hitem, TVGN_PARENT)
-end;
-
-// Macro 171
-// #define TreeView_GetFirstVisible(hwnd:hwnd);
-// TreeView_GetNextItem(hwnd, NULL, TVGN_FIRSTVISIBLE)
-
-function TreeView_GetFirstVisible(hwnd:hwnd) : HTREEITEM;inline;
-begin
- Result:=TreeView_GetNextItem(hwnd, NIL, TVGN_FIRSTVISIBLE)
-end;
-
-// Macro 172
-
-//#define TreeView_GetNextVisible(hwnd:hwnd; hitem:HTREEITEM);
-//(hwnd, hitem) TreeView_GetNextItem(hwnd, hitem, TVGN_NEXTVISIBLE)
-function TreeView_GetNextVisible(hwnd:hwnd; hitem:HTREEITEM) : HTREEITEM;inline;
-begin
- Result:=TreeView_GetNextItem(hwnd, hitem, TVGN_NEXTVISIBLE)
-end;
-
-// Macro 173
-//#define TreeView_GetPrevVisible(hwnd:hwnd; hitem:HTREEITEM);
-// (hwnd, hitem) TreeView_GetNextItem(hwnd, hitem, TVGN_PREVIOUSVISIBLE)
-
-
-function TreeView_GetPrevVisible(hwnd:hwnd; hitem:HTREEITEM) : HTREEITEM;inline;
-Begin
- Result:=TreeView_GetNextItem(hwnd, hitem, TVGN_PREVIOUSVISIBLE);
-end;
-
-// Macro 174
-
-function TreeView_GetSelection(hwnd:hwnd) : HTREEITEM;inline;
-begin
- Result:=TreeView_GetNextItem(hwnd, NIL, TVGN_CARET);
-end;
-
-// Macro 175
-
-//#define TreeView_GetDropHilight(hwnd:hwnd);
-//TreeView_GetNextItem(hwnd, NULL, TVGN_DROPHILITE)
-
-function TreeView_GetDropHilight(hwnd:hwnd) : HTREEITEM;inline;
-
-begin
- Result:=TreeView_GetNextItem(hwnd, NIL, TVGN_DROPHILITE);
-end;
-
-function TreeView_GetDropHilite(hwnd:hwnd) : HTREEITEM;inline;
-
-begin
- Result:=TreeView_GetNextItem(hwnd, NIL, TVGN_DROPHILITE);
-end;
-
-
-// Macro 176
-
-function TreeView_GetRoot(hwnd:hwnd) : HTREEITEM;inline;
-
-begin
- Result:=TreeView_GetNextItem(hwnd, NIL, TVGN_ROOT);
-end;
-
-// Macro 177
-//#define TreeView_GetLastVisible(hwnd:hwnd);
-//TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
-
-function TreeView_GetLastVisible(hwnd:hwnd) : HTREEITEM;inline;
-begin
- Result:=TreeView_GetNextItem(hwnd, NIL, TVGN_LASTVISIBLE)
-end;
-
-// Macro 178
-
-
-Function TreeView_Select( hwnd : hwnd; hitem : HTREEITEM; code : WPARAM):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), TVM_SELECTITEM, code, LPARAM(hitem)))
-end;
-
-// Macro 179
-// #define TreeView_SelectItem(hwnd, hitem) TreeView_Select(hwnd, hitem, TVGN_CARET)
-// Macro 180
-// #define TreeView_SelectDropTarget(hwnd, hitem) TreeView_Select(hwnd, hitem, TVGN_DROPHILITE)
-// Macro 181
-// #define TreeView_SelectSetFirstVisible(hwnd, hitem) TreeView_Select(hwnd, hitem, TVGN_FIRSTVISIBLE)
-
-// Macro 179
-Procedure TreeView_SelectItem(hwnd:hwnd; hitem:HTREEITEM);
-Begin
- TreeView_Select(hwnd, hitem, TVGN_CARET)
-End;
-
-// Macro 180
-Procedure TreeView_SelectDropTarget(hwnd:hwnd; hitem:HTREEITEM);
-Begin
- TreeView_Select(hwnd, hitem, TVGN_DROPHILITE)
-End;
-
-// Macro 181
-Procedure TreeView_SelectSetFirstVisible(hwnd:hwnd; hitem:HTREEITEM);
-Begin
- TreeView_Select(hwnd, hitem, TVGN_FIRSTVISIBLE)
-End;
-
-// Macro 182
-// #define TreeView_GetItem(hwnd, pitem) \
-// (BOOL)SNDMSG((hwnd), TVM_GETITEM, 0, (LPARAM)(TV_ITEM *)(pitem))
-
-Function TreeView_GetItem( hwnd : hwnd;var pitem : TV_ITEM ):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), TVM_GETITEM, 0, LPARAM(@pitem)))
-end;
-
-
-// Macro 183
-
-//#define TreeView_SetItem(hwnd, pitem) \
-// (BOOL)SNDMSG((hwnd), TVM_SETITEM, 0, (LPARAM)(const TV_ITEM *)(pitem))
-
-Function TreeView_SetItem( hwnd : hwnd;const pitem : TV_ITEM ):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), TVM_SETITEM, 0, LParam(@pitem)))
-end;
-
-
-// Macro 184
-
-//#define TreeView_EditLabel(hwnd, hitem) \
-// (HWND)SNDMSG((hwnd), TVM_EDITLABEL, 0, (LPARAM)(HTREEITEM)(hitem))
-
-Function TreeView_EditLabel( hwnd : hwnd; hitem : HTREEITEM):HWND;
-
-Begin
- Result:=Windows.HWND(SendMessage((hwnd), TVM_EDITLABEL, 0, LParam(hitem)))
-end;
-
-
-// Macro 185
-
-//#define TreeView_GetEditControl(hwnd) \
-// (HWND)SNDMSG((hwnd), TVM_GETEDITCONTROL, 0, 0)
-
-Function TreeView_GetEditControl( hwnd : hwnd):HWND;
-
-Begin
- Result:=Windows.HWND(SendMessage((hwnd), TVM_GETEDITCONTROL, 0, 0))
-end;
-
-
-// Macro 186
-
-//#define TreeView_GetVisibleCount(hwnd) \
-// (UINT)SNDMSG((hwnd), TVM_GETVISIBLECOUNT, 0, 0)
-
-Function TreeView_GetVisibleCount( hwnd : hwnd):UINT;
-
-Begin
- Result:=UINT(SendMessage((hwnd), TVM_GETVISIBLECOUNT, 0, 0))
-end;
-
-
-// Macro 187
-
-//#define TreeView_HitTest(hwnd, lpht) \
-// (HTREEITEM)SNDMSG((hwnd), TVM_HITTEST, 0, (LPARAM)(LPTV_HITTESTINFO)(lpht))
-
-Function TreeView_HitTest( hwnd : hwnd; lpht : LPTV_HITTESTINFO):HTREEITEM;inline;
-
-Begin
- Result:=HTREEITEM(SendMessage((hwnd), TVM_HITTEST, 0, lparam(lpht)))
-end;
-
-
-Function TreeView_HitTest( hwnd : hwnd; var lpht : TV_HITTESTINFO):HTREEITEM;inline;
-
-Begin
- Result:=HTREEITEM(SendMessage((hwnd), TVM_HITTEST, 0, lparam(@lpht)))
-end;
-// Macro 188
-
-//#define TreeView_CreateDragImage(hwnd, hitem) \
-// (HIMAGELIST)SNDMSG((hwnd), TVM_CREATEDRAGIMAGE, 0, (LPARAM)(HTREEITEM)(hitem))
-
-Function TreeView_CreateDragImage( hwnd : hwnd; hitem : HTREEITEM):HIMAGELIST;
-
-Begin
- Result:=HIMAGELIST(SendMessage((hwnd), TVM_CREATEDRAGIMAGE, 0, Lparam(hitem)))
-end;
-
-
-// Macro 189
-
-//#define TreeView_SortChildren(hwnd, hitem, recurse) \
-// (BOOL)SNDMSG((hwnd), TVM_SORTCHILDREN, (WPARAM)(recurse), (LPARAM)(HTREEITEM)(hitem))
-
-Function TreeView_SortChildren( hwnd : hwnd; hitem : HTREEITEM; recurse : WPARAM):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), TVM_SORTCHILDREN, recurse, LParam(hitem)))
-end;
-
-
-// Macro 190
-
-//#define TreeView_EnsureVisible(hwnd, hitem) \
-// (BOOL)SNDMSG((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(HTREEITEM)(hitem))
-
-Function TreeView_EnsureVisible( hwnd : hwnd; hitem : HTREEITEM):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), TVM_ENSUREVISIBLE, 0, LParam(hitem)))
-end;
-
-
-// Macro 191
-
-//#define TreeView_SortChildrenCB(hwnd, psort, recurse) \
-// (BOOL)SNDMSG((hwnd), TVM_SORTCHILDRENCB, (WPARAM)(recurse), \
-// (LPARAM)(LPTV_SORTCB)(psort))
-
-Function TreeView_SortChildrenCB( hwnd : hwnd;psort :lpTV_sortcb; recurse : WPARAM):BOOL;inline;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), TVM_SORTCHILDRENCB, recurse, LPARAM(psort)))
-end;
-
-
-Function TreeView_SortChildrenCB( hwnd : hwnd;const psort :tagTVsortcb; recurse : WPARAM):BOOL;inline;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), TVM_SORTCHILDRENCB, recurse, LPARAM(@psort)))
-end;
-
-
-// Macro 192
-
-//#define TreeView_EndEditLabelNow(hwnd, fCancel) \
-// (BOOL)SNDMSG((hwnd), TVM_ENDEDITLABELNOW, (WPARAM)(fCancel), 0)
-
-Function TreeView_EndEditLabelNow( hwnd : hwnd; fCancel : WPARAM):BOOL;inline;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), TVM_ENDEDITLABELNOW, fCancel, 0))
-end;
-
-
-Function TreeView_EndEditLabelNow( hwnd : hwnd; fCancel : Bool):BOOL;inline;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), TVM_ENDEDITLABELNOW, WPARAM(fCancel), 0))
-end;
-
-
-// Macro 193
-
-//#define TreeView_SetToolTips(hwnd, hwndTT) \
-// (HWND)SNDMSG((hwnd), TVM_SETTOOLTIPS, (WPARAM)(hwndTT), 0)
-
-Function TreeView_SetToolTips( hwnd : hwnd; hwndTT : WPARAM):HWND;
-
-Begin
- Result:=Windows.HWND(SendMessage((hwnd), TVM_SETTOOLTIPS, hwndTT, 0))
-end;
-
-
-// Macro 194
-
-//#define TreeView_GetToolTips(hwnd) \
-// (HWND)SNDMSG((hwnd), TVM_GETTOOLTIPS, 0, 0)
-
-Function TreeView_GetToolTips( hwnd : hwnd):HWND;
-
-Begin
- Result:=Windows.HWND(SendMessage((hwnd), TVM_GETTOOLTIPS, 0, 0))
-end;
-
-
-// Macro 195
-
-//#define TreeView_GetISearchString(hwndTV, lpsz) \
-// (BOOL)SNDMSG((hwndTV), TVM_GETISEARCHSTRING, 0, (LPARAM)(LPTSTR)(lpsz))
-
-Function TreeView_GetISearchString( hwndTV : hwnd; lpsz : LPTSTR):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwndTV), TVM_GETISEARCHSTRING, 0, LPARAM(lpsz)))
-end;
-
-
-// Macro 196
-
-//#define TreeView_SetInsertMark(hwnd, hItem, fAfter) \
-// (BOOL)SNDMSG((hwnd), TVM_SETINSERTMARK, (WPARAM) (fAfter), (LPARAM) (hItem))
-
-Function TreeView_SetInsertMark( hwnd : hwnd; hItem : LParam ; fAfter : WParam ):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), TVM_SETINSERTMARK, (fAfter), (hItem)))
-end;
-
-
-// Macro 197
-
-//#define TreeView_SetUnicodeFormat(hwnd, fUnicode) \
-// (BOOL)SNDMSG((hwnd), TVM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
-
-Function TreeView_SetUnicodeFormat( hwnd : hwnd; fUnicode : WPARAM):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), TVM_SETUNICODEFORMAT, fUnicode, 0))
-end;
-
-
-// Macro 198
-
-//#define TreeView_GetUnicodeFormat(hwnd) \
-// (BOOL)SNDMSG((hwnd), TVM_GETUNICODEFORMAT, 0, 0)
-
-Function TreeView_GetUnicodeFormat( hwnd : hwnd):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), TVM_GETUNICODEFORMAT, 0, 0))
-end;
-
-
-// Macro 199
-
-//#define TreeView_SetItemHeight(hwnd, iHeight) \
-// (int)SNDMSG((hwnd), TVM_SETITEMHEIGHT, (WPARAM)(iHeight), 0)
-
-Function TreeView_SetItemHeight( hwnd : hwnd; iHeight : WPARAM):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), TVM_SETITEMHEIGHT, iHeight, 0))
-end;
-
-
-// Macro 200
-
-//#define TreeView_GetItemHeight(hwnd) \
-// (int)SNDMSG((hwnd), TVM_GETITEMHEIGHT, 0, 0)
-
-Function TreeView_GetItemHeight( hwnd : hwnd):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), TVM_GETITEMHEIGHT, 0, 0))
-end;
-
-
-// Macro 201
-
-//#define TreeView_SetBkColor(hwnd, clr) \
-// (COLORREF)SNDMSG((hwnd), TVM_SETBKCOLOR, 0, (LPARAM)(clr))
-
-Function TreeView_SetBkColor( hwnd : hwnd; clr : LPARAM):COLORREF;
-
-Begin
- Result:=COLORREF(SendMessage((hwnd), TVM_SETBKCOLOR, 0, clr))
-end;
-
-
-// Macro 202
-
-//#define TreeView_SetTextColor(hwnd, clr) \
-// (COLORREF)SNDMSG((hwnd), TVM_SETTEXTCOLOR, 0, (LPARAM)(clr))
-
-Function TreeView_SetTextColor( hwnd : hwnd; clr : LPARAM):COLORREF;
-
-Begin
- Result:=COLORREF(SendMessage((hwnd), TVM_SETTEXTCOLOR, 0, clr))
-end;
-
-
-// Macro 203
-
-//#define TreeView_GetBkColor(hwnd) \
-// (COLORREF)SNDMSG((hwnd), TVM_GETBKCOLOR, 0, 0)
-
-Function TreeView_GetBkColor( hwnd : hwnd):COLORREF;
-
-Begin
- Result:=COLORREF(SendMessage((hwnd), TVM_GETBKCOLOR, 0, 0))
-end;
-
-
-// Macro 204
-
-//#define TreeView_GetTextColor(hwnd) \
-// (COLORREF)SNDMSG((hwnd), TVM_GETTEXTCOLOR, 0, 0)
-
-Function TreeView_GetTextColor( hwnd : hwnd):COLORREF;
-
-Begin
- Result:=COLORREF(SendMessage((hwnd), TVM_GETTEXTCOLOR, 0, 0))
-end;
-
-
-// Macro 205
-
-//#define TreeView_SetScrollTime(hwnd, uTime) \
-// (UINT)SNDMSG((hwnd), TVM_SETSCROLLTIME, uTime, 0)
-
-Function TreeView_SetScrollTime( hwnd : hwnd; uTime : wparam ):UINT;
-
-Begin
- Result:=UINT(SendMessage((hwnd), TVM_SETSCROLLTIME, uTime, 0))
-end;
-
-
-// Macro 206
-
-//#define TreeView_GetScrollTime(hwnd) \
-// (UINT)SNDMSG((hwnd), TVM_GETSCROLLTIME, 0, 0)
-
-Function TreeView_GetScrollTime( hwnd : hwnd):UINT;
-
-Begin
- Result:=UINT(SendMessage((hwnd), TVM_GETSCROLLTIME, 0, 0))
-end;
-
-
-// Macro 207
-
-//#define TreeView_SetInsertMarkColor(hwnd, clr) \
-// (COLORREF)SNDMSG((hwnd), TVM_SETINSERTMARKCOLOR, 0, (LPARAM)(clr))
-
-Function TreeView_SetInsertMarkColor( hwnd : hwnd; clr : LPARAM):COLORREF;
-
-Begin
- Result:=COLORREF(SendMessage((hwnd), TVM_SETINSERTMARKCOLOR, 0, clr))
-end;
-
-
-// Macro 208
-
-//#define TreeView_GetInsertMarkColor(hwnd) \
-// (COLORREF)SNDMSG((hwnd), TVM_GETINSERTMARKCOLOR, 0, 0)
-
-Function TreeView_GetInsertMarkColor( hwnd : hwnd):COLORREF;
-
-Begin
- Result:=COLORREF(SendMessage((hwnd), TVM_GETINSERTMARKCOLOR, 0, 0))
-end;
-
-
-// Macro 209
-
-//#define TreeView_SetItemState(hwndTV, hti, data, _mask) \
-// { TVITEM _ms_TVi;\
-// _ms_TVi.mask = TVIF_STATE; \
-// _ms_TVi.hItem = hti; \
-// _ms_TVi.stateMask = _mask;\
-// _ms_TVi.state = data;\
-// SNDMSG((hwndTV), TVM_SETITEM, 0, (LPARAM)(TV_ITEM *)&_ms_TVi);\
-// }
-
-Procedure TreeView_SetItemState(hwndTV:HWND;hti:HTreeItem;data:UINT;_mask:UINT);
-
-var _ms_TVi : TVITEM;
-
-Begin
- _ms_TVi.mask:=TVIF_STATE;
- _ms_TVi.hItem := hti;
- _ms_TVi.stateMask := _mask;
- _ms_TVi.state := data;
- SendMessage(hwndTV,TVM_SETITEM, 0, LPARAM(@_ms_TVi));
-end;
-
-
-// Macro 210
-
-//#define TreeView_SetCheckState(hwndTV, hti, fCheck) \
-// TreeView_SetItemState(hwndTV, hti, INDEXTOSTATEIMAGEMASK((fCheck)?2:1), TVIS_STATEIMAGEMASK)
-
-Procedure TreeView_SetCheckState( hwndTV : hwnd; hti : HTreeItem ; fCheck : bool );
-
-var j : cint;
-
-Begin
- IF not fCheck Then // (or inc(longint(fCheck)) if you like it dirty)
- j:=1
- Else
- j:=2;
-
- TreeView_SetItemState(hwndTV, hti, INDEXTOSTATEIMAGEMASK(j), TVIS_STATEIMAGEMASK)
-end;
-
-
-{$ifdef IE5plus}
-// Macro 211
-
-//#define TreeView_GetItemState(hwndTV, hti, mask) \
-// (UINT)SNDMSG((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), (LPARAM)(mask))
-
-Function TreeView_GetItemState( hwndTV : hwnd; hti : WPARAM; mask : LPARAM):UINT;
-
-Begin
- Result:=UINT(SendMessage((hwndTV), TVM_GETITEMSTATE, hti, mask))
-end;
-
-
-
-// Macro 212
-// #define TreeView_GetCheckState(hwndTV, hti) \
-// ((((UINT)(SNDMSG((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), TVIS_STATEIMAGEMASK))) >> 12) -1)
-
-Function TreeView_GetCheckState( hwndTV : hwnd; hti : WPARAM):UINT;
-
-Begin
- Result:=((UINT(SendMessage((hwndTV), TVM_GETITEMSTATE, hti, TVIS_STATEIMAGEMASK) shr 12) -1));
-end;
-
-
-// Macro 213
-
-// #define TreeView_SetLineColor(hwnd, clr) \
-// (COLORREF)SNDMSG((hwnd), TVM_SETLINECOLOR, 0, (LPARAM)(clr))
-
-Function TreeView_SetLineColor( hwnd : hwnd; clr : LPARAM):COLORREF;
-
-Begin
- Result:=COLORREF(SendMessage((hwnd), TVM_SETLINECOLOR, 0, clr))
-end;
-
-
-// Macro 214
-
-// #define TreeView_GetLineColor(hwnd) \
-// (COLORREF)SNDMSG((hwnd), TVM_GETLINECOLOR, 0, 0)
-
-Function TreeView_GetLineColor( hwnd : hwnd):COLORREF;
-
-Begin
- Result:=COLORREF(SendMessage((hwnd), TVM_GETLINECOLOR, 0, 0))
-end;
-
-
-// Macro 215
-// #define TreeView_MapAccIDToHTREEITEM(hwnd, id) \
-// (HTREEITEM)SNDMSG((hwnd), TVM_MAPACCIDTOHTREEITEM, id, 0)
-
-Function TreeView_MapAccIDToHTREEITEM( hwnd : hwnd; id :uint):HTREEITEM;
-
-Begin
- Result:=HTREEITEM(SendMessage((hwnd), TVM_MAPACCIDTOHTREEITEM, id, 0))
-end;
-
-
-// Macro 216
-// #define TreeView_MapHTREEITEMToAccID(hwnd, htreeitem) \
-// (UINT)SNDMSG((hwnd), TVM_MAPHTREEITEMTOACCID, (WPARAM)htreeitem, 0)
-
-Function TreeView_MapHTREEITEMToAccID( hwnd : hwnd; htreeitem : WPARAM):UINT;
-
-Begin
- Result:=UINT(SendMessage((hwnd), TVM_MAPHTREEITEMTOACCID, htreeitem, 0))
-end;
-{$endif}
-
-{$ifdef win32vista}
-function TreeView_GetSelectedCount(hwnd:hwnd):DWORD;
-Begin
- Result:=DWORD(SendMessage((hwnd),TVM_GETSELECTEDCOUNT, 0, 0));
-end;
-
-function TreeView_ShowInfoTip(hwnd:HWND; hitem:HTREEITEM):DWORD;
-Begin
- Result:=DWORD(SendMessage((hwnd),TVM_SHOWINFOTIP, 0, LPARAM(hitem)));
-end;
-
-function TreeView_GetItemPartRect(hwnd:HWND; hitem:HTREEITEM; prc:prect; partid:TVITEMPART):bool;
-var info : TVGETITEMPARTRECTINFO;
-Begin
- info.hti := (hitem);
- info.prc := (prc);
- info.partID := (partid);
- Result:=BOOL(SendMessage((hwnd), TVM_GETITEMPARTRECT, 0, LPARAM(@info)));
-end;
-{$endif}
-
-// Macro 217
-
-//#define TabCtrl_GetImageList(hwnd) \
-// (HIMAGELIST)SNDMSG((hwnd), TCM_GETIMAGELIST, 0, DWord(0))
-
-Function TabCtrl_GetImageList( hwnd : hwnd):HIMAGELIST;
-
-Begin
- Result:=HIMAGELIST(SendMessage((hwnd), TCM_GETIMAGELIST, 0, LPARAM(0)))
-end;
-
-
-// Macro 218
-
-//#define TabCtrl_SetImageList(hwnd, himl) \
-// (HIMAGELIST)SNDMSG((hwnd), TCM_SETIMAGELIST, 0, (LPARAM)(HIMAGELIST)(himl))
-
-Function TabCtrl_SetImageList( hwnd : hwnd; himl : HIMAGELIST):HIMAGELIST;
-
-Begin
- Result:=HIMAGELIST(SendMessage((hwnd), TCM_SETIMAGELIST, 0, himl))
-end;
-
-
-// Macro 219
-
-//#define TabCtrl_GetItemCount(hwnd) \
-// (int)SNDMSG((hwnd), TCM_GETITEMCOUNT, 0, DWord(0))
-
-Function TabCtrl_GetItemCount( hwnd : hwnd):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), TCM_GETITEMCOUNT, 0, LPARAM(0)))
-end;
-
-
-// Macro 220
-
-//#define TabCtrl_GetItem(hwnd, iItem, pitem) \
-// (BOOL)SNDMSG((hwnd), TCM_GETITEM, (WPARAM)(int)(iItem), (LPARAM)(TC_ITEM *)(pitem))
-
-Function TabCtrl_GetItem( hwnd : hwnd; iItem : cint;var pitem : TC_ITEM ):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), TCM_GETITEM, iItem, LPARAM(@pitem)))
-end;
-
-
-// Macro 221
-
-//#define TabCtrl_SetItem(hwnd, iItem, pitem) \
-// (BOOL)SNDMSG((hwnd), TCM_SETITEM, (WPARAM)(int)(iItem), (LPARAM)(TC_ITEM *)(pitem))
-
-Function TabCtrl_SetItem( hwnd : hwnd; iItem : cint;var pitem : TC_ITEM ):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), TCM_SETITEM, iItem, LPARAM(@pitem)))
-end;
-
-
-// Macro 222
-
-//#define TabCtrl_InsertItem(hwnd, iItem, pitem) \
-// (int)SNDMSG((hwnd), TCM_INSERTITEM, (WPARAM)(int)(iItem), (LPARAM)(const TC_ITEM *)(pitem))
-
-Function TabCtrl_InsertItem( hwnd : hwnd; iItem : cint;const pitem : TC_ITEM ):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), TCM_INSERTITEM, iItem, LPARAM(@pitem)));
-end;
-
-
-// Macro 223
-
-//#define TabCtrl_DeleteItem(hwnd, i) \
-// (BOOL)SNDMSG((hwnd), TCM_DELETEITEM, (WPARAM)(int)(i), DWord(0))
-
-Function TabCtrl_DeleteItem( hwnd : hwnd; i : cint):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), TCM_DELETEITEM, (i), LPARAM(0)))
-end;
-
-
-// Macro 224
-
-//#define TabCtrl_DeleteAllItems(hwnd) \
-// (BOOL)SNDMSG((hwnd), TCM_DELETEALLITEMS, 0, DWord(0))
-
-Function TabCtrl_DeleteAllItems( hwnd : hwnd):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), TCM_DELETEALLITEMS, 0, LPARAM(0)))
-end;
-
-
-// Macro 225
-
-//#define TabCtrl_GetItemRect(hwnd, i, prc) \
-// (BOOL)SNDMSG((hwnd), TCM_GETITEMRECT, (WPARAM)(int)(i), (LPARAM)(RECT *)(prc))
-
-Function TabCtrl_GetItemRect( hwnd : hwnd; i : cint;var prc : RECT ):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), TCM_GETITEMRECT, (i), LPARAM(@prc)))
-end;
-
-
-// Macro 226
-
-//#define TabCtrl_GetCurSel(hwnd) \
-// (int)SNDMSG((hwnd), TCM_GETCURSEL, 0, 0)
-
-Function TabCtrl_GetCurSel( hwnd : hwnd):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), TCM_GETCURSEL, 0, 0))
-end;
-
-
-// Macro 227
-
-//#define TabCtrl_SetCurSel(hwnd, i) \
-// (int)SNDMSG((hwnd), TCM_SETCURSEL, (WPARAM)(i), 0)
-
-Function TabCtrl_SetCurSel( hwnd : hwnd; i : WPARAM):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), TCM_SETCURSEL, (i), 0))
-end;
-
-
-// Macro 228
-
-//#define TabCtrl_HitTest(hwndTC, pinfo) \
-// (int)SNDMSG((hwndTC), TCM_HITTEST, 0, (LPARAM)(TC_HITTESTINFO *)(pinfo))
-
-Function TabCtrl_HitTest( hwndTC : hwnd;var pinfo : TC_HITTESTINFO ):cint;inline;
-
-Begin
- Result:=cint(SendMessage((hwndTC), TCM_HITTEST, 0, LPARAM(@pinfo)))
-end;
-
-
-Function TabCtrl_HitTest( hwndTC : hwnd;pinfo : LPTCHITTESTINFO ):cint;inline;
-
-Begin
- Result:=cint(SendMessage((hwndTC), TCM_HITTEST, 0, LPARAM(@pinfo)))
-end;
-
-
-// Macro 229
-
-//#define TabCtrl_SetItemExtra(hwndTC, cb) \
-// (BOOL)SNDMSG((hwndTC), TCM_SETITEMEXTRA, (WPARAM)(cb), DWord(0))
-
-Function TabCtrl_SetItemExtra( hwndTC : hwnd; cb : WPARAM):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwndTC), TCM_SETITEMEXTRA, cb, LPARAM(0)))
-end;
-
-
-// Macro 230
-
-//#define TabCtrl_AdjustRect(hwnd, bLarger, prc) \
-// (int)SNDMSG(hwnd, TCM_ADJUSTRECT, (WPARAM)(BOOL)(bLarger), (LPARAM)(RECT *)prc)
-
-Function TabCtrl_AdjustRect( hwnd : hwnd; bLarger : BOOL;var prc : RECT ):cint;
-
-Begin
- Result:=cint(SendMessage(hwnd, TCM_ADJUSTRECT, Wparam(bLarger), Lparam(@prc)));
-end;
-
-
-// Macro 231
-
-//#define TabCtrl_SetItemSize(hwnd, x, y) \
-// (DWORD)SNDMSG((hwnd), TCM_SETITEMSIZE, 0, MAKELPARAM(x,y))
-
-Function TabCtrl_SetItemSize( hwnd : hwnd; x : wparam ; y : lparam ):DWORD;
-
-Begin
- Result:=DWORD(SendMessage((hwnd), TCM_SETITEMSIZE, 0, MAKELPARAM(x,y)))
-end;
-
-
-// Macro 232
-
-//#define TabCtrl_RemoveImage(hwnd, i) \
-// (void)SNDMSG((hwnd), TCM_REMOVEIMAGE, i, DWord(0))
-
-Procedure TabCtrl_RemoveImage( hwnd : hwnd; i : WPARAM);
-
-Begin
-SendMessage((hwnd), TCM_REMOVEIMAGE, i, LPARAM(0))
-end;
-
-
-// Macro 233
-
-//#define TabCtrl_SetPadding(hwnd, cx, cy) \
-// (void)SNDMSG((hwnd), TCM_SETPADDING, 0, MAKELPARAM(cx, cy))
-
-Procedure TabCtrl_SetPadding( hwnd : hwnd; cx : WPARAM ; cy : LPARAM );
-
-Begin
-SendMessage((hwnd), TCM_SETPADDING, 0, MAKELPARAM(cx, cy))
-end;
-
-
-// Macro 234
-
-//#define TabCtrl_GetRowCount(hwnd) \
-// (int)SNDMSG((hwnd), TCM_GETROWCOUNT, 0, DWord(0))
-
-Function TabCtrl_GetRowCount( hwnd : hwnd):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), TCM_GETROWCOUNT, 0, LPARAM(0)))
-end;
-
-
-// Macro 235
-
-//#define TabCtrl_GetToolTips(hwnd) \
-// (HWND)SNDMSG((hwnd), TCM_GETTOOLTIPS, 0, DWord(0))
-
-Function TabCtrl_GetToolTips( hwnd : hwnd):HWND;
-
-Begin
- Result:=Windows.HWND(SendMessage((hwnd), TCM_GETTOOLTIPS, 0, LPARAM(0)))
-end;
-
-
-// Macro 236
-
-//#define TabCtrl_SetToolTips(hwnd, hwndTT) \
-// (void)SNDMSG((hwnd), TCM_SETTOOLTIPS, (WPARAM)(hwndTT), DWord(0))
-
-Procedure TabCtrl_SetToolTips( hwnd : hwnd; hwndTT : WPARAM);
-
-Begin
-SendMessage((hwnd), TCM_SETTOOLTIPS, hwndTT, LPARAM(0))
-end;
-
-
-// Macro 237
-
-//#define TabCtrl_GetCurFocus(hwnd) \
-// (int)SNDMSG((hwnd), TCM_GETCURFOCUS, 0, 0)
-
-Function TabCtrl_GetCurFocus( hwnd : hwnd):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), TCM_GETCURFOCUS, 0, 0))
-end;
-
-
-// Macro 238
-
-//#define TabCtrl_SetCurFocus(hwnd, i) \
-// SNDMSG((hwnd),TCM_SETCURFOCUS, i, 0)
-
-Procedure TabCtrl_SetCurFocus( hwnd : hwnd; i : LPARAM );
-
-Begin
-SendMessage((hwnd),TCM_SETCURFOCUS, i, 0)
-end;
-
-
-// Macro 239
-
-//#define TabCtrl_SetMinTabWidth(hwnd, x) \
-// (int)SNDMSG((hwnd), TCM_SETMINTABWIDTH, 0, x)
-
-Function TabCtrl_SetMinTabWidth( hwnd : hwnd; x : WPARAM ):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), TCM_SETMINTABWIDTH, 0, x))
-end;
-
-
-// Macro 240
-
-//#define TabCtrl_DeselectAll(hwnd, fExcludeFocus)\
-// (void)SNDMSG((hwnd), TCM_DESELECTALL, fExcludeFocus, 0)
-
-Procedure TabCtrl_DeselectAll( hwnd : hwnd; fExcludeFocus : WPARAM );
-
-Begin
-SendMessage((hwnd), TCM_DESELECTALL, fExcludeFocus, 0)
-end;
-
-
-// Macro 241
-
-//#define TabCtrl_HighlightItem(hwnd, i, fHighlight) \
-// (BOOL)SNDMSG((hwnd), TCM_HIGHLIGHTITEM, (WPARAM)(i), (LPARAM)MAKELONG (fHighlight, 0))
-
-Function TabCtrl_HighlightItem( hwnd : hwnd; i : WPARAM; fHighlight :bool ):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), TCM_HIGHLIGHTITEM, (i), LPARAM(MAKELONG (cint(fHighlight), 0))))
-end;
-
-
-// Macro 242
-
-//#define TabCtrl_SetExtendedStyle(hwnd, dw)\
-// (DWORD)SNDMSG((hwnd), TCM_SETEXTENDEDSTYLE, 0, dw)
-
-Function TabCtrl_SetExtendedStyle( hwnd : hwnd; dw : LPARAM):DWORD;
-
-Begin
- Result:=DWORD(SendMessage((hwnd), TCM_SETEXTENDEDSTYLE, 0,lparam(dw)))
-end;
-
-
-// Macro 243
-
-//#define TabCtrl_GetExtendedStyle(hwnd)\
-// (DWORD)SNDMSG((hwnd), TCM_GETEXTENDEDSTYLE, 0, 0)
-
-Function TabCtrl_GetExtendedStyle( hwnd : hwnd):DWORD;
-
-Begin
- Result:=DWORD(SendMessage((hwnd), TCM_GETEXTENDEDSTYLE, 0, 0))
-end;
-
-
-// Macro 244
-
-//#define TabCtrl_SetUnicodeFormat(hwnd, fUnicode) \
-// (BOOL)SNDMSG((hwnd), TCM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
-
-Function TabCtrl_SetUnicodeFormat( hwnd : hwnd; fUnicode : WPARAM):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), TCM_SETUNICODEFORMAT, fUnicode, 0))
-end;
-
-
-// Macro 245
-
-//#define TabCtrl_GetUnicodeFormat(hwnd) \
-// (BOOL)SNDMSG((hwnd), TCM_GETUNICODEFORMAT, 0, 0)
-
-Function TabCtrl_GetUnicodeFormat( hwnd : hwnd):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), TCM_GETUNICODEFORMAT, 0, 0));
-end;
-
-
-// Macro 246
-
-//#define Animate_Create(hwndP, id, dwStyle, hInstance) \
-// CreateWindow(ANIMATE_CLASS, NULL, \
-// dwStyle, 0, 0, 0, 0, hwndP, (HMENU)(id), hInstance, NULL)
-
-Function Animate_Create(hwndP :HWND;id:HMENU;dwStyle:dword;hInstance:HINST):HWND;
-
-Begin
- result:=CreateWindow(ANIMATE_CLASS, NIL,
- dwStyle, 0, 0, 0, 0, hwndP, id, hInstance, NIL);
-end;
-
-
-// Macro 247
-//#define Animate_Open(hwnd, szName) (BOOL)SNDMSG(hwnd, ACM_OPEN, 0, (LPARAM)(LPTSTR)(szName))
-
-Function Animate_Open(hwndP :HWND;szName:LPTSTR):BOOL;
-
-Begin
- Result:=BOOL(SendMessage(hwndp, ACM_OPEN, 0, LPARAM(szName)));
-end;
-
-
-// Macro 248
-//#define Animate_OpenEx(hwnd, hInst, szName) (BOOL)SNDMSG(hwnd, ACM_OPEN, (WPARAM)(hInst), (LPARAM)(LPTSTR)(szName))
-
-Function Animate_OpenEx(hwndP :HWND;HInst:HInst; szName:LPTSTR):BOOL;
-
-Begin
- Result:=BOOL(SendMessage(hwndp, ACM_OPEN, hinst, LPARAM(szName)));
-end;
-
-
-// Macro 249
-//#define Animate_Play(hwnd, from, to, rep) (BOOL)SNDMSG(hwnd, ACM_PLAY, (WPARAM)(rep), (LPARAM)MAKELONG(from, to))
-
-Function Animate_Play(hwndP :HWND;from,_to,rep:uint):BOOL;
-
-Begin
- Result:=BOOL(SendMessage(hwndP, ACM_PLAY, wparam(rep), LPARAM(MAKELONG(From,_to))));
-end;
-
-
-// Macro 250
-//#define Animate_Stop(hwnd) (BOOL)SNDMSG(hwnd, ACM_STOP, 0, 0)
-
-Function Animate_stop(hwndP :HWND):BOOL;
-
-Begin
- Result:=BOOL(SendMessage(hwndP, ACM_STOP, 0, 0));
-end;
-
-
-// Macro 251
-//#define Animate_Close(hwnd) Animate_Open(hwnd, NULL)
-
-Function Animate_close(hwndP :HWND):BOOL;
-
-Begin
- Result:=BOOL(Animate_Open(hwndP,NIL));
-end;
-
-
-// Macro 252
-//#define Animate_Seek(hwnd, frame) Animate_Play(hwnd, frame, frame, 1)
-
-Function Animate_Seek(hwndP :HWND;frame:uint):BOOL;
-
-Begin
- Result:=BOOL(Animate_Play(hwndP,frame,frame,1));
-end;
-
-// Macro 253
-//#define MonthCal_GetCurSel(hmc, pst) (BOOL)SNDMSG(hmc, MCM_GETCURSEL, 0, (LPARAM)(pst))
-
-function MonthCal_GetCurSel(hwndMC:HWND; lpSysTime :LPSYSTEMTIME):Bool;
-
-begin
- Result:=BOOL(SendMessage(hwndmc, MCM_GETCURSEL , 0, LPARAM(lpsystime)));
-end;
-
-// Macro 254
-//#define MonthCal_SetCurSel(hmc, pst) (BOOL)SNDMSG(hmc, MCM_SETCURSEL, 0, (LPARAM)(pst))
-
-function MonthCal_SetCurSel(hwndMC:HWND; lpSysTime :LPSYSTEMTIME):Bool; inline;
-
-begin
- Result:=BOOL(SendMessage(hwndmc, MCM_SETCURSEL, 0, LPARAM(lpsystime)));
-end;
-
-function MonthCal_SetCurSel(hwndMC:HWND; var lpSysTime :SYSTEMTIME):Bool; inline;
-
-begin
- Result:=BOOL(SendMessage(hwndmc, MCM_SETCURSEL, 0, LPARAM(@lpsystime)));
-end;
-
-// Macro 255
-//#define MonthCal_GetMaxSelCount(hmc) (DWORD)SNDMSG(hmc, MCM_GETMAXSELCOUNT, 0, DWord(0))
-
-function MonthCal_GetMaxSelCount(hwndMC:HWND):Bool;
-
-begin
- Result:=BOOL(SendMessage(hwndmc, MCM_GETMAXSELCOUNT, 0, LPARAM(0)));
-end;
-
-// Macro 256
-//#define MonthCal_SetMaxSelCount(hmc, n) (BOOL)SNDMSG(hmc, MCM_SETMAXSELCOUNT, (WPARAM)(n), DWord(0))
-
-function MonthCal_SetMaxSelCount(hwndMC:HWND;n:uint):Bool;
-
-begin
- Result:=BOOL(SendMessage(hwndmc, MCM_SETMAXSELCOUNT,WPARAM(N), LPARAM(0)));
-end;
-
-// Macro 257
-//#define MonthCal_GetSelRange(hmc, rgst) SNDMSG(hmc, MCM_GETSELRANGE, 0, (LPARAM)(rgst))
-
-function MonthCal_GetSelRange(hwndMC:HWND; lpSysTime :LPSYSTEMTIME):Bool;
-
-begin
- Result:=BOOL(SendMessage(hwndmc, MCM_GETSELRANGE,WPARAM(0), LPARAM(lpsystime)));
-end;
-
-// Macro 258
-//#define MonthCal_SetSelRange(hmc, rgst) SNDMSG(hmc, MCM_SETSELRANGE, 0, (LPARAM)(rgst))
-
-function MonthCal_SetSelRange(hwndMC:HWND; lpSysTime :LPSYSTEMTIME):Bool;
-
-begin
- Result:=BOOL(SendMessage(hwndmc, MCM_SETSELRANGE,WPARAM(0), LPARAM(lpsystime)));
-end;
-
-
-// Macro 259
-//#define MonthCal_GetMonthRange(hmc, gmr, rgst) (DWORD)SNDMSG(hmc, MCM_GETMONTHRANGE, (WPARAM)(gmr), (LPARAM)(rgst))
-
-function MonthCal_GetMonthRange(hwndMC:HWND; gmr: DWORD;lpSysTime :LPSYSTEMTIME):Bool;
-
-begin
- Result:=BOOL(SendMessage(hwndmc, MCM_GETMONTHRANGE,WPARAM(gmr), LPARAM(lpsystime)));
-end;
-
-// Macro 260
-//#define MonthCal_SetDayState(hmc, cbds, rgds) SNDMSG(hmc, MCM_SETDAYSTATE, (WPARAM)(cbds), (LPARAM)(rgds))
-
-function MonthCal_SetDayState(hwndMC:HWND; gmr: Longint;lpDay :LPMONTHDAYSTATE):Bool;
-
-begin
- Result:=BOOL(SendMessage(hwndmc, MCM_SETDAYSTATE,WPARAM(gmr), LPARAM(lpDay)));
-end;
-
-// Macro 261
-// #define MonthCal_GetMinReqRect(hmc, prc) SNDMSG(hmc, MCM_GETMINREQRECT, 0, (LPARAM)(prc))
-
-function MonthCal_GetMinReqRect(hwndMC:HWND; lpr :LPRect):Bool;inline;
-
-begin
- Result:=BOOL(SendMessage(hwndmc, MCM_GETMINREQRECT,0, LPARAM(lpr)));
-end;
-
-function MonthCal_GetMinReqRect(hwndMC:HWND;var lpr :TRect):Bool;inline;
-
-begin
- Result:=BOOL(SendMessage(hwndmc, MCM_GETMINREQRECT,0, LPARAM(@lpr)));
-end;
-
-// Macro 262
-// #define MonthCal_SetColor(hmc, iColor, clr) SNDMSG(hmc, MCM_SETCOLOR, iColor, clr)
-
-function MonthCal_SetColor(hwndMC:HWND; ic:longint;clr:COLORREF):DWORD;inline;
-
-begin
- Result:=DWORD(SendMessage(hwndmc, MCM_SETCOLOR,ic, LPARAM(clr)));
-end;
-
-// Macro 263
-// #define MonthCal_GetColor(hmc, iColor) SNDMSG(hmc, MCM_GETCOLOR, iColor, 0)
-
-function MonthCal_GetColor(hwndMC:HWND; ic:longint):Bool;
-
-begin
- Result:=BOOL(SendMessage(hwndmc, MCM_GETCOLOR,ic, 0));
-end;
-
-// Macro 264
-// #define MonthCal_SetToday(hmc, pst) SNDMSG(hmc, MCM_SETTODAY, 0, (LPARAM)(pst))
-
-function MonthCal_SetToday(hwndMC:HWND; lps:LPSYSTEMTIME):Bool;
-
-begin
- Result:=BOOL(SendMessage(hwndmc, MCM_SETTODAY,0, LPARAM(lps)));
-end;
-
-// Macro 265
-// #define MonthCal_GetToday(hmc, pst) (BOOL)SNDMSG(hmc, MCM_GETTODAY, 0, (LPARAM)(pst))
-
-function MonthCal_GetToday(hwndMC:HWND; lps:LPSYSTEMTIME):Bool;
-
-begin
- Result:=BOOL(SendMessage(hwndmc, MCM_GETTODAY,0, LPARAM(lps)));
-end;
-
-
-// Macro 266
-// #define MonthCal_HitTest(hmc, pinfo) \
-// SNDMSG(hmc, MCM_HITTEST, 0, (LPARAM)(PMCHITTESTINFO)(pinfo))
-
-FUNCTION MonthCal_HitTest( hmc :HWND ; pinfo : PMCHITTESTINFO):DWORD;
-
-Begin
- Result:=DWORD(SendMessage(hmc, MCM_HITTEST, 0, LPARAM(pinfo)));
-end;
-
-
-// Macro 267
-// #define MonthCal_SetFirstDayOfWeek(hmc, iDay) \
-// SNDMSG(hmc, MCM_SETFIRSTDAYOFWEEK, 0, iDay)
-
-function MonthCal_SetFirstDayOfWeek( hmc : HWND ; iDay :LONGINT ):DWORD;
-
-Begin
- Result:=SendMessage(hmc, MCM_SETFIRSTDAYOFWEEK, 0, iDay);
-end;
-
-
-// Macro 268
-// #define MonthCal_GetFirstDayOfWeek(hmc) \
-// (DWORD)SNDMSG(hmc, MCM_GETFIRSTDAYOFWEEK, 0, 0)
-
-Function MonthCal_GetFirstDayOfWeek( hmc : HWND ):DWORD;
-
-Begin
- Result:=DWORD(SendMessage(hmc, MCM_GETFIRSTDAYOFWEEK, 0, 0))
-end;
-
-
-// Macro 269
-// #define MonthCal_GetRange(hmc, rgst) \
-// (DWORD)SNDMSG(hmc, MCM_GETRANGE, 0, (LPARAM)(rgst))
-
-Function MonthCal_GetRange( hmc : HWND ; rgst : LPSYSTEMTIME):DWORD;
-
-Begin
- Result:=DWORD(SendMessage(hmc, MCM_GETRANGE, 0, lparam(rgst)));
-end;
-
-
-// Macro 270
-// #define MonthCal_SetRange(hmc, gd, rgst) \
-// (BOOL)SNDMSG(hmc, MCM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
-
-Function MonthCal_SetRange( hmc : HWND ; gd : DWORD; rgst : LPSYSTEMTIME):BOOL;
-
-Begin
- Result:=BOOL(SendMessage(hmc, MCM_SETRANGE, gd,LPARAM(rgst)))
-end;
-
-
-// Macro 271
-// #define MonthCal_GetMonthDelta(hmc) \
-// (int)SNDMSG(hmc, MCM_GETMONTHDELTA, 0, 0)
-
-Function MonthCal_GetMonthDelta( hmc :hwnd ):cint;
-
-Begin
- Result:=cint(SendMessage(hmc, MCM_GETMONTHDELTA, 0, 0))
-end;
-
-
-// Macro 272
-// #define MonthCal_SetMonthDelta(hmc, n) \
-// (int)SNDMSG(hmc, MCM_SETMONTHDELTA, n, 0)
-
-Function MonthCal_SetMonthDelta( hmc :hwnd ; n :cint ):cint;
-
-Begin
- Result:=cint(SendMessage(hmc, MCM_SETMONTHDELTA, n, 0))
-end;
-
-
-// Macro 273
-
-// #define MonthCal_GetMaxTodayWidth(hmc) \
-// (DWORD)SNDMSG(hmc, MCM_GETMAXTODAYWIDTH, 0, 0)
-
-Function MonthCal_GetMaxTodayWidth( hmc :hwnd ):DWORD;
-
-Begin
- Result:=DWORD(SendMessage(hmc, MCM_GETMAXTODAYWIDTH, 0, 0))
-end;
-
-
-// Macro 274
-// #define MonthCal_SetUnicodeFormat(hwnd, fUnicode) \
-// (BOOL)SNDMSG((hwnd), MCM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
-
-Function MonthCal_SetUnicodeFormat( hwnd : hwnd; fUnicode : bool):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), MCM_SETUNICODEFORMAT, wparam(fUnicode), 0))
-end;
-
-
-// Macro 275
-
-// #define MonthCal_GetUnicodeFormat(hwnd) \
-// (BOOL)SNDMSG((hwnd), MCM_GETUNICODEFORMAT, 0, 0)
-
-Function MonthCal_GetUnicodeFormat( hwnd : hwnd):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), MCM_GETUNICODEFORMAT, 0, 0))
-end;
-
-
-// Macro 276
-// #define DateTime_GetSystemtime(hdp, pst) (DWORD)SNDMSG(hdp, DTM_GETSYSTEMTIME, 0, (LPARAM)(pst))
-
-// Macro 277
-
-//#define DateTime_SetSystemtime(hdp, gd, pst) (BOOL)SNDMSG(hdp, DTM_SETSYSTEMTIME, (WPARAM)(gd), (LPARAM)(pst))
-function DateTime_SetSystemTime(hdp: HWND; gd: DWORD; const pst: TSystemTime): BOOL;inline;
-begin
- result:=BOOL(SendMessage(hdp, DTM_SETSYSTEMTIME, WPARAM(gd), LPARAM(@pst)));
-end;
-
-// Macro 278
-
-//#define DateTime_GetRange(hdp, rgst) (DWORD)SNDMSG(hdp, DTM_GETRANGE, 0, (LPARAM)(rgst))
-
-// Macro 279
-
-//#define DateTime_SetRange(hdp, gd, rgst) (BOOL)SNDMSG(hdp, DTM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
-function DateTime_SetRange(hdp: HWND; gdtr: DWORD; rgst: PSystemTime): BOOL;inline;
-begin
- result:=BOOL(SendMessage(hdp, DTM_SETRANGE, WPARAM(gdtr), LPARAM(rgst)));
-end;
-
-// Macro 280
-
-//#define DateTime_SetFormat(hdp, sz) (BOOL)SNDMSG(hdp, DTM_SETFORMAT, 0, (LPARAM)(sz))
-
-// Macro 281
-
-//#define DateTime_SetMonthCalColor(hdp, iColor, clr) SNDMSG(hdp, DTM_SETMCCOLOR, iColor, clr)
-function DateTime_SetMonthCalColor(hdp: HWND; iColor: DWORD; clr: TColorRef): TColorRef;inline;
-begin
- result:=TColorRef(SendMessage(hdp, DTM_SETMCCOLOR, iColor, clr));
-end;
-
-// Macro 282
-
-//#define DateTime_GetMonthCalColor(hdp, iColor) SNDMSG(hdp, DTM_GETMCCOLOR, iColor, 0)
-
-// Macro 283
-
-//#define DateTime_GetMonthCal(hdp) (HWND)SNDMSG(hdp, DTM_GETMONTHCAL, 0, 0)
-function DateTime_GetMonthCal(hdp: HWND): HWND;inline;
-begin
- result:=HWND(SendMessage(hdp, DTM_GETMONTHCAL, 0, 0));
-end;
-
-// Macro 284
-
-//#define DateTime_SetMonthCalFont(hdp, hfont, fRedraw) SNDMSG(hdp, DTM_SETMCFONT, (WPARAM)(hfont), (LPARAM)(fRedraw))
-
-// Macro 285
-
-//#define DateTime_GetMonthCalFont(hdp) SNDMSG(hdp, DTM_GETMCFONT, 0, 0)
-
-// Macro 286
-
-//#define MAKEIPRANGE(low, high) ((LPARAM)(WORD)(((BYTE)(high) << 8) + (BYTE)(low)))
-
-// Macro 287
-
-//#define MAKEIPADDRESS(b1,b2,b3,b4) ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
-
-// Macro 288
-
-//#define FIRST_IPADDRESS(x) ((x>>24) & 0xff)
-
-// Macro 289
-
-//#define SECOND_IPADDRESS(x) ((x>>16) & 0xff)
-
-// Macro 290
-
-//#define THIRD_IPADDRESS(x) ((x>>8) & 0xff)
-
-// Macro 291
-
-//#define FOURTH_IPADDRESS(x) (x & 0xff)
-
-// Macro 292
-
-//#define Pager_SetChild(hwnd, hwndChild) \
-// (void)SNDMSG((hwnd), PGM_SETCHILD, 0, (LPARAM)(hwndChild))
-
-Procedure Pager_SetChild( hwnd : hwnd; hwndChild : LPARAM);
-
-Begin
-SendMessage((hwnd), PGM_SETCHILD, 0, hwndChild)
-end;
-
-
-// Macro 293
-
-//#define Pager_RecalcSize(hwnd) \
-// (void)SNDMSG((hwnd), PGM_RECALCSIZE, 0, 0)
-
-Procedure Pager_RecalcSize( hwnd : hwnd);
-
-Begin
-SendMessage((hwnd), PGM_RECALCSIZE, 0, 0)
-end;
-
-
-// Macro 294
-
-//#define Pager_ForwardMouse(hwnd, bForward) \
-// (void)SNDMSG((hwnd), PGM_FORWARDMOUSE, (WPARAM)(bForward), 0)
-
-Procedure Pager_ForwardMouse( hwnd : hwnd; bForward : WPARAM);
-
-Begin
-SendMessage((hwnd), PGM_FORWARDMOUSE, bForward, 0)
-end;
-
-
-// Macro 295
-
-//#define Pager_SetBkColor(hwnd, clr) \
-// (COLORREF)SNDMSG((hwnd), PGM_SETBKCOLOR, 0, (LPARAM)(clr))
-
-Function Pager_SetBkColor( hwnd : hwnd; clr : LPARAM):COLORREF;
-
-Begin
- Result:=COLORREF(SendMessage((hwnd), PGM_SETBKCOLOR, 0, clr))
-end;
-
-
-// Macro 296
-
-//#define Pager_GetBkColor(hwnd) \
-// (COLORREF)SNDMSG((hwnd), PGM_GETBKCOLOR, 0, 0)
-
-Function Pager_GetBkColor( hwnd : hwnd):COLORREF;
-
-Begin
- Result:=COLORREF(SendMessage((hwnd), PGM_GETBKCOLOR, 0, 0))
-end;
-
-
-// Macro 297
-
-//#define Pager_SetBorder(hwnd, iBorder) \
-// (int)SNDMSG((hwnd), PGM_SETBORDER, 0, (LPARAM)(iBorder))
-
-Function Pager_SetBorder( hwnd : hwnd; iBorder : LPARAM):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), PGM_SETBORDER, 0, iBorder))
-end;
-
-
-// Macro 298
-// #define Pager_GetBorder(hwnd) \
-// (int)SNDMSG((hwnd), PGM_GETBORDER, 0, 0)
-
-Function Pager_GetBorder( hwnd : hwnd):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), PGM_GETBORDER, 0, 0))
-end;
-
-
-// Macro 299
-
-//#define Pager_SetPos(hwnd, iPos) \
-// (int)SNDMSG((hwnd), PGM_SETPOS, 0, (LPARAM)(iPos))
-
-Function Pager_SetPos( hwnd : hwnd; iPos : LPARAM):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), PGM_SETPOS, 0, iPos))
-end;
-
-
-// Macro 300
-
-//#define Pager_GetPos(hwnd) \
-// (int)SNDMSG((hwnd), PGM_GETPOS, 0, 0)
-
-Function Pager_GetPos( hwnd : hwnd):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), PGM_GETPOS, 0, 0))
-end;
-
-
-// Macro 301
-
-//#define Pager_SetButtonSize(hwnd, iSize) \
-// (int)SNDMSG((hwnd), PGM_SETBUTTONSIZE, 0, (LPARAM)(iSize))
-
-Function Pager_SetButtonSize( hwnd : hwnd; iSize : LPARAM):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), PGM_SETBUTTONSIZE, 0, iSize))
-end;
-
-
-// Macro 302
-
-//#define Pager_GetButtonSize(hwnd) \
-// (int)SNDMSG((hwnd), PGM_GETBUTTONSIZE, 0,0)
-
-Function Pager_GetButtonSize( hwnd : hwnd):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), PGM_GETBUTTONSIZE, 0,0))
-end;
-
-
-// Macro 303
-
-//#define Pager_GetButtonState(hwnd, iButton) \
-// (DWORD)SNDMSG((hwnd), PGM_GETBUTTONSTATE, 0, (LPARAM)(iButton))
-
-Function Pager_GetButtonState( hwnd : hwnd; iButton : LPARAM):DWORD;
-
-Begin
- Result:=DWORD(SendMessage((hwnd), PGM_GETBUTTONSTATE, 0, iButton))
-end;
-
-
-// Macro 304
-// #define Pager_GetDropTarget(hwnd, ppdt) \
-// (void)SNDMSG((hwnd), PGM_GETDROPTARGET, 0, (LPARAM)(ppdt))
-
-Procedure Pager_GetDropTarget( hwnd : hwnd; ppdt : LPARAM);
-
-Begin
-SendMessage((hwnd), PGM_GETDROPTARGET, 0, ppdt)
-end;
-
-
-// Macro 305
-// #define Button_GetIdealSize(hwnd, psize)\
-// (BOOL)SNDMSG((hwnd), BCM_GETIDEALSIZE, 0, (LPARAM)(psize))
-
-Function Button_GetIdealSize( hwnd : hwnd; psize : LPARAM):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), BCM_GETIDEALSIZE, 0, psize))
-end;
-
-
-// Macro 306
-// #define Button_SetImageList(hwnd, pbuttonImagelist)\
-// (BOOL)SNDMSG((hwnd), BCM_SETIMAGELIST, 0, (LPARAM)(pbuttonImagelist))
-
-Function Button_SetImageList( hwnd : hwnd; pbuttonImagelist : LPARAM):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), BCM_SETIMAGELIST, 0, pbuttonImagelist))
-end;
-
-// Macro 307
-// #define Button_GetImageList(hwnd, pbuttonImagelist)\
-// (BOOL)SNDMSG((hwnd), BCM_GETIMAGELIST, 0, (LPARAM)(pbuttonImagelist))
-
-Function Button_GetImageList( hwnd : hwnd; pbuttonImagelist : LPARAM):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), BCM_GETIMAGELIST, 0, pbuttonImagelist))
-end;
-
-
-// Macro 308
-// #define Button_SetTextMargin(hwnd, pmargin)\
-// (BOOL)SNDMSG((hwnd), BCM_SETTEXTMARGIN, 0, (LPARAM)(pmargin))
-
-Function Button_SetTextMargin( hwnd : hwnd; pmargin : LPARAM):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), BCM_SETTEXTMARGIN, 0, pmargin))
-end;
-
-
-// Macro 309
-// #define Button_GetTextMargin(hwnd, pmargin)\
-// (BOOL)SNDMSG((hwnd), BCM_GETTEXTMARGIN, 0, (LPARAM)(pmargin))
-
-Function Button_GetTextMargin( hwnd : hwnd; pmargin : LPARAM):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), BCM_GETTEXTMARGIN, 0, pmargin))
-end;
-
-
-// Macro 310
-// #define Edit_SetCueBannerText(hwnd, lpcwText) \
-// (BOOL)SNDMSG((hwnd), EM_SETCUEBANNER, 0, (LPARAM)(lpcwText))
-
-Function Edit_SetCueBannerText( hwnd : hwnd; lpcwText : LPARAM):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), EM_SETCUEBANNER, 0, lpcwText))
-end;
-
-
-// Macro 311
-//#define Edit_GetCueBannerText(hwnd, lpwText, cchText) \
-// (BOOL)SNDMSG((hwnd), EM_GETCUEBANNER, (WPARAM)(lpwText), (LPARAM)(cchText))
-
-Function Edit_GetCueBannerText( hwnd : hwnd; lpwText : WPARAM; cchText : LPARAM):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), EM_GETCUEBANNER, lpwText, cchText))
-end;
-
-
-// Macro 312
-// #define Edit_ShowBalloonTip(hwnd, peditballoontip) \
-// (BOOL)SNDMSG((hwnd), EM_SHOWBALLOONTIP, 0, (LPARAM)(peditballoontip))
-
-Function Edit_ShowBalloonTip( hwnd : hwnd; peditballoontip : LPARAM):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), EM_SHOWBALLOONTIP, 0, peditballoontip))
-end;
-
-
-// Macro 313
-// #define Edit_HideBalloonTip(hwnd) \
-// (BOOL)SNDMSG((hwnd), EM_HIDEBALLOONTIP, 0, 0)
-
-Function Edit_HideBalloonTip( hwnd : hwnd):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), EM_HIDEBALLOONTIP, 0, 0))
-end;
-
-
-// Macro 314
-//#define ComboBox_SetMinVisible(hwnd, iMinVisible) \
-// (BOOL)SNDMSG((hwnd), CB_SETMINVISIBLE, (WPARAM)iMinVisible, 0)
-
-Function ComboBox_SetMinVisible( hwnd : hwnd; iMinVisible : WPARAM):BOOL;
-
-Begin
- Result:=BOOL(SendMessage((hwnd), CB_SETMINVISIBLE, iMinVisible, 0))
-end;
-
-
-// Macro 315
-// #define ComboBox_GetMinVisible(hwnd) \
-// (int)SNDMSG((hwnd), CB_GETMINVISIBLE, 0, 0)
-
-Function ComboBox_GetMinVisible( hwnd : hwnd):cint;
-
-Begin
- Result:=cint(SendMessage((hwnd), CB_GETMINVISIBLE, 0, 0))
-end;
-
-{$ifdef win32vista}
-function TreeView_GetNextSelected(hwnd:hwnd; hitem:HTREEITEM):HTREEITEM;inline;
-begin
- result:=TreeView_GetNextItem(hwnd, hitem, TVGN_NEXTSELECTED)
-end;
-{$endif}
-
-{$ifdef win32vista}
-function Button_SetDropDownState(hwnd:HWND; fDropDown:BOOL) : BOOL;
-Begin
- Result:=BOOL(SendMessage((hwnd), BCM_SETDROPDOWNSTATE, WPARAM(fDropDown), 0));
-end;
-
-function Button_SetSplitInfo(hwnd:HWND; pInfo:PBUTTON_SPLITINFO):BOOL;
-Begin
- Result:=BOOL(SendMessage((hwnd), BCM_SETSPLITINFO, 0, LPARAM(pInfo)));
-end;
-
-function Button_GetSplitInfo(hwnd:HWND; pInfo:PBUTTON_SPLITINFO) :BOOL;
-Begin
- Result:=BOOL(SendMessage((hwnd), BCM_GETSPLITINFO, 0, LPARAM(pInfo)));
-end;
-
-function Button_SetNote(hwnd:HWND; psz:LPCWSTR) :BOOL;
-Begin
- Result:=BOOL(SendMessage((hwnd), BCM_SETNOTE, 0, LPARAM(psz)));
-end;
-
-function Button_GetNote(hwnd:HWND; psz:LPCWSTR; pcc:cint) :BOOL;
-Begin
- Result:=BOOL(SendMessage((hwnd), BCM_GETNOTE, WPARAM(pcc), LPARAM(psz)));
-end;
-
-function Button_GetNoteLength(hwnd:HWND) :LRESULT;
-Begin
- Result:=LRESULT(SendMessage((hwnd), BCM_GETNOTELENGTH, 0, 0));
-end;
-
-// Macro to use on a button or command link to display an elevated icon
-
-function Button_SetElevationRequiredState(hwnd:HWND; fRequired:BOOL) :LRESULT;
-Begin
- Result:=LRESULT(SendMessage((hwnd), BCM_SETSHIELD, 0, LPARAM(fRequired)));
-end;
-{$endif}
-{$ifdef win32vista}
-procedure Edit_SetHilite(hwndCtl:hwnd; ichStart:Wparam; ichEnd:lparam);
-begin
- sendmessage(hwndctl, EM_SETHILITE, (ichStart), (ichEnd));
-end;
-
-function Edit_GetHilite(hwndCtl:hwnd):Dword;
-begin
- result:=SendMessage((hwndCtl), EM_GETHILITE, 0, 0);
-end;
-{$endif}
-
-{$ifdef ntddi_vista}
-function MonthCal_GetCurrentView(hmc:HWND):DWORD;
-Begin
- Result:=DWord(SendMessage(hmc, MCM_GETCURRENTVIEW, 0, 0));
-end;
-
-function MonthCal_GetCalendarCount(hmc:HWND):DWORD;
-Begin
- Result:=DWord(SendMessage(hmc,MCM_GETCALENDARCOUNT, 0, 0));
-end;
-
-function MonthCal_GetCalendarGridInfo(hmc:HWND; pmc:pMCGRIDINFO):BOOL;
-Begin
- Result:=BOOL(SendMessage(hmc, MCM_GETCALENDARGRIDINFO, 0, LPARAM(PMCGRIDINFO(pmc))));
-end;
-
-function MonthCal_GetCALID(hmc:HWND):CALID;
-Begin
- Result:=CALID(SendMessage(hmc, MCM_GETCALID, 0, 0));
-end;
-
-function MonthCal_SetCALID(hmc:HWND; calid:cuint):LRESULT;
-Begin
- Result:=LRESULT(SendMessage(hmc, MCM_SETCALID, WPARAM(calid), 0));
-end;
-
-function MonthCal_SizeRectToMin(hmc:HWND; prc:prect):LRESULT;
-Begin
- Result:=LRESULT(SendMessage(hmc, MCM_SIZERECTTOMIN, 0, LPARAM(prc)));
-end;
-
-function MonthCal_SetCalendarBorder(hmc:HWND; fset:bool; xyborder:cint):LRESULT;
-Begin
- Result:=LRESULT(SendMessage(hmc, MCM_SETCALENDARBORDER, WPARAM(fset), LPARAM(xyborder)));
-end;
-
-function MonthCal_GetCalendarBorder(hmc:HWND):cint;
-Begin
- Result:=cint(SendMessage(hmc, MCM_GETCALENDARBORDER, 0, 0));
-end;
-
-function MonthCal_SetCurrentView(hmc:HWND; dwNewView:DWord):BOOL;
-Begin
- Result:=BOOL(SendMessage(hmc, MCM_SETCURRENTVIEW, 0, LPARAM(dwNewView)));
-end;
-
-{$endif}
-
-{$ifdef NTDDI_VISTA}
-function DateTime_SetMonthCalStyle(hdp:HWND; dwStyle:DWord):LResult;
-Begin
- Result:=LRESULT(SendMessage(hdp,DTM_SETMCSTYLE, 0, LPARAM(dwStyle)));
-end;
-
-function DateTime_GetMonthCalStyle(hdp:HWND):LRESULT;
-Begin
- Result:=LRESULT(SendMessage(hdp,DTM_GETMCSTYLE, 0, 0));
-end;
-
-function DateTime_CloseMonthCal(hdp:HWND):LRESULT;
-Begin
- Result:=LRESULT(SendMessage(hdp,DTM_CLOSEMONTHCAL, 0, 0));
-end;
-
-// DateTime_GetDateTimePickerInfo(HWND hdp, DATETIMEPICKERINFO* pdtpi)
-// Retrieves information about the selected date time picker.
-
-function DateTime_GetDateTimePickerInfo(hdp:HWND; pdtpi:PDATETIMEPICKERINFO):LRESULT;
-Begin
- Result:=LRESULT(SendMessage(hdp, DTM_GETDATETIMEPICKERINFO, 0, LPARAM(pdtpi)));
-end;
-
-function DateTime_GetIdealSize(hdp:HWND; ps:PSIZE): LResult;
-Begin
- Result:=LRESULT(SendMessage(hdp, DTM_GETIDEALSIZE, 0, LPARAM(ps)));
-end;
-
-{$endif}
-
-// Macro 284
-procedure DateTime_SetMonthCalFont(hdp:HWND; hfont:HFONT; fRedraw:LPARAM);
-begin
- SendMessage(hdp, DTM_SETMCFONT, WPARAM(hfont), LPARAM(fRedraw));
-end;
-
-// Macro 285
-function DateTime_GetMonthCalFont(hdp:HWND):HFONT;
-begin
- Result:=HFONT(SendMessage(hdp, DTM_GETMCFONT, 0, 0));
-end;
-
-const
- comctl32lib = 'comctl32.dll';
-
-var
- comctl32handle: THandle = 0;
-
-function _TaskDialogIndirect(const pTaskConfig: PTASKDIALOGCONFIG; pnButton: PInteger; pnRadioButton: PInteger; pfVerificationFlagChecked: PBOOL): HRESULT; stdcall;
-begin
- Result := E_NOTIMPL;
-end;
-
-function _TaskDialog(hwndParent: HWND; hInstance: HINST; pszWindowTitle: PCWSTR; pszMainInstruction: PCWSTR; pszContent: PCWSTR;
- dwCommonButtons: TASKDIALOG_COMMON_BUTTON_FLAGS; pszIcon: PCWSTR; pnButton: PInteger): HRESULT; stdcall;
-begin
- Result := E_NOTIMPL;
-end;
-
-procedure Initialize;
-var
- p: Pointer;
-begin
- // Defaults
- Pointer(TaskDialogIndirect) := @_TaskDialogIndirect;
- Pointer(TaskDialog) := @_TaskDialog;
-
- comctl32handle := LoadLibrary(comctl32lib);
- if comctl32handle <> 0 then
- begin
- p := GetProcAddress(comctl32handle, 'TaskDialogIndirect');
- if p <> nil
- then Pointer(TaskDialogIndirect) := p;
-
- p := GetProcAddress(comctl32handle, 'TaskDialog');
- if p <> nil
- then Pointer(TaskDialog) := p;
- end;
-end;
-
-procedure Finalize;
-begin
- if comctl32handle <> 0 then
- FreeLibrary(comctl32handle);
- comctl32handle := 0;
-end;
-
-initialization
- Initialize;
-Finalization
- Finalize;
-End.
diff --git a/plugins/mRadio/i_bass.inc b/plugins/mRadio/i_bass.inc
deleted file mode 100644
index 77f0d3650a..0000000000
--- a/plugins/mRadio/i_bass.inc
+++ /dev/null
@@ -1,940 +0,0 @@
-{BASS dll code}
-const
- signMP3 = $FBFF;
- signID3 = $00334449;
- signOGG = $5367674F;
- OGGHdrSize = 26; // +1=NumSegments
-const
- BASSName = 'bass.dll';
- StationHeader:PByte=nil;
-const
- basspath:PWideChar=nil;
-var
- hdrlen:integer;
- syncMETA,
- syncOGG,
- syncWMA,
- syncWMA1,
- syncEND:HSYNC;
- SaveHeader:bool;
-
-procedure SetSndVol(arg:integer);
-begin
- if arg<0 then
- arg:=gVolume
- else
- gVolume:=arg;
-
- if chan<>0 then
- begin
- if arg<0 then arg:=0;
- BASS_ChannelSetAttribute(chan,BASS_ATTRIB_VOL,arg/100);
- end;
-end;
-
-procedure BassError(text:PWideChar);
-begin
- MessageboxW(0,TranslateW(text),TranslateW('Sorry!'),MB_ICONERROR)
-end;
-
-procedure ErrorCustom(text:pWideChar=nil);
-var
- buf:array [0..255] of WideChar;
- idx:integer;
- pcw:pWideChar;
-begin
- idx:=BASS_ErrorGetCode();
- if (idx<0) or (idx>BASS_ERROR_MAXNUMBER) then
- begin
- if text=nil then
- pcw:='Unknown error'
- else
- pcw:=text;
- end
- else
- pcw:=FastAnsiToWideBuf(BASS_ERRORS[idx],@buf);
-
- MessageBoxW(0,TranslateW(pcw),
- TranslateW('Oops! BASS error'),MB_ICONERROR)
-end;
-
-procedure EQ_OFF;
-var
- i:dword;
-begin
- if chan<>0 then
- for i:=0 to 9 do
- BASS_ChannelRemoveFX(chan,eq[i].fx);
- isEQ_OFF:=BST_CHECKED;
-end;
-
-procedure EQ_ON;
-var
- i:dword;
-begin
- if chan<>0 then
- begin
- for i:=0 to 9 do
- eq[i].fx:=BASS_ChannelSetFX(chan,BASS_FX_DX8_PARAMEQ,1);
- for i:=0 to 9 do
- BASS_FXSetParameters(eq[i].fx,@eq[i].param);
- isEQ_OFF:=BST_UNCHECKED;
- end;
-end;
-
-function MyLoadBASS(root:PwideChar;custom:pWideChar):bool;
-var
- pc:PWideChar;
- buf:array [0..MAX_PATH-1] of WideChar;
-begin
- result:=true;
- mGetMem(basspath,1024);
- pc:=StrCopyEW(basspath,custom);
- if (pc-1)^<>'\' then
- begin
- pc^:='\';
- inc(pc);
- end;
- StrCopyW(pc,BASSName);
- if not Load_BASSDLL(basspath) then
- begin
- pc:=StrCopyW(StrCopyEW(basspath,root),BASSName);
- if not Load_BASSDLL(basspath) then
- begin
- pc:=StrCopyW(StrCopyEW(pc,'plugins\'),BASSName);
- if not Load_BASSDLL(basspath) then
- begin
- pc:=StrCopyW(StrCopyEW(pc,'bass\'),BASSName);
- if not Load_BASSDLL(basspath) then
- begin
- if (custom<>nil) and (custom^<>#0) then
- BassError('BASS.DLL not found!');
- result:=false;
- end;
- end;
- end;
- end;
-
- if (not result) and ((custom=nil) or (custom^=#0)) then
- begin
- if MessageboxA(0,Translate('BASS.DLL not found! Choose BASS.dll path manually'),
- cPluginName,MB_YESNO)=IDYES then
- begin
- pc := nil;
- if SelectDirectory(TranslateW('Choose BASS.dll path'),pc,0) then
- begin
- CallService(MS_UTILS_PATHTORELATIVEW,wparam(pc),lparam(@buf));
- pc:=StrCopyEW(basspath,buf);
- if (pc-1)^<>'\' then
- begin
- pc^:='\';
- inc(pc);
- end;
- pc^:=#0;
- DBWriteUnicode(0,PluginName,optBASSPath,basspath);
- StrCopyW(pc,BASSName);
-
- if not Load_BASSDLL(basspath) then
- BassError('BASS.DLL not found!')
- else
- result:=true;
- end;
-
- end;
- end;
-
- if result then
- begin
- if (BASS_GetVersion shr 16)<BASSVERSION then
- begin
- Unload_BASSDLL;
- result:=false;
- BassError('Wrong version of BASS.DLL');
- end
- else
- begin
- pc^:=#0; // cut BASSName
- exit;
- end;
- end;
- mFreeMem(basspath);
-end;
-
-procedure MyStopBASS;
-begin
- if ActiveContact<>0 then
- begin
- if syncMETA<>0 then
- begin
- BASS_ChannelRemoveSync(chan,syncMETA);
- syncMETA:=0
- end;
- if syncEND<>0 then
- begin
- BASS_ChannelRemoveSync(chan,syncEND);
- syncEND:=0
- end;
- if syncWMA<>0 then
- begin
- BASS_ChannelRemoveSync(chan,syncWMA);
- syncWMA:=0
- end;
- if syncOGG<>0 then
- begin
- BASS_ChannelRemoveSync(chan,syncOGG);
- syncOGG:=0
- end;
- if syncWMA1<>0 then
- begin
- BASS_ChannelRemoveSync(chan,syncWMA1);
- syncWMA1:=0
- end;
- end;
-end;
-
-procedure MyFreeBASS;
-begin
- MyStopBASS;
- BASS_Free;
- BASS_PluginFree(0);
-end;
-
-procedure StopStation;
-begin
- if chan<>0 then
- BASS_StreamFree(chan); // close old stream
- chan:=0;
- mFreeMem(StationHeader);
- mFreeMem(ActiveURLw);
- DBDeleteSetting(ActiveContact,strCList,optStatusMsg);
- MyStopBASS;
-end;
-
-function MyInitBASS:int;
-var
- fd:TWin32FindDataW;
- fh:THANDLE;
- buf:array [0..MAX_PATH-1] of WideChar;
-// buf1:array [0..31] of WideChar;
- pc:PWideChar;
- p:Bool;
-begin
- if Inited then
- begin
- result:=1;
- exit;
- end;
-
- Inited:=true;
- BASS_Free;
- p:=BASS_Init(-1,44100,BASS_DEVICE_3D,0,nil);
- if not p then
- p:=BASS_Init(-1,44100,0,0,nil);
- if not p then
- p:=BASS_Init(1,44100,0,0,nil);
- if not p then
- begin
- ErrorCustom('Can''t initialize device');
- result:=0;
- end
- else
- begin
- pc:=StrCopyW(StrCopyEW(buf,basspath),'bass*.dll');
- fh:=FindFirstFileW(buf,fd);
- if fh<>INVALID_HANDLE_VALUE then
- begin
- repeat
- StrCopyW(pc,fd.cFileName);
- if BASS_PluginLoad(pAnsiChar(@buf),BASS_UNICODE)=0 then
- until not FindNextFileW(fh,fd);
- FindClose(fh);
- end;
- // enable ASX processing (if WMA loaded)
- BASS_SetConfig(BASS_CONFIG_NET_PLAYLIST, 2); // 2 - enable internet and local playlists
-
- fh:=DBReadByte(0,PluginName,optEAXType,0);
- if fh=0 then
- BASS_SetEAXParameters(-1,0,-1,-1)
- else
- BASS_SetEAXPreset(EAXItems[fh].code);
- result:=1;
- end;
-end;
-
-function GetMusicFormat:PAnsiChar;
-var
- bci:BASS_CHANNELINFO;
-begin
- BASS_ChannelGetInfo(chan,bci);
- case bci.ctype of
- BASS_CTYPE_STREAM_OGG: result:='OGG';
- BASS_CTYPE_STREAM_MP1,
- BASS_CTYPE_STREAM_MP2,
- BASS_CTYPE_STREAM_MP3: result:='MP3';
- BASS_CTYPE_STREAM_WMA,
- BASS_CTYPE_STREAM_WMA_MP3: result:='WMA';
- {BASS_CTYPE_STREAM_AAC,}$10b00: result:='AAC';
- {BASS_CTYPE_STREAM_MP4:}$10b01: result:='MP4';
- {BASS_CTYPE_STREAM_AC3:}$11000: result:='AC3';
- else
- result:=nil;
- end;
-end;
-
-function GetFileExt(buf:pWideChar;sign:pointer):pWideChar;
-var
- pc:pAnsiChar;
-begin
- result:=buf;
- pc:=GetMusicFormat;
- if pc=nil then
- begin
- StrCopyW(buf,'sav');
- if sign<>nil then
- begin
- if pdword(sign)^=signOGG then
- StrCopyW(buf,'ogg')
- else if ((pdword(sign)^ and $00FFFFFF)=signID3) or (pword(sign)^=signMP3) then
- StrCopyW(buf,'mp3');
- end;
- end
- else
- begin
- FastAnsiToWideBuf(pc,buf);
- LowerCase(buf);
- end;
-end;
-
-function MakeFileName(sign:pointer):pWideChar;
-var
- p,pcw:PWideChar;
- buf:pWideChar;
-begin
-// allocate buffer
- mGetMem(buf,MAX_PATH*SizeOf(WideChar));
-// path
- if recpath<>nil then
- begin
- ConvertFileName(recpath,buf,ActiveContact);
-// pcw:=ParseVarString(recpath,ActiveContact);
-// CallService(MS_UTILS_PATHTOABSOLUTEW,dword(pcw),dword(buf));
-// mFreeMem(pcw);
- if not ForceDirectories(buf) then
- begin
- result:=nil;
- exit;
- end;
- pcw:=StrEndW(buf);
- if (pcw-1)^<>'\' then
- begin
- pcw^:='\';
- inc(pcw);
- end;
- end
- else
- pcw:=buf;
-// name
-//!!
- p:=MakeMessage;
- pcw:=StrCopyEW(pcw,p);
- mFreeMem(p);
- if (pcw=buf) or ((pcw-1)^='\') then
- pcw:=StrEndW(IntToHex(pcw,GetCurrentTime));
-// ext
- pcw^:='.'; inc(pcw);
- GetFileExt(pcw,sign);
-
- result:=buf;
-end;
-
-procedure StatusProc(buffer:Pointer;len,user:DWORD); stdcall;
-var
- pc:pWideChar;
- pb:PByte;
- i,sum:integer;
- flag:bool;
- doRecord:bool;
-begin
- flag:=true;
- doRecord:=CallService(MS_RADIO_COMMAND,MRC_RECORD,LPARAM(-1))<>0;
- if (buffer<>nil) and (len<>0) and SaveHeader then
- begin
- SaveHeader:=false;
- if pdword(buffer)^=signOGG then // if header ALL in buffer
- begin
- pb:=buffer;
- flag:=false;
- repeat
- inc(pb,OGGHdrSize);
- i:=pb^; //patterns
- sum:=0;
- inc(pb);
- while i>0 do
- begin
- inc(sum,pb^);
- inc(pb);
- dec(i);
- end;
- inc(pb,sum); //here must be next sign
- flag:=not flag;
- until not flag;
- hdrlen:=PAnsiChar(pb)-PAnsiChar(buffer);
- mGetMem(StationHeader,hdrlen);
- move(buffer^,StationHeader^,hdrlen);
- end;
- end;
- if (buffer=nil) or not doRecord then // end of stream or stop record
- begin
- if not doRecord or (doContRec=BST_UNCHECKED) then
- if hRecord<>0 then
- begin
- if buffer<>nil then // write tail
- BlockWrite(hRecord,buffer^,len);
- CloseHandle(hRecord);
- hRecord:=0;
- end;
- end
- else
- begin
- if len=0 then // HTTP or ICY tags
- begin
-{
-while PAnsiChar(buffer)^<>#0 do
-begin
-messagebox(0,PAnsiChar(buffer),'ICY-HTTP',0);
-while PAnsiChar(buffer)^<>#0 do inc(PAnsiChar(buffer)); inc(PAnsiChar(buffer));
-end;
-}
- end
- else
- begin
- if doRecord then
- begin
- if hRecord=0 then
- begin
- pc:=MakeFileName(StationHeader);
- if pc<>nil then
- hRecord:=Rewrite(pc)
- else
- hRecord:=THANDLE(INVALID_HANDLE_VALUE);
- if hRecord=THANDLE(INVALID_HANDLE_VALUE) then
- hRecord:=0
- else if flag and (StationHeader<>nil) then
- begin
- BlockWrite(hRecord,StationHeader^,hdrlen);
-// permissible to skip to the next Page (OggS) but this is not necessary
- end;
- mFreeMem(pc);
- end;
- if hRecord<>0 then
- BlockWrite(hRecord,buffer^,len);
- end;
- end;
- end;
-end;
-
-{$IFDEF Debug}
-procedure logmeta(tag,a,b:pansiChar);
-var
- f:thandle;
- p:pansichar;
-begin
- f:=Append(pansichar('mradio.log'));
- BlockWrite(f,tag^,StrLen(tag));
- p:=#13#10; BlockWrite(f,p^,StrLen(p));
- BlockWrite(f,a^,StrLen(a));
- p:=#13#10; BlockWrite(f,p^,StrLen(p));
- BlockWrite(f,b^,StrLen(b));
- p:=#13#10; BlockWrite(f,p^,StrLen(p));
- p:=#13#10; BlockWrite(f,p^,StrLen(p));
- CloseHandle(f);
-end;
-{$ENDIF}
-
-function DoMeta(meta:PAnsiChar;TagType:int_ptr):Boolean;
-var
- pcw:pWideChar;
- buf:array [0..511] of AnsiChar;
- artist,title:PAnsiChar;
- oldartist,oldtitle:pAnsiChar;
- ppc,pc:pAnsiChar;
- idx,lcp:integer;
- needtofree:Boolean;
- CurDescrW:PWideChar;
- old:boolean;
-
-// tag:PAnsiChar;
- gotartist,gottitle:boolean; // indicate what we got artist/title
-begin
- result:=false;
-
- if meta=nil then
- meta:=BASS_ChannelGetTags(chan,TagType);
- if meta<>nil then
- begin
- // for cases when artist or title presents but empty
- gotartist:=false;
- gottitle :=false;
- needtofree:=false;
- lcp:=CP_UTF8;
- buf[0]:=#0;
- artist:=nil;
- title :=nil;
- CurDescrW:=nil;
-
-//tag:=meta;
- case TagType of
- BASS_TAG_WMA_META: begin
- pc:=StrPos(meta,'data=');
- if pc=meta then
- begin
- pc:=StrPos(meta,'artist=');
- if pc<>nil then
- begin
- gotartist:=true;
- mGetMem(artist,256);
- Decode(artist,pc+7);
- end;
-
- pc:=StrPos(meta,'title=');
- if pc<>nil then
- begin
- gottitle:=true;
- mGetMem(title,256);
- Decode(title,pc+6);
- end;
-
- pc:=StrPos(meta,'album=');
- if pc<>nil then
- begin
- end;
-
- pc:=StrPos(meta,'duration=');
- if pc<>nil then
- begin
- end;
-
- if not gotartist then
- begin
- if not gottitle then
- begin
- pc:=StrPos(meta,'caption=');
- if pc<>nil then
- begin
- gottitle:=true;
- mGetMem(title,256);
- Decode(title,pc+8);
- end;
- end;
-
- // analize title/caption for artist-title
- if gottitle then
- begin
- pc:=StrPos(title,' - ');
- if pc=nil then
- pc:=StrScan(title,'-');
- if pc<>nil then
- begin
- artist:=title;
- if pc^=' ' then
- title:=pc+3
- else
- title:=pc+1;
- pc^:=#0;
- CurDescrW:=pWideChar(artist);
- end
- else
- CurDescrW:=pWideChar(title);
- end;
- end
- else
- needtofree:=true;
-
- // to avoid mem leak and wrong tag process
- result:=true;
- end;
- StatusProc(nil,0,0); // split records here
- end;
-
- BASS_TAG_META: begin
-//tag:='SHOUTCAST';
- // SHOUTCAST StreamTitle='xxx';StreamUrl='xxx';
- // "Station=xyz" meta tag="Trackinfo"
- pc:=StrPos(meta,'StreamTitle=');
- if pc<>nil then
- begin
- inc(pc,13);
- ppc:=StrScan(pc,';');
- if (ppc-pc-1)>0 then
- begin
- StrCopy(buf,pc,ppc-pc-1);
- lcp:=GetTextFormat(@buf,ppc-pc-1);
- end;
- end;
- if buf[0]<>#0 then
- begin
- case lcp of
- CP_UTF8: UTF8ToWide(buf,CurDescrW);
- CP_ACP : AnsiToWide(buf,CurDescrW,MirandaCP);
- end;
- end;
-
- gottitle:=true;
- title:=pAnsiChar(CurDescrW);
- pcw:=StrPosW(CurDescrW,' - ');
- if pcw=nil then
- pcw:=StrScanW(CurDescrW,'-');
- if pcw<>nil then
- begin
- artist:=pAnsiChar(CurDescrW);
- if pcw^=' ' then
- title:=pAnsiChar(pcw+3)
- else
- title:=pAnsiChar(pcw+1);
- pcw^:=#0;
- end;
-
- lcp:=CP_UNICODE;
-
- StatusProc(nil,0,0); // split records here
- result:=true;
- end;
-
- BASS_TAG_ID3: begin // not realized, anyway - at the end of track
- end;
-
- BASS_TAG_ID3V2: begin
- end;
-
- BASS_TAG_APE, // not sure, need to check. maybe better process BASS_TAG_APEBINARY
- BASS_TAG_WMA,
- BASS_TAG_OGG: begin
-//tag:='OGG';
- while meta^<>#0 do
- begin
- CharLowerA(StrCopy(buf,meta,10));
- if StrCmp(buf,'title',5)=0 then
- begin
- title:=meta+6;
- gottitle:=true;
- end
- else if StrCmp(buf,'artist',6)=0 then
- begin
- artist:=meta+7;
- gotartist:=true;
- end;
- if gotartist and gottitle then
- break;
- while meta^<>#0 do inc(meta); inc(meta);
- end;
-
- if (not gotartist) and gottitle then
- begin
- pc:=StrPos(title,' - ');
- if pc=nil then
- pc:=StrScan(title,'-');
- if pc<>nil then
- begin
- needtofree:=true;
- StrDup(artist,title,pc-title);
- if pc^=' ' then
- idx:=3
- else
- idx:=1;
- StrDup(title,pc+idx);
- end;
- end;
- buf[0]:=#0;
- end;
- end;
-
- old:=true;
- if gotartist or gottitle then
- begin
- // check for old
- oldartist:=nil;
- oldtitle :=nil;
- case lcp of
- CP_UTF8: begin
- if gotartist then
- begin
- oldartist:=DBReadUTF8(0,PluginName,optArtist);
- if StrCmp(artist,oldartist)<>0 then
- old:=false;
- end;
-
- if old and gottitle then
- begin
- oldtitle:=DBReadUTF8(0,PluginName,optTitle);
- if StrCmp(title,oldtitle)<>0 then
- old:=false;
- end;
-
- if not old then
- begin
- DBWriteUTF8(0,PluginName,optArtist,artist);
- DBWriteUTF8(0,PluginName,optTitle ,title);
- end;
- end;
-
- CP_UNICODE:begin
- if gotartist then
- begin
- oldartist:=pAnsiChar(DBReadUnicode(0,PluginName,optArtist));
- if StrCmpW(pWideChar(artist),pWideChar(oldartist))<>0 then
- old:=false;
- end;
-
- if old and gottitle then
- begin
- oldtitle:=pAnsiChar(DBReadUnicode(0,PluginName,optTitle));
- if StrCmpW(pWideChar(title),pWideChar(oldtitle))<>0 then
- old:=false;
- end;
-
- if not old then
- begin
- DBWriteUnicode(0,PluginName,optArtist,pWideChar(artist));
- DBWriteUnicode(0,PluginName,optTitle ,pWideChar(title));
- end;
- end;
- end;
-{$IFDEF Debug}
-logmeta(tag,artist,title);
-{$ENDIF}
- mFreeMem(oldartist);
- mFreeMem(oldtitle);
- mFreeMem(CurDescrW);
- if needtofree then
- begin
- mFreeMem(artist);
- mFreeMem(title );
- end;
- end;
-
- if not old then
- CallService(MS_RADIO_COMMAND,MRC_STATUS,RD_STATUS_NEWTAG);
- end;
-end;
-
-procedure MetaSync(handle:HSYNC;channel,data:dword;user:pointer); stdcall;
-//var tagtype:Integer;
-begin
-(*
- if handle=syncOGG then tagtype:=BASS_TAG_OGG
- else if handle=syncWMA then tagtype:=BASS_TAG_WMA
- else if handle=syncWMA1 then tagtype:=BASS_TAG_WMA_META
- else {if handle=syncMETA then} tagtype:=BASS_TAG_META;
-*)
- DoMeta(nil{PAnsiChar(data)},int_ptr(user){tagtype});
-end;
-
-procedure EndSync(handle:HSYNC;channel,data:dword;user:pointer); stdcall;
-var
- lContact:cardinal;
-begin
- if RemoteSong then
- begin
- lContact:=ActiveContact;
- CallService(MS_RADIO_COMMAND,MRC_STOP,0);
- CallService(MS_RADIO_COMMAND,MRC_PLAY,lContact)
- end
- else if plist<>nil then CallService(MS_RADIO_COMMAND,MRC_NEXT,0)
- else if doLoop=BST_UNCHECKED then CallService(MS_RADIO_COMMAND,MRC_STOP,0);
-end;
-
-type
- tICYField = record
- name :PAnsiChar;
- branch:PAnsiChar;
- option:PAnsiChar;
- end;
-const
- NumICYFields = 4;
- ICYFields: array [0..NumICYFields-1] of tICYField = (
- (name:'icy-name:' ; branch:'CList' ; option:'MyHandle'),
- (name:'icy-genre:' ; branch:cPluginName ; option:'Genre'),
- (name:'icy-br:' ; branch:cPluginName ; option:'Bitrate'),
- (name:'icy-description'; branch:cPluginName ; option:'About')
- );
-
-procedure ProcessStationData;
-var
- icy:PAnsiChar;
- i,len:integer;
-begin
- // get the broadcast name and bitrate
- icy:=BASS_ChannelGetTags(chan,BASS_TAG_ICY);
- if icy=nil then
- icy:=BASS_ChannelGetTags(chan,BASS_TAG_HTTP); // no ICY tags, try HTTP
- if icy<>nil then
- begin
- while icy^<>#0 do
- begin
- for i:=0 to NumICYFields-1 do
- begin
- with ICYFields[i] do
- begin
- len:=StrLen(name);
- if StrCmp(icy,name,len)=0 then
- begin
- if DBReadStringLength(ActiveContact,branch,option)=0 then
- DBWriteString(ActiveContact,branch,option,icy+len);
- break;
- end;
- end;
- end;
- while icy^<>#0 do inc(icy); inc(icy);
- end;
- end;
-end;
-
-procedure OpenURL(url:PWideChar); cdecl;
-var
- len,progress:DWORD;
- flags:dword;
- i:integer;
- EAXUsed:bool;
- ansiurl:array [0..511] of AnsiChar;
-begin
- if plist=nil then
- CallService(MS_RADIO_COMMAND,MRC_STATUS,RD_STATUS_CONNECT);
-
- EAXUsed:=DBReadByte(0,PluginName,optEAXType,0)<>0;
-
-{}
- for i:=0 to NumTries-1 do
- begin
- if EAXUsed then
- flags:=BASS_STREAM_STATUS or BASS_SAMPLE_3D or BASS_SAMPLE_MONO
- else
- begin
- if ForcedMono<>BST_UNCHECKED then
- flags:=BASS_STREAM_STATUS or BASS_SAMPLE_MONO
- else
- flags:=BASS_STREAM_STATUS;
- end;
-
- flags:=flags or BASS_UNICODE;
- if RemoteSong then
- begin
- SaveHeader:=true;
- chan:=BASS_StreamCreateURL(url,0,flags,@StatusProc,nil)
- end
- else
- begin
- if (plist=nil) and (doLoop<>BST_UNCHECKED) then
- flags:=flags or BASS_SAMPLE_LOOP;
- chan:=BASS_StreamCreateFile(FALSE,url,0,0,flags);
- end;
-
- if (chan=0) and EAXUsed then
- begin
- flags:=flags and not (BASS_SAMPLE_3D or BASS_SAMPLE_MONO);
- if ForcedMono<>BST_UNCHECKED then
- flags:=flags or BASS_SAMPLE_MONO;
-
- if RemoteSong then
- chan:=BASS_StreamCreateURL({ansi}url,0,flags,@StatusProc,nil)
- else
- chan:=BASS_StreamCreateFile(FALSE,url,0,0,flags);
- end;
-
- if (chan=0) and RemoteSong then
- begin
- if BASS_ErrorGetCode=BASS_ERROR_FILEOPEN then
- begin
- flags:=flags and not BASS_UNICODE;
- chan:=BASS_StreamCreateURL(FastWideToAnsiBuf(url,ansiurl),0,flags,@StatusProc,nil)
- end;
- end;
-
- if chan<>0 then break;
- end;
-{}
-
- if chan=0 then
- begin
- if (CallService(MS_RADIO_COMMAND,MRC_STATUS,RD_STATUS_GET)=RD_STATUS_ABORT) or
- (plist=nil) then
- begin
- CallService(MS_RADIO_COMMAND,MRC_STOP,1);
- end
- else if plist<>nil then
- CallService(MS_RADIO_COMMAND,MRC_NEXT,0);
- end
- else
- begin
-
- CallService(MS_RADIO_COMMAND,MRC_STATUS,RD_STATUS_NEWTRACK);
-
- if RemoteSong then
- begin
- if isEQ_OFF=BST_UNCHECKED then
- EQ_ON;
-
-{$IFDEF CHANGE_NAME_BUFFERED}
- icy:=DBReadString(ActiveContact,strCList,optMyHandle);
- mGetMem(url,StrLen(icy)+6);
- StrCopy(url+6,icy);
- mFreeMem(icy);
- url[0]:='[';
- url[1]:=#0;
- url[4]:=']';
- url[5]:=' ';
-{$ENDIF}
- progress:=0;
- repeat
- if CallService(MS_RADIO_COMMAND,MRC_STATUS,RD_STATUS_GET)=RD_STATUS_ABORT then
- begin
- CallService(MS_RADIO_COMMAND,MRC_STOP,1);
- exit;
- end;
- len:=BASS_StreamGetFilePosition(chan,BASS_FILEPOS_END);
- if len=DW_ERROR then
- break;
- progress:=BASS_StreamGetFilePosition(chan, BASS_FILEPOS_DOWNLOAD);
- if progress=dword(-1) then
- break;
- progress:=(progress-
- BASS_StreamGetFilePosition(chan,BASS_FILEPOS_CURRENT))*100 div len;
- // percentage of buffer filled
-{$IFDEF CHANGE_NAME_BUFFERED}
- IntToStr(url+1,progress,2);
- url[3]:='%';
- DBWriteString(ActiveContact,strCList,optMyHandle,url);
-{$ENDIF}
- until progress>sPreBuf;
-{$IFDEF CHANGE_NAME_BUFFERED}
- if url[1]<>#0 then
- DBWriteString(ActiveContact,strCList,optMyHandle,url+6);
- mFreeMem(url);
-{$ENDIF}
-
- ProcessStationData; // process ICY-headers
-
- // get the stream title and set sync for subsequent titles
- DoMeta(nil,BASS_TAG_META);
-
- syncMETA:=BASS_ChannelSetSync(chan,BASS_SYNC_META ,0,@MetaSync,pointer(BASS_TAG_META));
- syncOGG :=BASS_ChannelSetSync(chan,BASS_SYNC_OGG_CHANGE,0,@MetaSync,pointer(BASS_TAG_OGG));
- syncWMA :=BASS_ChannelSetSync(chan,BASS_SYNC_WMA_CHANGE,0,@MetaSync,pointer(BASS_TAG_WMA));
- syncWMA1:=BASS_ChannelSetSync(chan,BASS_SYNC_WMA_META ,0,@MetaSync,pointer(BASS_TAG_WMA_META));
- end
- else
- begin
- if not DoMeta(nil,BASS_TAG_OGG) then
- if not DoMeta(nil,BASS_TAG_ID3V2) then
- if not DoMeta(nil,BASS_TAG_ID3) then
- if not DoMeta(nil,BASS_TAG_APE) then
- ;
-
- end;
-
- syncEND:=BASS_ChannelSetSync(chan,BASS_SYNC_END,0,@EndSync,nil);
-
- SetSndVol(-1);
- // play it!
- BASS_ChannelPlay(chan,FALSE);
- end;
-end;
diff --git a/plugins/mRadio/i_cc.inc b/plugins/mRadio/i_cc.inc
deleted file mode 100644
index deb993ec0c..0000000000
--- a/plugins/mRadio/i_cc.inc
+++ /dev/null
@@ -1,433 +0,0 @@
-{}
-
-function GetStatusText(status:integer;toCList:boolean=false):PWideChar;
-begin
- case status of
- RD_STATUS_PAUSED : result:='paused';
- RD_STATUS_STOPPED: if toCList then result:=nil else result:='stopped';
- RD_STATUS_CONNECT: result:='connecting';
- RD_STATUS_ABORT : result:='aborting';
- RD_STATUS_PLAYING: if toCList then result:=nil else result:='playing';
- else
- result:=nil;
- end;
-end;
-
-procedure ConstructMsg(artist,title:PWideChar;status:integer=-1);
-var
- buf:PWideChar;
- tstrlen,astrlen,statuslen:integer;
- sstatus:PWideChar;
- p:pWideChar;
-begin
- astrlen:=StrLenW(artist);
-
- tstrlen:=0;
- // if need to remove duplicate
- if (title<>nil) and (title^<>#0) then
- begin
- if (astrlen=0) or (StrCmpW(artist,title)<>0) then
- tstrlen:=StrLenW(title);
- end;
- if (astrlen>0) and (tstrlen>0) then
- inc(tstrlen,3);
-
- statuslen:=0;
- if status>=0 then
- begin
- sstatus:=TranslateW(GetStatusText(status,true));
- if sstatus<>nil then
- statuslen:=StrLenW(sstatus)+3;
- end
- else
- sstatus:=nil;
-
- if (astrlen+tstrlen+statuslen)>0 then
- begin
- mGetMem(buf,(astrlen+tstrlen+statuslen+1)*SizeOf(WideChar));
- p:=buf;
- if astrlen>0 then
- p:=StrCopyEW(p,artist);
-
- if tstrlen>0 then
- begin
- if astrlen>0 then
- begin
- p^:=' '; inc(p);
- p^:='-'; inc(p);
- p^:=' '; inc(p);
- end;
- p:=StrCopyEW(p,title);
- end;
-
- if statuslen>0 then
- begin
- p^:=' '; inc(p);
- p^:='('; inc(p);
- p:=StrCopyEW(p,sstatus);
- p^:=')'; inc(p);
- p^:=#0;
- end;
-
- DBWriteUnicode(ActiveContact,strCList,optStatusMsg,buf);
- mFreeMem(buf);
- end
- else
- DBDeleteSetting(ActiveContact,strCList,optStatusMsg);
-end;
-
-{$IFDEF Debug}
-procedure log(a,b:lparam);
-var
- f:thandle;
- buf:array [0..31] of ansichar;
- p:pansichar;
-begin
- f:=Append(pansichar('mradio.log'));
- p:=IntToStr(buf,a); BlockWrite(f,p^,StrLen(p));
- p:=#13#10; BlockWrite(f,p^,StrLen(p));
- p:=IntToStr(buf,b); BlockWrite(f,p^,StrLen(p));
- p:=#13#10; BlockWrite(f,p^,StrLen(p));
- p:=#13#10; BlockWrite(f,p^,StrLen(p));
- CloseHandle(f);
-end;
-{$ENDIF}
-
-function ControlCenter(code:WPARAM;arg:LPARAM):int_ptr; cdecl;
-const
- PlayStatus:int_ptr=RD_STATUS_NOSTATION;
- doRecord:boolean=false;
-var
- tmpbuf,buf1:array [0..MAX_PATH-1] of WideChar;
- plFile:pWideChar;
- plLocal:boolean;
- artist,title:pWideChar;
-begin
- result:=0;
-{$IFDEF Debug}
- log(code,arg);
-{$ENDIF}
- case code of
- MRC_PLAY : begin
- // play new station?
- if arg<>0 then
- begin
- ActiveURLw:=DBReadUnicode(arg,PluginName,optStationURL);
- // no URL for this contact
- if (ActiveURLw=nil) or (ActiveURLw^=#0) then exit;
-
- ActiveContact:=arg;
- RemoteSong:=StrPosW(ActiveURLw,'://')<>nil;
-
- if isPlaylist(ActiveURLw)<>0 then
- begin
-
- if RemoteSong then
- begin
- GetTempPathW(MAX_PATH,tmpbuf);
- GetTempFileNameW(tmpbuf,'mr',GetCurrentTime,buf1);
- if not GetFile(ActiveURLw,buf1,hNetLib) then
- begin
- exit;
- end;
- plFile:=@buf1;
- plLocal:=false;
- end
- else
- begin
- plFile:=ActiveURLw;
- plLocal:=true;
- end;
-
- plist:=CreatePlaylist(plFile);
- if not plLocal then
- DeleteFileW(plFile);
-
- if plist<>nil then
- begin
- if plist.GetCount=0 then
- begin
- plist.Free;
- plist:=nil;
- ActiveContact:=0;
- exit;
- end;
- plist.Shuffle:=doShuffle<>BST_UNCHECKED;
-
- if not plist.Shuffle then
- begin
- if PlayFirst=BST_UNCHECKED then
- plist.Track:=DBReadWord(ActiveContact,PluginName,optCurElement);
- end;
-
- mFreeMem(ActiveURLw);
- ActiveURLw:=plist.GetSong;
- end;
- RemoteSong:=StrPosW(ActiveURLw,'://')<>nil; // coz activeuRLw can be changed
- end
- else
- plist:=nil;
-
- if (ActiveURLw<>nil) and (ActiveURLw^<>#0) then
- begin
- if RemoteSong then
- begin
- if GetWorkOfflineStatus<>0 then
- begin
- BassError('Can''t connect to net. Please, clear ''Work offline'' option in Internet settings');
- ControlCenter(MRC_STATUS,RD_STATUS_NOSTATION);
- exit;
- end;
- end;
- ControlCenter(MRC_STATUS,RD_STATUS_NEWSTATION);
- if Assigned(plist) then
- ControlCenter(MRC_STATUS,RD_STATUS_CONNECT);
- CloseHandle(mir_forkthread(@OpenURL,ActiveURLw));
- end;
- end
- // play current from start
- else if chan<>0 then
- begin
- BASS_ChannelPlay(chan,true);
- code:=MRC_STATUS;
- arg :=RD_STATUS_PLAYING;
- end
- // play playlist entry?
- else if Assigned(plist) and (ActiveURLw<>nil) and (ActiveURLw^<>#0) then
- begin
- CloseHandle(mir_forkthread(@OpenURL,ActiveURLw));
- end;
- end;
-
- MRC_RECORD: begin
- if arg=LPARAM(-1) then
- result:=ord(doRecord)
- else
- begin
- case arg of
- 1: doRecord:=true; // force start
- 2: doRecord:=false; // force stop
- else
- doRecord:=not doRecord;
- end;
- result:=ord(doRecord);
-
- code:=MRC_STATUS;
- arg :=RD_STATUS_RECORD+(result shl 16);
- end;
- end;
-
- MRC_PAUSE: begin
- if chan<>0 then
- begin
- case ControlCenter(MRC_STATUS,RD_STATUS_GET) of
- RD_STATUS_PLAYING: begin
- BASS_ChannelPause(chan);
- arg:=1;
- end;
- RD_STATUS_PAUSED: begin
- BASS_ChannelPlay(chan,false);
- arg:=0;
- end;
- end;
- code:=MRC_STATUS;
- arg :=RD_STATUS_PAUSED+(arg shl 16);
- end
- else
- begin
- ActiveContact:=LoadContact(PluginName,optLastStn);
- if ActiveContact<>0 then
- ControlCenter(MRC_PLAY,ActiveContact);
- end;
- end;
-
- MRC_STOP: begin
- ControlCenter(MRC_RECORD,2);
-
- code:=MRC_STATUS;
- // stop playlist track but not station
- if Assigned(plist) and (arg=0) then
- begin
- if chan<>0 then
- BASS_ChannelStop(chan);
-
- arg:=RD_STATUS_STOPPED;
- end
- else // forced or "normal" stop
- begin
- if Assigned(plist) then
- begin
- DBWriteWord(ActiveContact,PluginName,optCurElement,plist.Track);
- plist.Free;
- plist:=nil;
- end;
- ControlCenter(MRC_STATUS,RD_STATUS_STOPPED);
- // Save station for next autoplay
- SaveContact(ActiveContact,PluginName,optLastStn);
- StopStation;
-
- arg:=RD_STATUS_NOSTATION;
- end;
- end;
-
- MRC_MUTE: begin
- CallService(MS_RADIO_MUTE,0,arg);
- code:=MRC_STATUS;
- arg :=RD_STATUS_MUTED;
- end;
-
- MRC_NEXT: begin
- if Assigned(plist) then
- begin
- StopStation;
- ActiveURLw:=plist.Next;
- ControlCenter(MRC_PLAY,0);
- end;
- end;
-
- MRC_PREV: begin
- if Assigned(plist) then
- begin
- StopStation;
- ActiveURLw:=plist.Previous;
- ControlCenter(MRC_PLAY,0)
- end;
- end;
-
- MRC_SEEK: begin
- if not RemoteSong and (chan<>0) then
- begin
- if integer(arg)=-1 then // get position
- begin
- result:=trunc(BASS_ChannelBytes2Seconds(chan,BASS_ChannelGetPosition(chan,BASS_POS_BYTE)));
- if result<0 then
- result:=0;
- end
- else
- begin
- BASS_ChannelSetPosition(chan,BASS_ChannelSeconds2Bytes(chan,arg),BASS_POS_BYTE);
-
- code:=MRC_STATUS;
- arg :=RD_STATUS_POSITION+(arg shl 16);
- end;
- end;
- end;
- end;
-
- if code=MRC_STATUS then
- begin
- if arg=RD_STATUS_GET then
- result:=PlayStatus
- else
- begin
-
- code:=(arg and $FFFF);
- arg :=hiword(arg);
- // this is just events
- case code of
- RD_STATUS_MUTED: begin
- end;
-
- RD_STATUS_RECORD: begin
- end;
-
- RD_STATUS_POSITION: begin
- end;
-
- else
- // these statuses are for events and some tasks
- artist:=nil;
- title :=nil;
- case code of
- RD_STATUS_NOSTATION: begin
- SetStatus(ActiveContact,ID_STATUS_OFFLINE);
- ActiveContact:=0;
-
- DBDeleteSetting(0,PluginName,optActiveURL);
-
- PlayStatus:=RD_STATUS_NOSTATION;
- // empty message
- end;
-
- RD_STATUS_STOPPED: begin
- if ActiveContact<>0 then //!! fools proof
- DBDeleteSetting(ActiveContact,strCList,optStatusMsg);
-
- DBDeleteSetting(0,PluginName,optTitle);
- DBDeleteSetting(0,PluginName,optArtist);
-
- PlayStatus:=RD_STATUS_STOPPED;
- // empty message
- end;
-
- RD_STATUS_ABORT: begin
- PlayStatus:=RD_STATUS_ABORT;
- // status as message
- end;
-
- RD_STATUS_CONNECT: begin
- SetStatus(ActiveContact,ID_STATUS_AWAY);
- PlayStatus:=RD_STATUS_CONNECT;
- // status as message
- end;
-
- RD_STATUS_NEWSTATION: begin
- arg:=ActiveContact;
- PlayStatus:=RD_STATUS_PLAYING;
- end;
-
- RD_STATUS_NEWTRACK: begin
- SetStatus(ActiveContact,ID_STATUS_ONLINE);
- DBWriteUnicode(0,PluginName,optActiveURL,ActiveURLw);
-
- DBWriteString(0,PluginName,optActiveCodec,GetMusicFormat);
- arg :=lparam(ActiveURLw);
-
- // for case when tags was in meta
- artist:=DBReadUnicode(0,PluginName,optArtist);
- title :=DBReadUnicode(0,PluginName,optTitle);
- PlayStatus:=RD_STATUS_PLAYING;
- // status as message
- end;
-
- RD_STATUS_NEWTAG: begin
- // must be updated tags
- artist:=DBReadUnicode(0,PluginName,optArtist);
- title :=DBReadUnicode(0,PluginName,optTitle);
-
- PlayStatus:=RD_STATUS_PLAYING; // maybe keep RD_STATUS_NEWTAG?
- end;
-
- RD_STATUS_PLAYING: begin
- SetStatus(ActiveContact,ID_STATUS_ONLINE);
- PlayStatus:=RD_STATUS_PLAYING;
- // status as message
- end;
-
- RD_STATUS_PAUSED: begin
- if arg=0 then
- begin
- PlayStatus:=RD_STATUS_PLAYING;
- if StrPosW(ActiveURLw,'://')=nil then //local only
- begin
- artist:=DBReadUnicode(0,PluginName,optArtist);
- title :=DBReadUnicode(0,PluginName,optTitle);
- end;
- end
- else
- PlayStatus:=RD_STATUS_PAUSED;
- // status as message
- end;
- else
- exit;
- end;
- ConstructMsg(artist,title,PlayStatus);
- mFreeMem(artist);
- mFreeMem(title);
- end;
-
- NotifyEventHooks(hhRadioStatus,code,arg);
- end;
-
- end;
-end;
diff --git a/plugins/mRadio/i_frame.inc b/plugins/mRadio/i_frame.inc
deleted file mode 100644
index 89de119d0e..0000000000
--- a/plugins/mRadio/i_frame.inc
+++ /dev/null
@@ -1,242 +0,0 @@
-{mRadio frame}
-const
- frm_back:pAnsiChar = 'Frame background';
-const
- FrameWnd:HWND = 0;
- FrameId:integer = -1;
- OldEditProc:pointer=nil;
- pattern:pWideChar=nil;
- current: THANDLE = 0;
-var
- FrameCtrl:PControl;
- colorhook:THANDLE;
- hbr:HBRUSH;
- frm_bkg:TCOLORREF;
-
-function RadioFrameProc( Sender: PControl; var Msg: TMsg; var Rslt:Integer ): boolean;
-begin
- result:=false;
- rslt:=0;
-
- case Msg.message of
-
- WM_DESTROY: begin
- hVolFrmCtrl:=0;
- DeleteObject(hbr);
- end;
-
- WM_SHOWWINDOW: begin
- Rslt:=1;
- with Sender^ do
- hVolFrmCtrl:=Children[1].Handle;
- end;
-
- WM_CTLCOLORSTATIC: begin
-// SetBkColor(msg.wParam, frm_bkg);
- Rslt:=hbr;
- result:=True;
- end;
-
- WM_CONTEXTMENU: begin
- CallService('mRadio/Settings',0,0);
- end;
-
- WM_HSCROLL: begin
- case loword(msg.wParam) of
- SB_THUMBTRACK: begin
-// gVolume:=Hiword(msg.wParam);
- Service_RadioSetVolume(Hiword(msg.wParam){gVolume},2);
- end;
- SB_ENDSCROLL: begin
-// gVolume:=SendMessage(msg.lParam,TBM_GETPOS,0,0);
- Service_RadioSetVolume({Hiword(msg.wParam)}SendMessage(msg.lParam,TBM_GETPOS,0,0){gVolume},2)
- end;
- end;
- end;
-
- end;
-end;
-
-function DoAction(action:integer):integer;
-begin
- result:=Service_RadioMute(0,1);
-end;
-
-function ColorReload(wParam:WPARAM;lParam:LPARAM):int;cdecl;
-var
- cid:TColourID;
-// wnd:HWND;
-// i:integer;
-begin
- result:=0;
- cid.cbSize:=SizeOf(cid);
- StrCopy(cid.group,cPluginName);
- StrCopy(cid.name ,frm_back);
- frm_bkg:=CallService(MS_COLOUR_GETA,dword(@cid),0);
- if hbr<>0 then DeleteObject(hbr);
- hbr:=CreateSolidBrush(frm_bkg);
-
- FrameCtrl.Children[1].Width := FrameCtrl.Children[1].Width-1;
- FrameCtrl.Children[1].Width := FrameCtrl.Children[1].Width+1;
-
- FrameCtrl.InvalidateEx;
- FrameCtrl.Update;
-end;
-
-function GetIcon(action:integer;stat:integer=AST_NORMAL):cardinal;
-begin
- case stat of
- AST_NORMAL : result:=CallService(MS_SKIN2_GETICON,0,dword(IcoBtnOn));
- AST_PRESSED: result:=CallService(MS_SKIN2_GETICON,0,dword(IcoBtnOff));
- else
- result:=0;
- end;
-end;
-
-procedure MyErase(DummySelf, Sender:PControl; DC:HDC);
-begin
-end;
-
-procedure MyEraseFrame(DummySelf, Sender:PControl; DC:HDC);
-var
- rc:TRECT;
-begin
- GetClientRect(Sender.Handle, rc);
- Sender.Canvas.Brush.Color := frm_bkg;
- Sender.Canvas.FillRect(rc);
-end;
-
-function CreateFrameWindow(parent:HWND):THANDLE;
-var
- TB:PTrackbar;
-begin
- result:=0;
-
- FrameCtrl:=NewAlienPanel(parent,esNone);
- if FrameCtrl<>nil then
- begin
- result:=FrameCtrl.GetWindowHandle;
- with FrameCtrl^ do
- begin
- // Button
- btnMute:=CreateIcoButton(FrameCtrl,GetIcon,DoAction,IDC_RADIO_MUTE);
- with btnMute^ do
- begin
- SetSize(16,16);
- SetPosition(FrameCtrl.Width-18,0);
- Anchor(false,true,true,false);
-
- AsCheckbox:=true;
- end;
-
- // Trackbar
- TB:=NewTrackbar(FrameCtrl,[trbTooltips,trbNoTicks,trbBoth,trbNoBorder],nil);
- with TB^ do
- begin
- SetSize(FrameCtrl.Width-24,18);
- SetPosition(2,0);
- Anchor(true,true,true,false);
-
- RangeMin:=0;
- RangeMax:=100;
- PageSize:=20;
-
- OnEraseBkGnd:=TOnPaint(MakeMethod(nil, @MyErase));
- end;
-
- AttachProc(@RadioFrameProc);
- end;
-
- with FrameCtrl^ do
- begin
- MinWidth :=80;
- MinHeight:=20;
- Height:=18;
- Anchor(true,true,true,true);
-// OnMessage:=TOnMessage(MakeMethod(nil, @MyEraseFrame));
- OnEraseBkGnd:=TOnPaint(MakeMethod(nil, @MyEraseFrame));
-{
- OnPaint :=FrameCtrl.Paint;
- OnResize :=FrameCtrl.FrameResize;
- OnMouseDown:=FrameCtrl.MouseDown;
-}
- end;
- end;
-end;
-
-procedure CreateFrame(parent:HWND);
-var
- Frame:TCLISTFrame;
-// wnd:HWND;
-// tmp:cardinal;
- tr:TRECT;
- cid:TColourID;
-begin
- if ServiceExists(MS_CLIST_FRAMES_ADDFRAME)=0 then
- exit;
- if parent=0 then
- parent:=CallService(MS_CLUI_GETHWND,0,0);
-
- FrameWnd:=CreateFrameWindow(parent);
-
- if FrameWnd<>0 then
- begin
- GetWindowRect(FrameWnd,tr);
- FillChar(Frame,SizeOf(Frame),0);
- with Frame do
- begin
- cbSize :=SizeOf(Frame);
- hWnd :=FrameWnd;
- hIcon :=0;
- align :=alTop;
- height :=tr.bottom-tr.top+2;
- if IsAnsi then
- begin
- Flags :=F_VISIBLE or F_NOBORDER;
- name.a :=cPluginName;
- TBName.a:=cPluginName + ' volume control';
- end
- else
- begin
- Flags :=F_VISIBLE or F_NOBORDER or F_UNICODE;
- name.w :=cPluginName;
- TBName.w:=cPluginName + ' volume control';
- end;
- end;
-
- FrameId:=CallService(MS_CLIST_FRAMES_ADDFRAME,dword(@Frame),0);
- if FrameId>=0 then
- begin
- CallService(MS_CLIST_FRAMES_UPDATEFRAME,FrameId, FU_FMPOS);
-
- cid.cbSize:=SizeOf(cid);
- cid.flags :=0;
- StrCopy(cid.group,cPluginName);
- StrCopy(cid.dbSettingsGroup,cPluginName);
-
- StrCopy(cid.name ,frm_back);
- StrCopy(cid.setting,'frame_back');
- cid.defcolour:=COLOR_3DFACE;
- cid.order :=0;
- ColourRegister(@cid);
-
- hbr:=0;
- colorhook:=HookEvent(ME_COLOUR_RELOAD,@ColorReload);
- ColorReload(0,0);
- Service_RadioSetVolume(gVolume,0);
- end;
- end;
-end;
-
-procedure DestroyFrame;
-begin
- if FrameId>=0 then
- begin
- UnhookEvent(colorhook);
- CallService(MS_CLIST_FRAMES_REMOVEFRAME,FrameId,0);
- FrameId:=-1;
- end;
- FrameCtrl.Free;
- // DestroyWindow(FrameWnd);
- FrameWnd:=0;
-end;
diff --git a/plugins/mRadio/i_frameapi.inc b/plugins/mRadio/i_frameapi.inc
deleted file mode 100644
index 002e2fc142..0000000000
--- a/plugins/mRadio/i_frameapi.inc
+++ /dev/null
@@ -1,234 +0,0 @@
-{mRadio frame}
-const
- frm_back:pAnsiChar = 'Frame background';
-const
- FrameWnd:HWND = 0;
- FrameId:integer = -1;
-var
- colorhook:THANDLE;
- hbr:HBRUSH;
- frm_bkg:TCOLORREF;
- OldBtnWndProc:pointer;
- OldSliderWndProc:pointer;
-
-function QSDlgResizer(Dialog:HWND;lParam:LPARAM;urc:PUTILRESIZECONTROL):int; cdecl;
-begin
- case urc^.wId of
- IDC_RADIO_MUTE: result:=RD_ANCHORX_RIGHT or RD_ANCHORY_CENTRE;
- IDC_RADIO_VOL : result:=RD_ANCHORX_WIDTH or RD_ANCHORY_CENTRE;
- else
- result:=0;
- end;
-end;
-
-function SliderWndProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
-begin
- if hMessage=WM_ERASEBKGND then
- result:=1
- else
- result:=CallWindowProc(OldSliderWndProc, Dialog, hMessage, wParam, lParam);
-end;
-
-function BtnWndProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
-begin
- if hMessage=WM_ERASEBKGND then
- result:=1
- else
- result:=CallWindowProc(OldBtnWndProc, Dialog, hMessage, wParam, lParam);
-end;
-
-function RadioFrameProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
-var
- urd:TUTILRESIZEDIALOG;
- rc:TRECT;
- ti:TTOOLINFOW;
- hwndTooltip:HWND;
-begin
- result:=0;
- case hMessage of
- WM_DESTROY: begin
- hVolFrmCtrl :=0;
- hMuteFrmCtrl:=0;
- DeleteObject(hbr);
- end;
-
- WM_INITDIALOG: begin
- hMuteFrmCtrl:=GetDlgItem(Dialog,IDC_RADIO_MUTE);
- SendMessage(hMuteFrmCtrl, BUTTONSETASFLATBTN,0,0);
- SetButtonIcon(hMuteFrmCtrl,IcoBtnOn);
-
- hwndTooltip:=CreateWindowW(TOOLTIPS_CLASS,nil,TTS_ALWAYSTIP,
- integer(CW_USEDEFAULT),integer(CW_USEDEFAULT),
- integer(CW_USEDEFAULT),integer(CW_USEDEFAULT),
- Dialog,0,hInstance,nil);
-
- FillChar(ti,SizeOf(ti),0);
- ti.cbSize :=sizeof(TOOLINFO);
- ti.uFlags :=TTF_IDISHWND or TTF_SUBCLASS;
- ti.hwnd :=Dialog;
- ti.hinst :=hInstance;
- ti.uId :=hMuteFrmCtrl;
- ti.lpszText:=pWideChar(TranslateW('Mute'));
- SendMessageW(hwndTooltip,TTM_ADDTOOLW,0,tlparam(@ti));
-
- hVolFrmCtrl:=GetDlgItem(Dialog,IDC_RADIO_VOL);
- SendMessage(hVolFrmCtrl,TBM_SETRANGE,0,MAKELONG(0,100));
- SendMessage(hVolFrmCtrl,TBM_SETPAGESIZE,0,20);
- SendMessage(hVolFrmCtrl,TBM_SETPOS,1,gVolume);
-
- OldSliderWndProc:=pointer(SetWindowLongPtrW(hVolFrmCtrl,GWL_WNDPROC,LONG_PTR(@SliderWndProc)));
- OldBtnWndProc :=pointer(SetWindowLongPtrW(hVolFrmCtrl,GWL_WNDPROC,LONG_PTR(@BtnWndProc)));
- end;
-
- WM_SIZE: begin
- FillChar(urd,SizeOf(TUTILRESIZEDIALOG),0);
- urd.cbSize :=SizeOf(urd);
- urd.hwndDlg :=Dialog;
- urd.hInstance :=hInstance;
- urd.lpTemplate:=MAKEINTRESOURCEA(IDD_FRAME);
- urd.lParam :=0;
- urd.pfnResizer:=@QSDlgResizer;
- CallService(MS_UTILS_RESIZEDIALOG,0,tlparam(@urd));
- end;
-
- WM_ERASEBKGND: begin
- GetClientRect(Dialog,rc);
- FillRect(wParam,rc,hbr);
- result:=1;
- end;
-
- WM_CTLCOLORSTATIC: begin
- if THANDLE(lParam)=hVolFrmCtrl then
- begin
- SetBkColor(wParam, frm_bkg);
- result:=hbr;
- end;
- end;
-
- WM_CONTEXTMENU: begin
- CallService(cPluginName + '/Settings',0,0);
- end;
-
- WM_COMMAND: begin
- case wParam shr 16 of
-
- BN_CLICKED: begin
- case loword(wParam) of
- IDC_RADIO_MUTE: begin
- Service_RadioMute(0,1);
- end;
- end;
- end;
- end;
- end;
-
- WM_HSCROLL: begin
-// gVolume:=SendMessage(lParam,TBM_GETPOS,0,0);
- Service_RadioSetVolume(SendMessage(lParam,TBM_GETPOS,0,0){gVolume},2)
- end;
-
- else
- result:=DefWindowProc(Dialog,hMessage,wParam,lParam);
- end;
-end;
-
-function ColorReload(wParam:WPARAM;lParam:LPARAM):int;cdecl;
-var
- cid:TColourID;
- wnd:HWND;
-begin
- result:=0;
- cid.cbSize:=SizeOf(cid);
- StrCopy(cid.group,cPluginName);
- StrCopy(cid.name ,frm_back);
- frm_bkg:=CallService(MS_COLOUR_GETA,twparam(@cid),0);
- if hbr<>0 then DeleteObject(hbr);
- hbr:=CreateSolidBrush(frm_bkg);
-
- wnd:=GetFocus();
- InvalidateRect(hVolFrmCtrl,nil,true);
- SetFocus(hVolFrmCtrl);
- RedrawWindow(FrameWnd,nil,0,RDW_INVALIDATE or RDW_ALLCHILDREN or RDW_ERASE);
- SetFocus(wnd);
-end;
-
-procedure CreateFrame(parent:HWND);
-var
- Frame:TCLISTFrame;
- wnd:HWND;
- tmp:cardinal;
- tr:TRECT;
- cid:TColourID;
-begin
- if ServiceExists(MS_CLIST_FRAMES_ADDFRAME)=0 then
- exit;
- if parent=0 then
- parent:=CallService(MS_CLUI_GETHWND,0,0);
-
- if FrameWnd=0 then
- FrameWnd:=CreateDialog(hInstance,MAKEINTRESOURCE(IDD_FRAME),parent,@RadioFrameProc);
-
- if FrameWnd<>0 then
- begin
- GetWindowRect(FrameWnd,tr);
- FillChar(Frame,SizeOf(Frame),0);
- with Frame do
- begin
- cbSize :=SizeOf(Frame);
- hWnd :=FrameWnd;
- hIcon :=0;
- align :=alTop;
- height :=tr.bottom-tr.top+2;
- if IsAnsi then
- begin
- Flags :=F_VISIBLE or F_NOBORDER;
- name.a :=cPluginName;
- TBName.a:=cPluginName + ' volume control';
- end
- else
- begin
- Flags :=F_VISIBLE or F_NOBORDER or F_UNICODE;
- name.w :=cPluginName;
- TBName.w:=cPluginName + ' volume control';
- end;
- end;
-
- FrameId:=CallService(MS_CLIST_FRAMES_ADDFRAME,wparam(@Frame),0);
- if FrameId>=0 then
- begin
- CallService(MS_CLIST_FRAMES_UPDATEFRAME,FrameId, FU_FMPOS);
-
- wnd:=CallService(MS_CLUI_GETHWND{MS_CLUI_GETHWNDTREE},0,0);
- tmp:=SendMessage(wnd,CLM_GETEXSTYLE,0,0);
- SendMessage(wnd,CLM_SETEXSTYLE,tmp or CLS_EX_SHOWSELALWAYS,0);
-
- cid.cbSize:=SizeOf(cid);
- cid.flags :=0;
- StrCopy(cid.group,cPluginName);
- StrCopy(cid.dbSettingsGroup,cPluginName);
-
- StrCopy(cid.name ,frm_back);
- StrCopy(cid.setting,'frame_back');
- cid.defcolour:=COLOR_3DFACE;
- cid.order :=0;
- ColourRegister(@cid);
-
- hbr:=0;
- colorhook:=HookEvent(ME_COLOUR_RELOAD,@ColorReload);
- ColorReload(0,0);
- Service_RadioSetVolume(gVolume,0);
- end;
- end;
-end;
-
-procedure DestroyFrame;
-begin
- if FrameId>=0 then
- begin
- UnhookEvent(colorhook);
- CallService(MS_CLIST_FRAMES_REMOVEFRAME,FrameId,0);
- FrameId:=-1;
- end;
- DestroyWindow(FrameWnd);
- FrameWnd:=0;
-end;
diff --git a/plugins/mRadio/i_hotkey.inc b/plugins/mRadio/i_hotkey.inc
deleted file mode 100644
index 04271fe824..0000000000
--- a/plugins/mRadio/i_hotkey.inc
+++ /dev/null
@@ -1,61 +0,0 @@
-{}
-const
- hRadioHotkey:THANDLE=0;
-const
- MS_RADIO_HOTKEY:PAnsiChar = 'mRadio/Hotkey';
-
- HKN_PLAYPAUSE :PAnsiChar = 'mRadio_PlayPause';
- HKN_STOP :PAnsiChar = 'mRadio_Stop';
- HKN_MUTE :PAnsiChar = 'mRadio_Mute';
-
- DefRadioKeyMute = ((HOTKEYF_EXT or HOTKEYF_SHIFT) shl 8) or ORD('M');
- DefRadioKeyPlay = ((HOTKEYF_EXT or HOTKEYF_SHIFT) shl 8) or ORD('P');
- DefRadioKeyStop = ((HOTKEYF_EXT or HOTKEYF_SHIFT) shl 8) or ORD('S');
-
-function mRadio_Hotkey(wParam:WPARAM;lParam:LPARAM):int_ptr; cdecl;
-begin
- if lParam=MRC_MUTE then
- result:=Service_RadioMute(0,0)
- else
- result:=CallService(MS_RADIO_COMMAND,lParam,0);
-end;
-
-procedure RegisterHotKey;
-var
- hkrec:HOTKEYDESC;
-begin
- hRadioHotkey:=CreateServiceFunction(MS_RADIO_HOTKEY,@mRadio_Hotkey);
-
- FillChar(hkrec,SizeOf(hkrec),0);
-
- hkrec.cbSize :=HOTKEYDESC_SIZE_V1;
- hkrec.pszSection.a :=PluginName;
- hkrec.pszService :=MS_RADIO_HOTKEY;
-
- hkrec.DefHotKey :=DefRadioKeyPlay;
- hkrec.pszName :=HKN_PLAYPAUSE;
- hkrec.pszDescription.a:='Play/Pause';
- hkrec.lParam :=MRC_PAUSE;
- CallService(MS_HOTKEY_REGISTER,0,lparam(@hkrec));
-
- hkrec.DefHotKey :=DefRadioKeyStop;
- hkrec.pszName :=HKN_STOP;
- hkrec.pszDescription.a:='Stop';
- hkrec.lParam :=MRC_STOP;
- CallService(MS_HOTKEY_REGISTER,0,lparam(@hkrec));
-
- hkrec.DefHotKey :=DefRadioKeyMute;
- hkrec.pszName :=HKN_MUTE;
- hkrec.pszDescription.a:='Mute';
- hkrec.lParam :=MRC_MUTE;
- CallService(MS_HOTKEY_REGISTER,0,lparam(@hkrec));
-end;
-
-procedure UnregisterHotKey;
-begin
- CallService(MS_HOTKEY_UNREGISTER,0,lparam(HKN_PLAYPAUSE));
- CallService(MS_HOTKEY_UNREGISTER,0,lparam(HKN_STOP));
- CallService(MS_HOTKEY_UNREGISTER,0,lparam(HKN_MUTE));
-
- DestroyServiceFunction(hRadioHotkey);
-end;
diff --git a/plugins/mRadio/i_myservice.inc b/plugins/mRadio/i_myservice.inc
deleted file mode 100644
index b8338a0d81..0000000000
--- a/plugins/mRadio/i_myservice.inc
+++ /dev/null
@@ -1,178 +0,0 @@
-{My services}
-
-function Service_RadioPlayStop(wParam:WPARAM;lParam:LPARAM):int;cdecl;
-var
- p:PAnsiChar;
- lnew:bool;
- hContact:THANDLE;
- cni:TCONTACTINFO;
- i:integer;
-begin
- result:=0;
- if lParam=0 then
- begin
- if wParam=0 then
- wParam:=GetCListSelContact;
- p:=GetContactProtoAcc(wParam);
- if (p=nil) or (StrCmp(p,PluginName)<>0) then
- exit;
- hContact:=wParam;
- end
- // wParam = station name
- else
- begin
- FillChar(cni,SizeOf(cni),0);
- cni.cbSize :=sizeof(cni);
- if lParam=1 then
- cni.dwFlag:=CNF_DISPLAY
- else
- cni.dwFlag:=CNF_DISPLAY or CNF_UNICODE;
- cni.szProto :=PluginName;
-
- hContact:=CallService(MS_DB_CONTACT_FINDFIRST,0,0);
- while hContact<>0 do
- begin
- p:=PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0));
- if (p<>nil) and (StrCmp(p,PluginName)=0) then
- begin
- cni.hContact:=hContact;
- if CallService(MS_CONTACT_GETCONTACTINFO,0,tlparam(@cni))=0 then
- begin
- if lParam=1 then
- i:=StrCmp(pAnsiChar(wParam),cni.retval.szVal.a)
- else
- i:=StrCmpW(pWideChar(wParam),cni.retval.szVal.w);
- mir_free(cni.retval.szVal.w);
- if i=0 then
- break;
- end;
- end;
- hContact:=CallService(MS_DB_CONTACT_FINDNEXT,hContact,0);
- end;
- end;
-
- if hContact<>0 then
- begin
- result:=1;
- if PluginStatus=ID_STATUS_OFFLINE then
- Service_SetStatus(ID_STATUS_ONLINE,0);
-
- case CallService(MS_RADIO_COMMAND,MRC_STATUS,RD_STATUS_GET) of
- RD_STATUS_CONNECT: begin //break while connect
- CallService(MS_RADIO_COMMAND,MRC_STATUS,RD_STATUS_ABORT);
- exit;
- end;
- RD_STATUS_ABORT: exit;
- end;
-
- lnew:=ActiveContact<>hContact;
-
- if ActiveContact<>0 then
- CallService(MS_RADIO_COMMAND,MRC_STOP,1);
-
- if lnew then
- CallService(MS_RADIO_COMMAND,MRC_PLAY,hContact);
- end;
-end;
-
-function Service_RadioSettings(wParam:WPARAM;lParam:LPARAM):int;cdecl;
-var
- ood:TOPENOPTIONSDIALOG;
-begin
- result:=0;
- ood.cbSize:=SizeOf(ood);
- ood.pszGroup:='Network';
- ood.pszPage :=PluginName;
- ood.pszTab :=Translate('Advanced');
- CallService(MS_OPT_OPENOPTIONS,0,tlparam(@ood));
-end;
-
-function Service_RadioRecord(wParam:WPARAM;lParam:LPARAM):int;cdecl;
-begin
- if lParam<>0 then lParam:=TLPARAM(-1) else lParam:=0;
-
- result:=CallService(MS_RADIO_COMMAND,MRC_RECORD,lParam);
-end;
-
-function Service_RadioGetVolume(wParam:WPARAM;lParam:LPARAM):int;cdecl;
-begin
- result:=gVolume;
-end;
-
-function Service_RadioSetVolume(wParam:WPARAM;lParam:LPARAM):int;cdecl;
-begin
- result:=Service_RadioGetVolume(0,0);
- SetSndVol(wParam);
-
- DBWriteByte(0,PluginName,optVolume,ABS(wParam));
- if lParam<>2 then // not from Frame
- if hVolFrmCtrl<>0 then
- SendMessage(hVolFrmCtrl,TBM_SETPOS,1,ABS(wParam));
-
- if lParam<>1 then // not from Settings
- if hVolCtrl<>0 then
- SendMessage(hVolCtrl,TBM_SETPOS,1,ABS(wParam));
-
-end;
-
-function Service_RadioMute(wParam:WPARAM;lParam:LPARAM):int;cdecl;
-var
-{$IFDEF KOL_MCK}
- med:TMouseEventData;
-{$ELSE}
- tmp:pAnsiChar;
-{$ENDIF}
-begin
- if gVolume=0 then
- gVolume:=-1
- else
- gVolume:=-gVolume;
- Result:=Service_RadioSetVolume(gVolume,0);
- if hVolFrmCtrl<>0 then
- EnableWindow(hVolFrmCtrl,gVolume>=0);
-
-{$IFDEF KOL_MCK}
- if lParam=0 then // 0 - from Service, not frame
- begin
- if btnMute<>nil then
- begin
- FillChar(med,SizeOf(med),0);
- med.Button:=mbLeft;
- med.StopHandling:=true;
- btnMute.OnMouseDown(btnMute,med);
- // btnMute.Click; // without click processing
- btnMute.OnMouseUp (btnMute,med);
- btnMute.Invalidate;
- end
- end;
-{$ELSE}
- if hMuteFrmCtrl<>0 then
- begin
- if gVolume<0 then
- tmp:=IcoBtnOff
- else
- tmp:=IcoBtnOn;
- SetButtonIcon(hMuteFrmCtrl,tmp);
- end;
-{$ENDIF}
-end;
-
-function Service_EqOnOff(wParam:WPARAM;lParam:LPARAM):int;cdecl;
-begin
- result:=ord(isEQ_OFF=BST_UNCHECKED);
- case wParam of
- 0: begin
- if isEQ_OFF=BST_UNCHECKED then
- EQ_OFF
- else
- EQ_ON;
- end;
- 1: EQ_ON;
- else
- EQ_OFF;
- end;
- if eq[0].wnd<>0 then // if options opened
- begin
- CheckDlgButton(GetParent(eq[0].wnd),IDC_EQOFF,isEQ_OFF);
- end;
-end;
diff --git a/plugins/mRadio/i_optdlg.inc b/plugins/mRadio/i_optdlg.inc
deleted file mode 100644
index e047fe20a1..0000000000
--- a/plugins/mRadio/i_optdlg.inc
+++ /dev/null
@@ -1,962 +0,0 @@
-{Options dialog}
-const
- OldEQPreset:integer=-1;
-const
- optOldPreset:pAnsiChar='oldpreset';
- optPresets :pAnsiChar='numpreset';
- optPreset :pAnsiChar='preset_';
- optPreDescr :pAnsiChar='predescr_';
-
-const
- PresetMax = 17;
-
-procedure InitPresets;
-type
- tP = array [0..9] of AnsiChar;
-begin
- StrDupW(Presets[00].name,'Acoustic' ); tP(Presets[00].preset):=#$01#$02#$00#$00#$00#$00#$00#$01#$01#$03;
- StrDupW(Presets[01].name,'Blues' ); tP(Presets[01].preset):=#$01#$02#$01#$00#$00#$00#$00#$00#$00#$FE;
- StrDupW(Presets[02].name,'Classical'); tP(Presets[02].preset):=#$01#$04#$01#$00#$00#$00#$00#$00#$01#$01;
- StrDupW(Presets[03].name,'Country' ); tP(Presets[03].preset):=#$00#$00#$01#$01#$00#$00#$01#$01#$01#$01;
- StrDupW(Presets[04].name,'Dance' ); tP(Presets[04].preset):=#$04#$03#$02#$01#$FF#$FF#$02#$04#$05#$05;
- StrDupW(Presets[05].name,'Folk' ); tP(Presets[05].preset):=#$FF#$00#$00#$01#$01#$00#$01#$01#$01#$00;
- StrDupW(Presets[06].name,'Grunge' ); tP(Presets[06].preset):=#$01#$00#$FF#$00#$00#$02#$01#$FF#$FE#$FD;
- StrDupW(Presets[07].name,'Jazz' ); tP(Presets[07].preset):=#$00#$01#$02#$03#$03#$01#$01#$03#$04#$05;
- StrDupW(Presets[08].name,'Metall' ); tP(Presets[08].preset):=#$FE#$00#$00#$00#$00#$03#$02#$04#$06#$05;
- StrDupW(Presets[09].name,'New Age' ); tP(Presets[09].preset):=#$03#$03#$00#$00#$00#$00#$00#$00#$02#$02;
- StrDupW(Presets[10].name,'Opera' ); tP(Presets[10].preset):=#$00#$01#$02#$04#$01#$02#$00#$00#$00#$00;
- StrDupW(Presets[11].name,'Rap' ); tP(Presets[11].preset):=#$00#$04#$04#$00#$00#$00#$01#$04#$05#$07;
- StrDupW(Presets[12].name,'Reggae' ); tP(Presets[12].preset):=#$03#$00#$FD#$00#$05#$00#$02#$03#$04#$05;
- StrDupW(Presets[13].name,'Rock' ); tP(Presets[13].preset):=#$00#$02#$04#$00#$00#$00#$02#$04#$05#$06;
- StrDupW(Presets[14].name,'Speech' ); tP(Presets[14].preset):=#$FE#$02#$00#$00#$00#$00#$FF#$FE#$FD#$FC;
- StrDupW(Presets[15].name,'Swing' ); tP(Presets[15].preset):=#$FF#$00#$00#$02#$02#$00#$02#$02#$03#$03;
- StrDupW(Presets[16].name,'Techno' ); tP(Presets[16].preset):=#$05#$08#$FF#$FE#$FD#$FF#$04#$06#$06#$06;
-end;
-
-procedure LoadPresets;
-var
- num,preset,descr:array [0..63] of AnsiChar;
- i:integer;
- p,pd:pAnsiChar;
-begin
- p :=StrCopyE(preset,optPreset);
- pd:=StrCopyE(descr ,optPreDescr);
-
- i:=DBReadByte(0,PluginName,optPresets);
- if i=0 then
- begin
- SetLength(Presets,PresetMax);
- InitPresets;
- end
- else
- begin
- OldEQPreset:=integer(DBReadByte(0,PluginName,optOldPreset,byte(-1)));
- SetLength(Presets,i);
- for i:=0 to HIGH(Presets) do
- begin
- StrCopy(p ,IntToStr(num,i)); DBReadStruct (0,PluginName,preset,@Presets[i].preset,10);
- StrCopy(pd,num); Presets[i].name:=DBReadUnicode(0,PluginName,descr);
- end;
- end;
-end;
-
-procedure SavePresets;
-var
- num,preset,descr:array [0..63] of AnsiChar;
- i,j:integer;
- p,pd:pAnsiChar;
-begin
- p :=StrCopyE(preset,optPreset);
- pd:=StrCopyE(descr ,optPreDescr);
- j:=DBReadByte(0,PluginName,optPresets);
- for i:=0 to HIGH(Presets) do
- begin
- StrCopy(p ,IntToStr(num,i)); DBWriteStruct (0,PluginName,preset,@Presets[i].preset,10);
- StrCopy(pd,num); DBWriteUnicode(0,PluginName,descr ,Presets[i].name);
- end;
- while j>Length(Presets) do
- begin
- dec(j);
- StrCopy(p ,IntToStr(num,j)); DBDeleteSetting(0,PluginName,preset);
- StrCopy(pd,num); DBDeleteSetting(0,PluginName,descr);
- end;
- DBWriteByte(0,PluginName,optOldPreset,OldEQPreset);
- DBWriteByte(0,PluginName,optPresets ,Length(Presets));
-end;
-
-procedure FreePresets;
-var
- i:integer;
-begin
- for i:=0 to HIGH(Presets) do
- mFreeMem(Presets[i].name);
-end;
-
-function ImportOneStation(group:PAnsiChar;section:pointer):int;
-var
- p:pWideChar;
- pc:pAnsiChar;
-begin
- result:=0;
- pc:=GetParamSectionStr(section,'URL');
- if pc<>nil then
- begin
- result:=CallService(MS_DB_CONTACT_ADD,0,0);
- if result<>0 then
- begin
- CallService(MS_PROTO_ADDTOCONTACT,result,lparam(PluginName));
- DBWriteString(result,PluginName,optStationURL,pc);
- DBWriteString(result,PluginName,optFirstName ,pc);
-
- pc:=GetParamSectionStr(section,optBitrate,'0');
- DBWriteString(result,PluginName,optBitrate,pc);
- DBWriteWord (result,PluginName,optAge ,StrToInt(pc));
-
- pc:=GetParamSectionStr(section,'Name',GetSectionName(section));
- DBWriteString(result,strCList ,optMyHandle,pc);
- DBWriteString(result,PluginName,optNick ,pc);
-
- pc:=GetParamSectionStr(section,optGenre,'unknown');
- DBWriteString(result,PluginName,optGenre ,pc);
- DBWriteString(result,PluginName,optLastName,pc);
-
- SetStatus(result,ID_STATUS_OFFLINE);
-
- if group=nil then
- group:=GetParamSectionStr(section,optGroup);
-
- AnsiToWide(group,p,MirandaCP);
- CreateGroupW(p,result);
- mFreeMem(p);
- CallService(MS_IGNORE_IGNORE,result,IGNOREEVENT_ALL);
- end;
- end;
-end;
-
-function ImportAll(wParam:WPARAM;lParam:LPARAM):int; cdecl;
-var
- dst:array [0..MAX_PATH-1] of AnsiChar;
- pc:pAnsiChar;
- lstorage,section,list:pointer;
-begin
- result:=0;
- if lParam<>0 then
- StrCopy(dst,PAnsiChar(lParam));
- if (lParam<>0) or ShowDlg(dst,'radio.ini',nil,true) then
- begin
- lstorage:=OpenStorage(dst);
- if lstorage<>nil then
- begin
- list:=GetSectionList(lstorage);
-
- pc:=list;
- while pc^<>#0 do
- begin
- section:=SearchSection(lstorage,pc);
- if ImportOneStation(pAnsiChar(wParam),section)<>0 then inc(result);
- while pc^<>#0 do inc(pc);
- inc(pc);
- end;
-
- FreeSectionList(list);
-
- CloseStorage(lstorage);
- end;
- end;
-end;
-
-procedure ExportRadioContact(num:integer;fname:PAnsiChar;hContact:THANDLE);
-var
- pc:pAnsiChar;
- section:array [0..15] of AnsiChar;
-begin
- IntToStr(section,num);
- pc:=DBReadString(hContact,strCList,optMyHandle);
- WritePrivateProfileStringA(section,'Name',pc,fname);
- mFreeMem(pc);
-
- pc:=DBReadString(hContact,PluginName,optStationURL);
- WritePrivateProfileStringA(section,'URL',pc,fname);
- mFreeMem(pc);
-
- pc:=DBReadString(hContact,PluginName,optGenre);
- if pc<>nil then
- begin
- WritePrivateProfileStringA(section,optGenre,pc,fname);
- mFreeMem(pc);
- end;
-
- pc:=DBReadString(hContact,PluginName,optBitrate);
- if pc<>nil then
- begin
- WritePrivateProfileStringA(section,optBitrate,pc,fname);
- mFreeMem(pc);
- end;
-
- pc:=DBReadString(hContact,strCList,optGroup);
- if pc<>nil then
- begin
- WritePrivateProfileStringA(section,optGroup,pc,fname);
- mFreeMem(pc);
- end;
-end;
-
-function ExportAll(wParam:WPARAM;lParam:LPARAM):int; cdecl;
-var
- dst:array [0..MAX_PATH-1] of AnsiChar;
- hContact:THANDLE;
-begin
- result:=0;
- if lParam<>0 then
- StrCopy(dst,PAnsiChar(lParam));
- if (lParam<>0) or ShowDlg(dst,'radio.ini',nil,false) then
- begin
- if (wParam<>0) and (CallService(MS_DB_CONTACT_IS,wParam,0)<>0) then
- begin
- result:=1;
- ExportRadioContact(result,dst,wParam)
- end
- else
- begin
- hContact:=CallService(MS_DB_CONTACT_FINDFIRST,0,0);
- while hContact<>0 do
- begin
- if StrCmp(PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0)),
- PluginName)=0 then
- begin
- inc(result);
- ExportRadioContact(result,dst,hContact);
- end;
- hContact:=CallService(MS_DB_CONTACT_FINDNEXT,hContact,0);
- end;
- end;
- end;
-end;
-
-function MakeFilter(dst,descr,full,filter:PWideChar;show:bool=true):pWideChar;
-var
- p:PWideChar;
-begin
- if full<>nil then
- begin
- p:=StrEndW(full);
- p^:=';';
- StrCopyW(p+1,filter);
- end;
-
- dst:=StrCopyEW(dst,TranslateW(descr));
- if show then
- begin
- dst^ :=' ';
- (dst+1)^:='(';
- dst:=StrCopyEW(dst+2,filter);
- dst^:=')';
- inc(dst);
- dst^:=#0;
- end;
- inc(dst);
- result:=StrCopyEW(dst,filter)+1;
-end;
-
-function ConstructFilter:pointer;
-var
- pc:pWideChar;
- ph:PDWord;
- Info:PBASS_PLUGININFO;
- i:integer;
- full:array [0..511] of WideChar;
- tmpbuf1,tmpbuf2:array [0..127] of WideChar;
-begin
- mGetMem(pc,4096);
-// FillChar(pc^,4096,0);
- result:=pc;
- full[0]:=#0;
- pc:=MakeFilter(pc,'All files' ,nil ,'*.*',false);
- pc:=MakeFilter(pc,'Playlist files',full,'*.pls;*.m3u;*.m3u8;*.asx');
- pc:=MakeFilter(pc,'BASS built-in' ,full,'*.mp3;*.mp2;*.mp1;*.ogg;*.wav;*.aif');
-
- ph:=pointer(BASS_PluginGetInfo(0));
- if ph<>nil then
- begin
- while ph^<>0 do
- begin
- Info:=BASS_PluginGetInfo(ph^);
- for i:=0 to Info^.formatc-1 do
-//!! need to translate Ansi -> wide
- with Info^.Formats[i] do
- begin
- pc:=MakeFilter(pc,FastAnsiToWideBuf(name,tmpbuf1),full,FastAnsiToWideBuf(exts,tmpbuf2));
- end;
- inc(ph);
- end;
- end;
- pc:=MakeFilter(pc,'All supported formats',nil,full,false);
- pc^:=#0;
-end;
-
-procedure SetButtonIcons(Dialog:HWND);
-var
- ti:TTOOLINFOW;
- hwndTooltip:HWND;
-begin
- hwndTooltip:=CreateWindowW(TOOLTIPS_CLASS,nil,TTS_ALWAYSTIP,
- integer(CW_USEDEFAULT),integer(CW_USEDEFAULT),
- integer(CW_USEDEFAULT),integer(CW_USEDEFAULT),
- Dialog,0,hInstance,nil);
-
- FillChar(ti,SizeOf(ti),0);
- ti.cbSize :=sizeof(TOOLINFO);
- ti.uFlags :=TTF_IDISHWND or TTF_SUBCLASS;
- ti.hwnd :=Dialog;
- ti.hinst :=hInstance;
-
- ti.uId :=GetDlgItem(Dialog,IDC_EQ_ADD);
- ti.lpszText:=TranslateW('Add');
-
- SetButtonIcon(ti.uId,IcoBtnAdd);
-
- SendMessageW(hwndTooltip,TTM_ADDTOOLW,0,lparam(@ti));
-
- ti.uId :=GetDlgItem(Dialog,IDC_EQ_DEL);
- ti.lpszText:=TranslateW('Delete');
- SetButtonIcon(ti.uId,IcoBtnDel);
- SendMessageW(hwndTooltip,TTM_ADDTOOLW,0,lparam(@ti));
-end;
-
-function DlgProcOpt(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
-const
- DlgInit:integer=1;
-var
- buf:array [0..MAX_PATH-1] of WideChar;
- psr:TPROTOSEARCHRESULT;
- dst:pWideChar;
- i:dword;
-// info:BASS_CHANNELINFO;
- vhi:TVARHELPINFO;
- wnd:HWND;
- p:pWideChar;
-begin
- result:=0;
- case hMessage of
- WM_DESTROY: begin
- DBWriteByte(0,PluginName,optLoop ,doLoop);
- DBWriteByte(0,PluginName,optShuffle ,doShuffle);
- DBWriteByte(0,PluginName,optContRec ,doContRec);
- DBWriteByte(0,PluginName,optPlayFirst,PlayFirst);
- DBWriteByte(0,PluginName,optConnect ,AuConnect);
- DBWriteByte(0,PluginName,optAutoMute ,AuMute);
- DBWriteByte(0,PluginName,optOffline ,AsOffline);
-
- DBWriteUnicode(0,PluginName,optStatusTmpl,StatusTmpl);
- end;
-
- WM_INITDIALOG: begin
- DlgInit:=1;
- TranslateDialogDefault(Dialog);
-
- wnd:=GetDlgItem(Dialog,IDC_HLP_VARS);
- if isVarsInstalled then
- begin
- SendMessage(wnd,BM_SETIMAGE,IMAGE_ICON,
- CallService(MS_VARS_GETSKINITEM,0,VSI_HELPICON));
- end
- else
- ShowWindow(wnd,SW_HIDE);
-
- if recpath<>nil then
- p:=recpath
- else
- begin
- buf[0]:=#0;
- p:=@buf;
- end;
- SetDlgItemTextW(Dialog,IDC_ED_RECPATH,p);
-
- CheckDlgButton(Dialog,IDC_LOOP ,doLoop);
- CheckDlgButton(Dialog,IDC_SHUFFLE ,doShuffle);
- CheckDlgButton(Dialog,IDC_CONTREC ,doContRec);
- CheckDlgButton(Dialog,IDC_PLAYFIRST,PlayFirst);
- CheckDlgButton(Dialog,IDC_CONNECT ,AuConnect);
- CheckDlgButton(Dialog,IDC_AUTOMUTE ,AuMute);
- CheckDlgButton(Dialog,IDC_OFFLINE ,AsOffline);
-
- SetDlgItemTextW(Dialog,IDC_STATUS,StatusTmpl);
-
- DlgInit:=0;
- end;
-
- WM_COMMAND: begin
- case wParam shr 16 of
- EN_CHANGE: begin
- if DlgInit=0 then
- case loword(wParam) of
- IDC_STATION,IDC_STATIONURL,IDC_GENRE,IDC_BITRATE: ;
- else
- SendMessage(GetParent(Dialog),PSM_CHANGED,0,0);
- end;
- end;
-
- BN_CLICKED: begin
- case loword(wParam) of
-
- IDC_IMPORT: begin
- ImportAll(0,0);
- end;
-
- IDC_EXPORT: begin
- ExportAll(0,0);
- end;
-
- IDC_HLP_VARS: begin
- FillChar(vhi,SizeOf(vhi),0);
- with vhi do
- begin
- cbSize :=SizeOf(vhi);
- flags :=VHF_FULLDLG or VHF_SETLASTSUBJECT;
- hwndCtrl :=GetDlgItem(Dialog,IDC_STATUS);
- szSubjectDesc:='test your variables';
- end;
- CallService(MS_VARS_SHOWHELPEX,Dialog,tlparam(@vhi));
- end;
-
- IDC_BN_URLPATH: begin
-
- dst:=ConstructFilter;
- if ShowDlgW(@buf,nil,dst) then
- SetDlgItemTextW(Dialog,IDC_STATIONURL,@buf);
- mFreeMem(dst);
- end;
-
- IDC_BN_RECPATH: begin
- dst:=nil;
- if SelectDirectory(pWideChar(nil),dst,Dialog) then
- begin
- CallService(MS_UTILS_PATHTORELATIVEW,twparam(dst),tlparam(@buf));
- SetDlgItemTextW(Dialog,IDC_ED_RECPATH,pWideChar(@buf));
- mFreeMem(dst);
- end;
- end;
-
- IDC_LOOP,IDC_SHUFFLE,IDC_CONTREC,IDC_CONNECT,IDC_OFFLINE,IDC_AUTOMUTE:
- SendMessage(GetParent(Dialog),PSM_CHANGED,0,0);
-
- IDC_ADD_LIST,IDC_ADD_INI: begin
- if GetWindowTextLength(GetDlgItem(Dialog,IDC_STATIONURL))>0 then
- begin
- FillChar(psr,SizeOf(psr),0);
- with psr do
- begin
- if loword(wParam)=IDC_ADD_LIST then
- begin
- GetDlgItemTextW(Dialog,IDC_STATIONURL,@buf,MAX_PATH);
- StrDupW(firstname.w,@buf);
- buf[0]:=#0;
-
- GetDlgItemTextW(Dialog,IDC_STATION,@buf,MAX_PATH);
- if buf[0]<>#0 then
- StrDupW(nick.w,@buf)
- else
- StrDupW(nick.w,firstname.w);
- buf[0]:=#0;
-
- GetDlgItemTextW(Dialog,IDC_GENRE,@buf,MAX_PATH);
- StrDupW(lastname.w,@buf);
- buf[0]:=#0;
-
- GetDlgItemTextW(Dialog,IDC_BITRATE,@buf,MAX_PATH);
- StrDupW(email.w,@buf);
-
- i:=Service_AddToList(0,tlparam(@psr));
-{
- GetDlgItemTextW(Dialog,IDC_STATION,@buf,SizeOf(buf));
- DBWriteUnicode(i,strCList,optMyHandle,@buf);
-
- GetDlgItemTextW(Dialog,IDC_STATIONURL,@buf,SizeOf(buf));
- DBWriteUnicode(i,PluginName,optStationURL,@buf);
-}
- // "changing" station group
- dst:=GetNewGroupName(Dialog);
- if dst<>nil then
- DBWriteUnicode(i,strCList,optGroup,dst)
- else
- DBDeleteSetting(i,strCList,optGroup);
-
- end
- else if loword(wParam)=IDC_ADD_INI then
- begin
- GetDlgItemTextA(Dialog,IDC_STATIONURL,PAnsiChar(@buf),SizeOf(buf));
- StrDup(firstname.a,PAnsiChar(@buf));
- PAnsiChar(@buf)^:=#0;
-
- GetDlgItemTextA(Dialog,IDC_STATION,PAnsiChar(@buf),SizeOf(buf));
- if PAnsiChar(@buf)^<>#0 then
- StrDup(nick.a,@buf)
- else
- StrDup(nick.a,firstname.a);
- PAnsiChar(@buf)^:=#0;
-
- GetDlgItemTextA(Dialog,IDC_GENRE,PAnsiChar(@buf),SizeOf(buf));
- StrDup(lastname.a,@buf);
- PAnsiChar(@buf)^:=#0;
-
- GetDlgItemTextA(Dialog,IDC_BITRATE,PAnsiChar(@buf),SizeOf(buf));
- StrDup(email.a,@buf);
-
- if WritePrivateProfileStringA(firstname.a,'URL',firstname.a,storage) then
- begin
- WritePrivateProfileStringA(firstname.a,'Name' ,nick.a ,storage);
- WritePrivateProfileStringA(firstname.a,optGenre ,lastname.a ,storage);
- WritePrivateProfileStringA(firstname.a,optBitrate,email.a ,storage);
- end
- else
- begin
- WritePrivateProfileStringA(firstname.a,'URL' ,firstname.a,storagep);
- WritePrivateProfileStringA(firstname.a,'Name' ,nick.a ,storagep);
- WritePrivateProfileStringA(firstname.a,optGenre ,lastname.a ,storagep);
- WritePrivateProfileStringA(firstname.a,optBitrate,email.a ,storagep);
- end;
-
- end;
- mFreeMem(nick);
- mFreeMem(firstname);
- mFreeMem(lastname);
- mFreeMem(email);
- end;
- end;
- end;
-
- end;
- end;
-
- end;
- end;
-
- WM_NOTIFY: begin
- if integer(PNMHdr(lParam)^.code)=PSN_APPLY then
- begin
-
- doShuffle:=IsDlgButtonChecked(Dialog,IDC_SHUFFLE);
- doContRec:=IsDlgButtonChecked(Dialog,IDC_CONTREC);
- PlayFirst:=IsDlgButtonChecked(Dialog,IDC_PLAYFIRST);
- AuConnect:=IsDlgButtonChecked(Dialog,IDC_CONNECT);
- AuMute :=IsDlgButtonChecked(Dialog,IDC_AUTOMUTE);
- AsOffline:=IsDlgButtonChecked(Dialog,IDC_OFFLINE);
-
- mFreeMem(StatusTmpl);
- StatusTmpl:=GetDlgText(Dialog,IDC_STATUS);
-
- doLoop:=IsDlgButtonChecked(Dialog,IDC_LOOP);
- if chan<>0 then
- begin
-{
- BASS_ChannelGetInfo(chan,info);
- if doLoop<>BST_UNCHECKED then
- info.flags:=info.flags or BASS_SAMPLE_LOOP
- else
- info.flags:=info.flags and not BASS_SAMPLE_LOOP;
-}
- BASS_ChannelFlags(chan,ord(doLoop<>BST_UNCHECKED),BASS_SAMPLE_LOOP);
- end;
-
- mFreeMem(recpath);
- buf[0]:=#0;
- GetDlgItemTextW(Dialog,IDC_ED_RECPATH,@buf,SizeOf(buf) div SizeOf(WideChar));
- if buf[0]<>#0 then
- begin
- mGetMem(recpath,MAX_PATH*SizeOf(WideChar));
- recpath^:=#0;
- CallService(MS_UTILS_PATHTORELATIVEW,twparam(@buf),tlparam(recpath));
- end;
- DBWriteUnicode(0,PluginName,optRecPath,recpath);
- end;
- end;
-
-// else
-// result:=DefWindowProc(Dialog,hMessage,wParam,lParam);
- end;
-end;
-
-function DlgProcOptTech(Dialog:HWnd;hMessage:uint;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
-const
- DlgInit:integer=1;
-var
- i:integer;
- hEAXCombo:THANDLE;
- ltmp:longbool;
-// info:BASS_CHANNELINFO;
- buf1:array [0..4] of AnsiChar;
- wnd:HWND;
- buf:array [0..MAX_PATH-1] of WideChar;
- dst:pWideChar;
-begin
- result:=0;
- case hMessage of
- WM_DESTROY: begin
- hVolCtrl:=0;
-
- buf1[0]:='E';
- buf1[1]:='Q';
- buf1[2]:='_';
- buf1[4]:=#0;
- for i:=0 to 9 do
- begin
- buf1[3]:=AnsiChar(ORD('0')+i);
- DBWriteByte(0,PluginName,buf1,trunc(eq[i].param.fGain)+15);
- eq[i].wnd:=0;
- end;
- DBWriteByte(0,PluginName,optEQ_OFF ,isEQ_OFF);
- end;
-
- WM_INITDIALOG: begin
- DlgInit:=1;
- TranslateDialogDefault(Dialog);
-
- SetButtonIcons(Dialog);
- hVolCtrl:=GetDlgItem(Dialog,IDC_VOLUME);
- SendMessage(hVolCtrl,TBM_SETRANGE,0,(100 shl 16)+0);
- SendMessage(hVolCtrl,TBM_SETPOS,1,ABS(gVolume));
-
- SetDlgItemInt(Dialog,IDC_BUFFER ,sBuffer ,false);
- SetDlgItemInt(Dialog,IDC_PREBUF ,sPreBuf ,false);
- SetDlgItemInt(Dialog,IDC_TIMEOUT,sTimeout,false);
- SetDlgItemInt(Dialog,IDC_TRIES ,NumTries,false);
-
- CheckDlgButton(Dialog,IDC_MONO,ForcedMono);
-
- hEAXCombo:=GetDlgItem(Dialog,IDC_EAXTYPE);
- for i:=0 to EAX_ENVIRONMENT_COUNT do
- SendMessageW(hEAXCombo,CB_ADDSTRING,0,tlparam(TranslateW(EAXItems[i].name)));
- SendMessage(hEAXCombo,CB_SETCURSEL,DBReadByte(0,PluginName,optEAXType,0),0);
-
- wnd:=GetDlgItem(Dialog,IDC_PRESET);
- for i:=0 to HIGH(Presets) do
- SendMessageW(wnd,CB_ADDSTRING,0,tlparam(Presets[i].name));
- SendMessage(wnd,CB_SETCURSEL,OldEQPreset,0);
-
- for i:=0 to 9 do
- begin
- eq[i].wnd:=GetDlgItem(Dialog,IDC_EQ00+i);
- SendMessage(eq[i].wnd,TBM_SETRANGE,1,(16 shl 16)-15);
- SendMessage(eq[i].wnd,TBM_SETTIC,0,0);
- SendMessage(eq[i].wnd,TBM_SETPOS,1,-trunc(eq[i].param.fGain));
- SendDlgItemMessageA(Dialog,IDC_0+i,WM_SETTEXT,0,tlparam(eq[i].text));
- EnableWindow(eq[i].wnd,isEQ_OFF=BST_UNCHECKED);
- end;
-
- CheckDlgButton(Dialog,IDC_EQOFF,isEQ_OFF);
-
- dst:=DBReadUnicode(0,PluginName,optBASSPath,nil);
- SetDlgItemTextW(Dialog,IDC_BASSPATH,dst);
- mFreeMem(dst);
-
- DlgInit:=0;
- end;
-
- WM_COMMAND: begin
- case wParam shr 16 of
- EN_CHANGE: begin
- if DlgInit=0 then
- SendMessage(GetParent(Dialog),PSM_CHANGED,0,0);
- end;
-
- BN_CLICKED: begin
- case loword(wParam) of
-
- IDC_BASSPTHBTN: begin
- dst:=nil;
- if SelectDirectory(pWideChar(nil),dst,Dialog) then
- begin
- CallService(MS_UTILS_PATHTORELATIVEW,twparam(dst),tlparam(@buf));
- SetDlgItemTextW(Dialog,IDC_BASSPATH,pWideChar(@buf));
- mFreeMem(dst);
- end;
- end;
-
- IDC_EQOFF: begin
- isEQ_OFF:=IsDlgButtonChecked(Dialog,IDC_EQOFF);
- if isEQ_OFF=BST_UNCHECKED then
- EQ_ON
- else
- EQ_OFF;
-
- for i:=0 to 9 do
- EnableWindow(eq[i].wnd,isEQ_OFF=BST_UNCHECKED);
- end;
-
- IDC_ZERO: begin
- OldEQPreset:=-1;
- for i:=0 to 9 do
- begin
- eq[i].param.fGain:=0;
- SendMessage(eq[i].wnd,TBM_SETPOS,1,0);
- if (chan<>0) and (isEQ_OFF=BST_UNCHECKED) then
- BASS_FXSetParameters(eq[i].fx,@eq[i].param);
- end;
- end;
-
- IDC_EQ_ADD: begin
- SetLength(Presets,Length(Presets)+1);
-
- for i:=0 to 9 do
- Presets[HIGH(Presets)].preset[i]:=-SendMessage(eq[i].wnd,TBM_GETPOS,0,0);
-
- wnd:=GetDlgItem(Dialog,IDC_PRESET);
- Presets[HIGH(Presets)].name:=GetDlgText(wnd,false);
- if Presets[HIGH(Presets)].name=nil then
- StrDupW(Presets[HIGH(Presets)].name,'New');
- OldEQPreset:=SendMessage(wnd,CB_SETCURSEL,
- SendMessageW(wnd,CB_ADDSTRING,0,tlparam(Presets[HIGH(Presets)].name)),0);
- end;
-
- IDC_EQ_DEL: begin
- wnd:=GetDlgItem(Dialog,IDC_PRESET);
- i:=SendMessage(wnd,CB_GETCURSEL,0,0);
- if (i>=0) and (i<=HIGH(Presets)) then
- begin
- SendMessage(wnd,CB_DELETESTRING,i,0);
- mFreeMem(Presets[i].name);
- move(Presets[i+1],Presets[i],(HIGH(Presets)-i)*SizeOf(tPreset));
- SetLength(Presets,Length(Presets)-1);
- OldEQPreset:=-1;
- SendMessage(wnd,CB_SETCURSEL,-1,0);
- end;
- end;
-
- end;
- end;
-
- CBN_SELCHANGE: begin
- SendMessage(GetParent(Dialog),PSM_CHANGED,0,0);
- case loword(wParam) of
- IDC_PRESET: begin
- OldEQPreset:=SendDlgItemMessage(Dialog,IDC_PRESET,CB_GETCURSEL,0,0);
- for i:=0 to 9 do
- begin
- SendMessage(eq[i].wnd,TBM_SETPOS,1,-Presets[OldEQPreset].preset[i]);
- eq[i].param.fGain:=Presets[OldEQPreset].preset[i];
- if (chan<>0) and (isEQ_OFF=BST_UNCHECKED) then
- BASS_FXSetParameters(eq[i].fx,@eq[i].param);
- end;
- end;
- IDC_EAXTYPE: begin
-{
- i:=SendDlgItemMessage(Dialog,IDC_EAXTYPE,CB_GETCURSEL,0,0);
- DBWriteByte(0,PluginName,optEAXType,i);
- if i=0 then
- BASS_SetEAXParameters(-1,0,-1,-1)
- else
- BASS_SetEAXPreset(EAXItems[i].code);
-}
- end;
- end;
- end;
- end;
- end;
-
- WM_VSCROLL: begin
- for i:=0 to 9 do
- begin
- if HWND(lParam)=eq[i].wnd then
- begin
- eq[i].param.fGain:=-SendMessage(lParam,TBM_GETPOS,0,0);
- if (chan<>0) and (isEQ_OFF=BST_UNCHECKED) then
- BASS_FXSetParameters(eq[i].fx,@eq[i].param);
- OldEQPreset:=-1;
- break;
- end;
- end;
- end;
-
- WM_HSCROLL: begin
- Service_RadioSetVolume(SendMessage(lParam,TBM_GETPOS,0,0),1)
- end;
-
- WM_NOTIFY: begin
- if integer(PNMHdr(lParam)^.code)=PSN_APPLY then
- begin
- SavePresets;
-
-//!! bass path saving here
- dst:=GetDlgText(Dialog,IDC_BASSPATH);
- DBWriteUnicode(0,PluginName,optBASSPath,dst);
- mFreeMem(dst);
-
- ForcedMono:=IsDlgButtonChecked(Dialog,IDC_MONO);
- DBWriteByte(0,PluginName,optForcedMono,ForcedMono);
-
- i:=SendDlgItemMessage(Dialog,IDC_EAXTYPE,CB_GETCURSEL,0,0);
- DBWriteByte(0,PluginName,optEAXType,i);
- if i=0 then
- BASS_SetEAXParameters(-1,0,-1,-1)
- else
- BASS_SetEAXPreset(EAXItems[i].code);
-
- NumTries:=GetDlgItemInt(Dialog,IDC_TRIES,ltmp,false);
- if NumTries<1 then NumTries:=1;
- DBWriteByte(0,PluginName,optNumTries,NumTries);
-
- i:=GetDlgItemInt(Dialog,IDC_PREBUF,ltmp,false);
- if i>100 then i:=100;
- if cardinal(i)<>sPreBuf then
- begin
- sPreBuf:=i;
- BASS_SetConfig(BASS_CONFIG_NET_PREBUF,i);
- DBWriteWord(0,PluginName,optPreBuf,sPreBuf);
- end;
-
- i:=GetDlgItemInt(Dialog,IDC_BUFFER,ltmp,false);
- if i>20000 then i:=20000;
- if cardinal(i)<>sBuffer then
- begin
- sBuffer:=i;
- BASS_SetConfig(BASS_CONFIG_NET_BUFFER,i);
- DBWriteWord(0,PluginName,optBuffer,sBuffer);
- end;
-
- i:=GetDlgItemInt(Dialog,IDC_TIMEOUT,ltmp,false);
- if i>30000 then i:=30000;
- if cardinal(i)<>sTimeout then
- begin
- sTimeout:=i;
- BASS_SetConfig(BASS_CONFIG_NET_TIMEOUT,i);
- DBWriteWord(0,PluginName,optTimeout,sTimeout);
- end;
-
- end;
- end;
-
-// else
-// result:=DefWindowProc(Dialog,hMessage,wParam,lParam);
- end;
-end;
-
-function OnOptInitialise(wParam:WPARAM;lParam:LPARAM):int;cdecl;
-var
- odp:TOPTIONSDIALOGPAGE;
-begin
- FillChar(odp,SizeOf(odp),0);
- odp.cbSize :=SizeOf(odp);
- odp.flags :=ODPF_BOLDGROUPS;
- odp.Position :=900003000;
- odp.hInstance :=hInstance;
- odp.szGroup.a :='Network';
- odp.szTitle.a :=PluginName;
-
- odp.pszTemplate:=MAKEINTRESOURCEA(IDD_SETTING);
- odp.pfnDlgProc :=@DlgProcOpt;
- odp.szTab.a :='Common';
- CallService(MS_OPT_ADDPAGE,wParam,tlparam(@odp));
-
- odp.pszTemplate:=MAKEINTRESOURCEA(IDD_SETTING_TECH);
- odp.pfnDlgProc :=@DlgProcOptTech;//!!
- odp.szTab.a :=Translate('Advanced');
- CallService(MS_OPT_ADDPAGE,wParam,tlparam(@odp));
-
- result:=0;
-end;
-
-// checking proto in several places for speed, not size economy
-function OnSettingsChanged(wParam:WPARAM;lParam:LPARAM):int;cdecl;
-var
- buf:array [0..MAX_PATH-1] of AnsiChar;
- i:integer;
- pc:PAnsiChar;
-begin
- result:=0;
-
- with PDBCONTACTWRITESETTING(lParam)^ do
- begin
-
- if AuMute<>BST_UNCHECKED then
- begin
- if StrCmp(szModule,'Skin')=0 then
- begin
- if StrCmp(szSetting,'UseSound')=0 then
- begin
- // Mute
- if value.bVal=0 then
- begin
- if gVolume>=0 then
- Service_RadioMute(0,0);
- end
- // Unmute
- else
- begin
- if gVolume<0 then
- Service_RadioMute(0,0);
- end;
- end;
-
- exit;
- end
- end;
-
- // works only if called AFTER changes
- if StrCmp(szModule,strCList)=0 then
- begin
- if StrCmp(szSetting,optMyHandle)=0 then
- begin
- if value._type=DBVT_DELETED then
- begin
- if StrCmp(PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,wParam,0)),
- PluginName)<>0 then exit;
-
- pc:=DBReadString(wParam,PluginName,optNick);
- DBWriteString(wParam,strCList,optMyHandle,pc);
- mFreeMem(pc);
- end;
- end;
- exit;
- end;
-
- if StrCmp(szModule,'UserInfo')<>0 then exit;
-
- if StrCmp(szSetting,optAge)=0 then
- begin
- if StrCmp(PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,wParam,0)),
- PluginName)<>0 then exit;
- if value._type=DBVT_DELETED then
- i:=DBReadWord(wParam,PluginName,optAge)
- else
- i:=value.wVal;
- DBWriteString(wParam,PluginName,optBitrate,IntToStr(buf,i));
- exit;
- end;
-
- case value._type of
- DBVT_DELETED,
- DBVT_ASCIIZ ,
- DBVT_WCHAR ,
- DBVT_UTF8 :
- if StrCmp(PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,wParam,0)),
- PluginName)<>0 then exit;
- else
- exit;
- end;
-
- case value._type of
- DBVT_DELETED: pc:=DBReadString(wParam,PluginName,szSetting);
- DBVT_ASCIIZ : pc:=value.szVal.a;
- DBVT_WCHAR : WideToAnsi(value.szVal.w,pc,MirandaCP);
- DBVT_UTF8 : UTF8ToAnsi(value.szVal.a,pc,MirandaCP);
- end;
-
- if StrCmp(szSetting,optFirstName)=0 then DBWriteString(wParam,PluginName,optStationURL,pc)
- else if StrCmp(szSetting,optNick )=0 then DBWriteString(wParam,strCList,optMyHandle,pc)
- else if StrCmp(szSetting,optLastName )=0 then DBWriteString(wParam,PluginName,optGenre,pc);
-
- if value._type<>DBVT_ASCIIZ then
- mFreeMem(pc);
- end;
-end;
-
-function OnContactDeleted(wParam:WPARAM;lParam:LPARAM):int;cdecl;
-begin
- result:=0;
- if ActiveContact<>THANDLE(wParam) then exit;
- ControlCenter(MRC_STOP,wParam);
-
-{ if StrCmp(PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,wParam,0)),
- PluginName)<>0 then exit;
-}
-end;
diff --git a/plugins/mRadio/i_search.inc b/plugins/mRadio/i_search.inc
deleted file mode 100644
index d4330e84d1..0000000000
--- a/plugins/mRadio/i_search.inc
+++ /dev/null
@@ -1,444 +0,0 @@
-{search station code}
-(*
-procedure SetAvatar(hContact:THANDLE);
-var
- success:boolean;
- fname:pAnsiChar;
- url:pWideChar;
- buf,buf1,buf2:array [0..MAX_PATH-1] of AnsiChar;
- ext:array [0..15] of AnsiChar;
- section:pAnsiChar;
- pc:pAnsiChar;
- i:integer;
-begin
- // get url
- url:=DBReadUnicode(hContact,PluginName,optStationURL);
- // translate to Ansi
- FastWideToAnsiBuf(url,buf);
- mFreeMem(url);
-
- // search in INI
- i:=GetFSize(storage);
- if i=0 then
- i:=32767;
- mGetMem(pc,i+1);
- pc^:=#0;
- GetPrivateProfileSectionNamesA(pc,i,storage);
- section:=pc;
-
- while section^<>#0 do
- begin
- GetPrivateProfileStringA(section,'URL','',buf1,SizeOf(buf1),storage);
- if StrCmp(@buf,@buf1)=0 then
- break;
-
- while section^<>#0 do inc(section);
- inc(section);
- end;
- mFreeMem(pc);
-
- if section^<>#0 then
- begin
- // get avatar link
- buf[0]:=#0;
- GetPrivateProfileStringA(section,'Avatar','',buf,SizeOf(buf),storage);
-
- if buf[0]<>#0 then
- begin
- // Here we trying to get Avatar chache directory
- // (create it if needs)
- // and copy (load) owr avatars there
- // in : buf = source avatar path
- // out: fname = destination (file name in cache)
- // rule for name is?..
-
-
- if StrPos(buf,'://')=nil then
- begin
- fname:=@buf;
- success:=FileExists(fname);
- // need to copy this file to avatar cache
- end
- else
- begin
- // download file
-{
- GetTempPathA(MAX_PATH,pAnsiChar(@buf1));
- pc:=extract(pAnsiChar(@buf),true);
- StrCat(pAnsiChar(@buf1),pc);
- mFreeMem(pc);
-}
- //mrAvt
-
- GetExt(pAnsiChar(@buf),pAnsiChar(@ext));
- GetTempPathA(MAX_PATH,pAnsiChar(@buf2));
- GetTempFileNameA(pAnsiChar(@buf2),'mrAvt',GetCurrentTime,pAnsiChar(@buf1));
- ChangeExt(pAnsiChar(@buf1),PAnsiChar(@ext));
- //
- fname:=@buf1;
- success:=GetFile(pAnsiChar(@buf),fname);
- end;
-
- if success then
- CallService(MS_AV_SETAVATAR,hContact,LPARAM(fname));
- end;
- end;
-end;
-*)
-type
- TMySearchFilter = record
- lStation,
- lStationURL,
- lGenre:PAnsiChar;
- lBitrate:integer;
- lBitrateMode:integer;
- end;
-
-const
- AckHandle = 427;
-
-// Since mRadio is unicode version only now, translate all strings to Wide
-// coz f*cking jinn will set unicode flag in any cases
-procedure LoadOneStation(section:pointer;const filter:TMySearchFilter);
-var
- bitrate:integer;
- l:bool;
- columns:array [0..3] of TCHAR;
- csr:CUSTOMSEARCHRESULTS;
- pc:pAnsiChar;
- buf:array [0..127] of AnsiChar;
-begin
- pc:=GetParamSectionStr(section,'URL');
- if pc<>nil then
- begin
- if (filter.lStationURL=nil) or (StrPos(CharLowerA(pc),filter.lStationURL)<>nil) then
- begin
- FillChar(csr,SizeOf(csr),0);
- csr.psr.cbSize:=SizeOf(csr.psr);
- csr.psr.Flags:=PSR_UNICODE;
- AnsiToWide(pc,csr.psr.firstname.w,MirandaCP);
- pc:=GetParamSectionStr(section,optBitrate,'0');
- bitrate:=StrToInt(pc);
- if (bitrate<>0) and (filter.lBitrate<>0) then
- begin
- if filter.lBitrateMode<0 then l:=bitrate<=filter.lBitrate
- else if filter.lBitrateMode=0 then l:=bitrate =filter.lBitrate
- else{if filter.lBitrateMode>0} l:=bitrate>=filter.lBitrate;
- end
- else
- l:=true;
- if l then
- begin
- AnsiToWide(pc,csr.psr.email.w,MirandaCP);
-
- StrCopy(buf,GetParamSectionStr(section,'Name',GetSectionName(section)),127);
- if (filter.lStation=nil) or (StrPos(CharLowerA(@buf),filter.lStation)<>nil) then
- begin
- AnsiToWide(@buf,csr.psr.nick.w,MirandaCP);
-
- StrCopy(buf,GetParamSectionStr(section,optGenre,'unknown'),127);
- if (filter.lGenre=nil) or (StrPos(CharLowerA(@buf),filter.lGenre)<>nil) then
- AnsiToWide(@buf,csr.psr.lastname.w,MirandaCP)
- else
- l:=false;
- end
- else
- l:=false;
- if l then
- begin
- columns[0].w:=csr.psr.nick.w; // Station name
- columns[1].w:=csr.psr.firstname.w; // URL
- columns[2].w:=csr.psr.lastname.w; // Genre
- columns[3].w:=csr.psr.email.w; // Bitrate
-
- csr.nSize :=SizeOf(csr);
- csr.nFieldCount:=4;
- csr.szFields :=@columns;
- ProtoBroadcastAck(PluginName,0,ACKTYPE_SEARCH,ACKRESULT_SEARCHRESULT,AckHandle,lparam(@csr));
- end;
- end;
- // initial value - nil, so we don't worry
- mFreeMem(csr.psr.nick);
- mFreeMem(csr.psr.firstname);
- mFreeMem(csr.psr.lastname);
- mFreeMem(csr.psr.email);
- end;
- end;
-end;
-
-procedure ProcessSearch(var filter:TMySearchFilter;ini:PAnsiChar);
-var
- pc:PAnsiChar;
- csr:CUSTOMSEARCHRESULTS;
- columns:array [0..3] of TCHAR;
- lstorage,section,list:pointer;
-begin
- columns[0].w:='Station Name';
- columns[1].w:='Station URL';
- columns[2].w:='Genre';
- columns[3].w:='Bitrate';
-
- csr.nSize :=SizeOf(csr);
- csr.nFieldCount:=4;
- csr.szFields :=@columns;
- csr.psr.cbSize :=0;
- ProtoBroadcastAck(PluginName,0,ACKTYPE_SEARCH,ACKRESULT_SEARCHRESULT,AckHandle,lparam(@csr));
-
- lstorage:=OpenStorage(ini);
- if lstorage<>nil then
- begin
- list:=GetSectionList(lstorage);
- pc:=list;
-
- while pc^<>#0 do
- begin
- section:=SearchSection(lstorage,pc);
- LoadOneStation(section,filter); //!!
- while pc^<>#0 do inc(pc);
- inc(pc);
- end;
-
- FreeSectionList(list);
- CloseStorage(lstorage);
- end;
-
- ProtoBroadcastAck(PluginName,0,ACKTYPE_SEARCH,ACKRESULT_SUCCESS,AckHandle,0);
- mFreeMem(filter.lStation);
- mFreeMem(filter.lStationURL);
- mFreeMem(filter.lGenre);
-end;
-
-procedure BasicSearch(name:PAnsiChar); cdecl;
-var
- filter:TMySearchFilter;
- ini:array [0..MAX_PATH-1] of AnsiChar;
-begin
- FillChar(filter,SizeOf(filter),0);
- StrCopy(ini,storage);
-
- StrDup(filter.lStation,name);
- if filter.lStation<>nil then
- CharLowerA(filter.lStation);
-
- ProcessSearch(filter,ini);
-end;
-
-procedure ExtSearch(wnd:HWND); cdecl;
-var
- filter:TMySearchFilter;
- ltmp:longbool;
- ini1,ini:array [0..MAX_PATH-1] of AnsiChar;
-begin
- FillChar(filter,SizeOf(filter),0);
- ini1[0]:=#0;
- GetDlgItemTextA(wnd,IDC_CUSTOMINI,@ini1,SizeOf(ini1));
- if ini1[0]=#0 then
- StrCopy(ini,storage)
- else
- ConvertFileName(ini1,ini);
-
- with filter do
- begin
-// CallService(MS_UTILS_PATHTOABSOLUTE,dword(@ini1),dword(@ini));
- lBitrate:=GetDlgItemInt(wnd,IDC_BITRATE,ltmp,false);
- if IsDlgButtonChecked(wnd,IDC_LT)=BST_CHECKED then lBitrateMode:=-1
- else if IsDlgButtonChecked(wnd,IDC_EQ)=BST_CHECKED then lBitrateMode:=0
- else{if IsDlgButtonChecked(lParam,IDC_GT)=BST_CHECKED} lBitrateMode:=1;
-
- lStation:=GetDlgText(wnd,IDC_STATION,true);
- if lStation<>nil then
- CharLowerA(lStation);
-
- lStationURL:=GetDlgText(wnd,IDC_STATIONURL,true);
- if lStationURL<>nil then
- CharLowerA(lStationURL);
-
- lGenre:=GetDlgText(wnd,IDC_GENRE,true);
- if lGenre<>nil then
- CharLowerA(lGenre);
- end;
-
- ProcessSearch(filter,ini);
-end;
-
-function Service_SearchBasic(wParam:WPARAM;lParam:LPARAM):int_ptr;cdecl;
-begin
- if lParam=0 then
- result:=0
- else
- begin
- result:=AckHandle;
- CloseHandle(mir_forkthread(@BasicSearch,StrDup(PAnsiChar(lParam),PAnsiChar(lParam))));
- end;
-end;
-
-function Service_SearchByAdvanced(wParam:WPARAM;lParam:LPARAM):int_ptr;cdecl;
-begin
- if lParam=0 then
- result:=0
- else
- begin
- result:=AckHandle;
- CloseHandle(mir_forkthread(@ExtSearch,pointer(lParam)));
- end;
-end;
-
-function Service_GetCaps(wParam:WPARAM;lParam:LPARAM):int_ptr;cdecl; forward;
-
-function ExtSearchProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
-var
- buf:array [0..MAX_PATH-1] of AnsiChar;
-begin
- result:=0;
- case hMessage of
- WM_INITDIALOG: begin
- CheckDlgButton(Dialog,IDC_EQ,BST_CHECKED);
- TranslateDialogDefault(Dialog);
- end;
-
- WM_COMMAND: if (wParam shr 16)=BN_CLICKED then
- begin
- if loword(wParam)=IDOK then
- begin
- SendMessage(GetParent(Dialog),WM_COMMAND,IDOK+(BN_CLICKED) shl 16,
- GetDlgItem(GetParent(Dialog),IDOK));
- end
- else if loword(wParam)=IDC_BN_INIPATH then
- begin
- if ShowDlg(@buf,storage,'*.ini'#0'*.ini'#0#0) then
- SetDlgItemTextA(Dialog,IDC_CUSTOMINI,@buf);
- end;
- end;
- end;
-end;
-
-function Service_ExtSearchUI(wParam:WPARAM;lParam:LPARAM):int_ptr;cdecl;
-type
- PDLGTEMPLATEEX = ^TDLGTEMPLATEEX;
- TDLGTEMPLATEEX = packed record
- dlgVer:word;
- signature:word;
- helpID:dword;
- exStyle:dword;
- style:dword;
- cDlgItems:word;
- x:word;
- y:word;
- cx:word;
- cy:word;
-{
- sz_Or_Ord menu;
- sz_Or_Ord windowClass;
- title:array [0..titleLen] of WideChar;
- pointsize:word;
- weight:word;
- italic:byte;
- charset:byte;
- typeface:array [0..stringLen] of WideChar;
-}
- end;
-
-var
- hr:HRSRC;
- pdte:PDLGTEMPLATEEX;
-begin
- result:=0;
- if lParam<>0 then
- begin
- hr:=FindResource(hInstance,MAKEINTRESOURCE(IDD_SEARCH),RT_DIALOG);
- if hr<>0 then
- begin
- pdte:=PDLGTEMPLATEEX(LoadResource(hInstance,hr));
- if pdte<>nil then
- begin
- if (Service_GetCaps(PFLAGNUM_1,0) and PF1_EXTSEARCHUI)<>0 then
- pdte^.style:=(pdte^.style and not WS_CHILD) or WS_POPUP or WS_BORDER;
- result:=CreateDialogIndirect(hInstance,
- PDlgTemplate(pdte){$IFNDEF FPC}^{$ENDIF},lParam,@ExtSearchProc);
- end;
- end;
- end;
-end;
-
-function Service_AddToList(wParam:WPARAM;lParam:LPARAM):int_ptr;cdecl;
-var
- hContact:THANDLE;
- p:PWideChar;
- lurl:pWideChar;
-begin
- result:=0;
- if lParam<>0 then
- begin
- with PPROTOSEARCHRESULT(lParam)^ do
- begin
- if id.w<>nil then
- lurl:=id.w
- else
- lurl:=firstname.w;
-
- if lurl<>nil then
- begin
-{
-// find contact
- hContact:=CallService(MS_DB_CONTACT_FINDFIRST,0,0);
- while hContact<>0 do
- begin
- if StrCmp(PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0)),
- PluginName)=0 then
- begin
- p:=DBReadString(hContact,PluginName,optStationURL);
- l:=StrCmp(p,lurl)=0;
- mFreeMem(p);
- if l then
- begin
- DBDeleteSetting(hContact,strCList,'NotOnList');
- DBDeleteSetting(hContact,strCList,'Hidden');
- result:=hContact;
- exit;
- end;
- end;
- hContact:=CallService(MS_DB_CONTACT_FINDNEXT,hContact,0);
- end;
-// if not found
-}
- hContact:=CallService(MS_DB_CONTACT_ADD,0,0);
- if hContact<>0 then
- begin
- CallService(MS_PROTO_ADDTOCONTACT,hContact,tlparam(PluginName));
- // URL
- DBWriteUnicode(hContact,PluginName,optStationURL,lurl);
- DBWriteUnicode(hContact,PluginName,optFirstName ,lurl);
-
- // Name
- if nick.w=nil then
- p:=lurl
- else
- p:=nick.w;
- DBWriteUnicode(hContact,strCList ,optMyHandle,p);
- DBWriteUnicode(hContact,PluginName,optNick ,p);
-
- // Bitrate
- if email.w<>nil then
- begin
- DBWriteWord (hContact,PluginName,optAge ,StrToInt(email.w));
- DBWriteUnicode(hContact,PluginName,optBitrate,email.w);
- end;
-
- // Genre
- if lastname.w<>nil then
- begin
- DBWriteUnicode(hContact,PluginName,optGenre ,lastname.w);
- DBWriteUnicode(hContact,PluginName,optLastName,lastname.w);
- end;
-
- SetStatus(hContact,ID_STATUS_OFFLINE);
-
-// SetAvatar(hContact);
-
- CallService(MS_IGNORE_IGNORE,hContact,IGNOREEVENT_USERONLINE{IGNOREEVENT_ALL});
- result:=hContact;
- end;
- end;
- end;
- end;
-end;
diff --git a/plugins/mRadio/i_service.inc b/plugins/mRadio/i_service.inc
deleted file mode 100644
index 4f12544a81..0000000000
--- a/plugins/mRadio/i_service.inc
+++ /dev/null
@@ -1,241 +0,0 @@
-{services}
-
-function Service_GetCaps(wParam:WPARAM;lParam:LPARAM):int_ptr;cdecl;
-begin
- case wParam of
- PFLAGNUM_1:
- result:=PF1_EXTSEARCH or PF1_MODEMSGRECV or PF1_ADDSEARCHRES or PF1_BASICSEARCH;
- PFLAGNUM_2:
- result:=PF2_ONLINE or PF2_INVISIBLE or PF2_SHORTAWAY;
- PFLAGNUM_3:
- result:=PF2_ONLINE;// or PF2_INVISIBLE or PF2_SHORTAWAY;
- PFLAGNUM_4:
- result:=PF4_NOCUSTOMAUTH or PF4_AVATARS;
- PFLAG_UNIQUEIDTEXT:
- result:=int_ptr(Translate('Radio station URL'));
-// PFLAG_UNIQUEIDSETTING:
-// result:=int_ptr(optStationURL)
- else
- result:=0;
- end
-end;
-
-function Service_GetName(wParam:WPARAM;lParam:LPARAM):int_ptr;cdecl;
-begin
- if lParam<>0 then
- StrCopy(PAnsiChar(lParam),Translate(PluginName),wParam);
- result:=0;
-end;
-
-procedure GetAwayMsgProc(hContact:THANDLE); cdecl;
-var
- buf,p:PWideChar;
-begin
- if isVarsInstalled then
- begin
- buf:=ParseVarString(StatusTmpl,ActiveContact);
- end
- else
- begin
- mGetMem(buf,1024);
- StrCopyW(buf,StatusTmpl);
- if StrPosW(buf,'%radio_name%')<>nil then
- begin
- p:=DBReadUnicode(ActiveContact,strCList,optMyHandle);
- StrReplaceW(buf,'%radio_name%',p);
- mFreeMem(p);
- end;
- if StrPosW(buf,'%radio_url%')<>nil then
- begin
- p:=DBReadUnicode(ActiveContact,PluginName,optStationURL);
- StrReplaceW(buf,'%radio_url%',p);
- mFreeMem(p);
- end;
- if StrPosW(buf,'%radio_active%')<>nil then
- begin
- StrReplaceW(buf,'%radio_active%',ActiveURLw);
- end;
- if StrPosW(buf,'%radio_genre%')<>nil then // saved as String
- begin
- p:=DBReadUnicode(ActiveContact,PluginName,optGenre);
- StrReplaceW(buf,'%radio_genre%',p);
- mFreeMem(p);
- end;
- if StrPosW(buf,'%radio_bitrate%')<>nil then // saved as String
- begin
- p:=DBReadUnicode(ActiveContact,PluginName,optBitrate);
- StrReplaceW(buf,'%radio_bitrate%',p);
- mFreeMem(p);
- end;
- if StrPosW(buf,'%radio_title%')<>nil then
- begin
- p:=MakeMessage;
- StrReplaceW(buf,'%radio_title%',p);
- mFreeMem(p);
- end;
- if StrPosW(buf,'%radio_codec%')<>nil then
- begin
- p:=DBReadUnicode(ActiveContact,PluginName,optActiveCodec);
- StrReplaceW(buf,'%radio_codec%',p);
- mFreeMem(p);
- end;
- if StrPosW(buf,'%radio_status%')<>nil then
- begin
- StrReplaceW(buf,'%radio_status%',
- TranslateW(GetStatusText(
- CallService(MS_RADIO_COMMAND,MRC_STATUS,RD_STATUS_GET))));
- end;
- end;
-
- ProtoBroadcastAck(PluginName,hContact,ACKTYPE_AWAYMSG,ACKRESULT_SUCCESS,AckHandle,lParam(buf));
- mFreeMem(buf);
-end;
-
-function Service_GetAwayMsg(wParam:WPARAM;lParam:LPARAM):int_ptr;cdecl;
-var
- ccs:PCCSDATA;
-begin
- ccs:=PCCSDATA(lParam);
- if (ccs^.hContact<>0) and (PluginStatus=ID_STATUS_ONLINE) and
- (DBReadWord(ccs^.hContact,PluginName,optStatus,ID_STATUS_OFFLINE)=ID_STATUS_ONLINE) then
- begin
- CloseHandle(mir_forkthread(@GetAwayMsgProc,pointer(ccs^.hContact)));
- result:=AckHandle;
- end
- else
- result:=0;
-end;
-
-function Service_GetStatus(wParam:WPARAM;lParam:LPARAM):int_ptr;cdecl;
-begin
- result:=PluginStatus;
-end;
-
-function Service_LoadIcon(wParam:WPARAM;lParam:LPARAM):int_ptr;cdecl;
-begin
- case loword(wParam) of
- PLI_PROTOCOL: result:=LoadImage(hInstance,MAKEINTRESOURCE(IDI_MAIN),IMAGE_ICON,16,16,LR_SHARED);
-// PLI_ONLINE : result:=0;
-// PLI_OFFLINE : result:=0;
- else
- result:=0;
- end;
-end;
-
-function Service_SetStatus(wParam:WPARAM;lParam:LPARAM):int_ptr;cdecl;
-var
- OldStatus:integer;
-begin
- result:=0;
- OldStatus:=PluginStatus;
- if wParam<>ID_STATUS_OFFLINE then
- wParam:=ID_STATUS_ONLINE;
-
- if wParam=PluginStatus then
- exit;
-
- mFreeMem(proxy);
- PluginStatus:=ID_STATUS_OFFLINE;
-
- if wParam<>ID_STATUS_OFFLINE then
- begin
- if MyInitBASS<>0 then
- begin
- PluginStatus:=ID_STATUS_ONLINE;
-
- proxy:=GetProxy(hNetLib);
- BASS_SetConfigPtr(BASS_CONFIG_NET_PROXY,proxy);
-
- if (ActiveContact<>0) and (AuConnect<>0) then
- CallService(MS_RADIO_COMMAND,MRC_PLAY,ActiveContact);
- end;
- end
- else //offline
- begin
- CallService(MS_RADIO_COMMAND,MRC_STOP,0);
-// StopStation;
- end;
- SetStatus(0,ID_STATUS_OFFLINE);
-
- ProtoBroadcastAck(PluginName,0,ACKTYPE_STATUS,ACKRESULT_SUCCESS,OldStatus,PluginStatus);
-end;
-
-function CreateProtoService(serviceName:PAnsiChar;pFunc:pointer):THANDLE;
-var
- temp:array [0..MAXMODULELABELLENGTH-1] of AnsiChar;
-begin
- StrCopy(StrCopyE(temp,PluginName),serviceName);
- result:=CreateServiceFunction(temp,pFunc);
-end;
-
-var
- prh0,prh1,prh2,prh3,prh4,prh5,prh6,prh7,prh8,prh9:THANDLE;
-
-procedure DestroyProtoServices;
-begin
- DestroyServiceFunction(prh0);
- DestroyServiceFunction(prh1);
- DestroyServiceFunction(prh2);
- DestroyServiceFunction(prh3);
- DestroyServiceFunction(prh4);
- DestroyServiceFunction(prh5);
- DestroyServiceFunction(prh6);
- DestroyServiceFunction(prh7);
- DestroyServiceFunction(prh8);
- DestroyServiceFunction(prh9);
-end;
-
-procedure CreateProtoServices;
-begin
- prh0:=CreateProtoService(PS_GETCAPS ,@Service_GetCaps);
- prh1:=CreateProtoService(PS_ADDTOLIST ,@Service_AddToList);
- prh2:=CreateProtoService(PS_CREATEADVSEARCHUI,@Service_ExtSearchUI);
- prh3:=CreateProtoService(PS_SEARCHBYADVANCED ,@Service_SearchByAdvanced);
- prh4:=CreateProtoService(PS_BASICSEARCH ,@Service_SearchBasic);
- prh5:=CreateProtoService(PS_GETNAME ,@Service_GetName);
- prh6:=CreateProtoService(PS_LOADICON ,@Service_LoadIcon);
- prh7:=CreateProtoService(PS_GETSTATUS ,@Service_GetStatus);
- prh8:=CreateProtoService(PS_SETSTATUS ,@Service_SetStatus);
- prh9:=CreateProtoService(PSS_GETAWAYMSG ,@Service_GetAwayMsg);
-(*
-{
- Asks protocol for the status message for a status
- wParam=(WORD) 0 for current status or a status id
- lParam=SGMA_xxx
- Returns status msg or NULL if there is none. The protocol have to handle only the current
- status. Handling messages for other statuses is optional.
- Remember to mir_free the return value
-}
- SGMA_UNICODE = 1; // return Unicode status
-
- PS_GETMYAWAYMSG = '/GetMyAwayMsg';
-
-*)
-(* {
- wParam : 0
- lParam : Pointer to a null terminated string containing an ID to search for
- Affect : Send a basic search request, see notes
- Returns: A handle to the search request or NULL(0) on failure
- Notes : All protocols identify users uniquely by a single field
- this service will search by that field.
- -
- All search replies (even protocol-spec extended searches)
- are replied by a series of ack's,-
- -
- Result acks are a series of:
- type=ACKTYPE_SEARCH, result=ACKRESULT_DATA, lParam=Pointer to a TPROTOSEARCHRESULT structure
- -
- ending ack:
- type=ACKTYPE_SEARCH, result=ACKRESULT_SUCCESS, lParam=0
- -
- The pointers in the structure are not guaranteed to be
- valid after the ack is complete.
- -
- The structure to reply with search results can be extended
- per protocol basis (see below)
-
- }
- PS_BASICSEARCH = '/BasicSearch';
- PS_BASICSEARCHW = '/BasicSearchW';
-*)
-end;
diff --git a/plugins/mRadio/i_tray.inc b/plugins/mRadio/i_tray.inc
deleted file mode 100644
index 096e288691..0000000000
--- a/plugins/mRadio/i_tray.inc
+++ /dev/null
@@ -1,228 +0,0 @@
-{}
-var
- trayradioparent:THANDLE;
- trayparent:THANDLE;
- traymute :THANDLE;
- trayplay :THANDLE;
- srvtrayplaypause:THANDLE;
- srvtraystop:THANDLE;
-const
- trayStations:TSortedList = (items:nil; realCount:0; limit:0; increment:8; sortFunc: nil);
-
-type
- pTrayRadioStation = ^tTrayRadioStation;
- tTrayRadioStation = record
- name :pWideChar;
- hContact:THANDLE;
- service :THANDLE;
- menuitem:THANDLE;
- presents:int; // 0 - not used, 1 - ok, 2 - new
- end;
-
-function MyStrSort(para1:pointer; para2:pointer):int; cdecl;
-begin
- result:=StrCmpW(pTrayRadioStation(para1).name,pTrayRadioStation(para2).name);
-end;
-
-function ChooseStation(wParam:WPARAM;lParam,lParam1:LPARAM):int; cdecl;
-begin
- result:=Service_RadioPlayStop(lParam1,0);
-end;
-
-procedure MakeStationsMenu;
-var
- hContact:Cardinal;
- p:pWideChar;
- i,idx:integer;
- tmp:pTrayRadioStation;
- srch:tTrayRadioStation;
- pc:pAnsiChar;
- buf:array [0..63] of AnsiChar;
- mi:TCListMenuItem;
-begin
- trayStations.sortFunc:=@MyStrSort;
-
- // clear presents flag
- if trayStations.realCount>0 then
- for i:=0 to trayStations.realCount-1 do
- pTrayRadioStation(trayStations.Items[i]).presents:=0;
-
- // Fill list
- FillChar(srch,SizeOf(srch),0);
- hContact:=CallService(MS_DB_CONTACT_FINDFIRST,0,0);
- while hContact<>0 do
- begin
- if StrCmp(PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0)),cPluginName)=0 then
- begin
- p:=DBReadUnicode(hContact,strCList,'MyHandle',nil);
- if p<>nil then
- begin
- srch.name:=p;
- // search in list
- if List_GetIndex(@trayStations,@srch,@idx)<>0 then
- // found - set mark
- pTrayRadioStation(trayStations.Items[idx]).presents:=1
- else // add if not found
- begin
- mGetMem(tmp,SizeOf(tTrayRadioStation));
- tmp.name :=p;
- tmp.presents:=2;
- tmp.hContact:=hContact;
- List_InsertPtr(@trayStations,tmp);
- end;
- end;
- end;
- hContact:=CallService(MS_DB_CONTACT_FINDNEXT,hContact,0);
- end;
-
- // delete obsolete elements
- for i:=trayStations.realCount-1 downto 0 do
- begin
- tmp:=pTrayRadioStation(trayStations.Items[i]);
- if tmp.presents=0 then
- begin
- mFreeMem(tmp.name);
- DestroyServiceFunction(tmp.service);
- CallService(MS_CLIST_REMOVETRAYMENUITEM,tmp.menuitem,0);
- mFreeMem(tmp);
- List_Remove(@trayStations,i);
- end;
- end;
-
- // build menu from sorted list
- FillChar(mi,SizeOf(mi),0);
- mi.cbSize:=sizeof(mi);
- mi.Flags :=CMIF_KEEPUNTRANSLATED or CMIF_UNICODE or CMIF_ROOTHANDLE;
- mi.szPopupName:=TChar(trayparent);
- pc:=StrCopyE(@buf,'mRadio/Choose');
- for i:=0 to trayStations.realCount-1 do
- begin
- tmp:=pTrayRadioStation(trayStations.Items[i]);
- if tmp.presents=2 then
- begin
- IntToStr(pc,tmp.hContact);
- tmp.service:=CreateServiceFunctionParam(@buf,@ChooseStation,tmp.hContact);
- mi.position :=i;
- mi.pszService:=@buf;
- mi.szName.w :=tmp.name;
- tmp.menuitem:=Menu_AddTrayMenuItem(@mi);
- end;
- end;
-end;
-
-function TrayPlayPause(wParam:WPARAM;lParam:LPARAM):int_ptr; cdecl;
-begin
- result:=CallService(MS_RADIO_COMMAND,MRC_PAUSE,0);
-end;
-
-function TrayStop(wParam:WPARAM;lParam:LPARAM):int_ptr; cdecl;
-begin
- result:=CallService(MS_RADIO_COMMAND,MRC_STOP,0);
-end;
-
-procedure CreateTrayMenu();
-var
- mi:TCListMenuItem;
- playstr:pWideChar;
-begin
- FillChar(mi, sizeof(mi), 0);
- mi.cbSize :=sizeof(mi);
- mi.flags :=CMIF_UNICODE;
- mi.szName.w:=cPluginName;
- mi.hIcon :=CallService(MS_SKIN2_GETICON,0,lparam(IcoBtnSettings));
- trayradioparent:=Menu_AddTrayMenuItem(@mi);
-
- FillChar(mi, sizeof(mi), 0);
- mi.cbSize :=sizeof(mi);
- mi.szPopupName:=TChar(trayradioparent);
-
- if gVolume<0 then
- mi.flags:=CMIF_UNICODE or CMIF_ROOTHANDLE or CMIF_CHECKED
- else
- mi.flags:=CMIF_UNICODE or CMIF_ROOTHANDLE;
- mi.szName.w :='Mute';
- mi.pszService:=MS_RADIO_MUTE;
- mi.position :=1;
- traymute:=Menu_AddTrayMenuItem(@mi);
-
- mi.flags:=CMIF_UNICODE or CMIF_ROOTHANDLE;
- if CallService(MS_RADIO_COMMAND,MRC_STATUS,RD_STATUS_GET)<>RD_STATUS_PLAYING then
- playstr:='Play'
- else
- playstr:='Pause';
- mi.szName.w :=playstr;
- mi.position :=2;
- srvtrayplaypause:=CreateServiceFunction('mRadio/TrayPlayPause',@TrayPlayPause);
- mi.pszService:='mRadio/TrayPlayPause';
- trayplay:=Menu_AddTrayMenuItem(@mi);
-
- mi.szName.w :='Stop';
- mi.position :=3;
- srvtraystop:=CreateServiceFunction('mRadio/TrayStop',@TrayStop);
- mi.pszService:='mRadio/TrayStop';
- Menu_AddTrayMenuItem(@mi);
-
- mi.szName.w :='Play Station';
- mi.position :=1000;
- mi.pszService:=nil;
- trayparent:=Menu_AddTrayMenuItem(@mi);
-end;
-
-function TrayPrebuild(wParam:WPARAM;lParam:LPARAM):int; cdecl;
-var
- mi:tClistMenuItem;
- playstr:pWideChar;
-begin
- FillChar(mi,sizeof(mi),0);
- mi.cbSize:=sizeof(mi);
- if gVolume<0 then
- mi.flags:=CMIM_FLAGS or CMIF_CHECKED
- else
- mi.flags:=CMIM_FLAGS;
- CallService(MS_CLIST_MODIFYMENUITEM,traymute,tlparam(@mi));
-
- mi.flags:=CMIM_NAME or CMIF_UNICODE;
- if CallService(MS_RADIO_COMMAND,MRC_STATUS,RD_STATUS_GET)<>RD_STATUS_PLAYING then
- playstr:='Play'
- else
- playstr:='Pause';
- mi.szName.w:=playstr;
- CallService(MS_CLIST_MODIFYMENUITEM,trayplay,tlparam(@mi));
-
- MakeStationsMenu();
- result:=0;
-end;
-
-procedure CreateMIMTrayMenu;
-begin
- if ServiceExists(MS_CLIST_ADDTRAYMENUITEM)<>0 then
-// if hiddenwindow<>0 then
- begin
- CreateTrayMenu();
- MakeStationsMenu();
- HookEvent(ME_CLIST_PREBUILDTRAYMENU,@TrayPrebuild);
- end;
-end;
-
-procedure RemoveTrayItems;
-var
- i:integer;
- tmp:pTrayRadioStation;
-begin
- // remove stations
- for i:=trayStations.realCount-1 downto 0 do
- begin
- tmp:=pTrayRadioStation(trayStations.Items[i]);
- mFreeMem(tmp.name);
- DestroyServiceFunction(tmp.service);
-// CallService(MS_CLIST_REMOVETRAYMENUITEM,tmp.menuitem,0);
- mFreeMem(tmp);
- end;
- List_Destroy(@trayStations);
- DestroyServiceFunction(srvtrayplaypause);
- DestroyServiceFunction(srvtraystop);
-
- if ServiceExists(MS_CLIST_REMOVETRAYMENUITEM)<>0 then
- CallService(MS_CLIST_REMOVETRAYMENUITEM,trayradioparent,0);
-
-end;
diff --git a/plugins/mRadio/i_tray_api.inc b/plugins/mRadio/i_tray_api.inc
deleted file mode 100644
index 9339a10613..0000000000
--- a/plugins/mRadio/i_tray_api.inc
+++ /dev/null
@@ -1,125 +0,0 @@
-{}
-type
- pTrayRadioStation = ^tTrayRadioStation;
- tTrayRadioStation = record
- name:pWideChar;
- handle:THANDLE;
- end;
-
-function MyStrSort(para1:pointer; para2:pointer):int; cdecl;
-begin
- result:=StrCmpW(pTrayRadioStation(para1).name,pTrayRadioStation(para2).name);
-end;
-
-function MakeStationsMenu:HMENU;
-var
- hContact:Cardinal;
- sl:TSortedList;
- p:pWideChar;
- i:integer;
- flag:integer;
- tmp:pTrayRadioStation;
-begin
- result:=CreatePopupMenu;
- if result<>0 then
- begin
- FillChar(sl,SizeOf(sl),0);
- sl.increment:=16;
- sl.sortFunc:=@MyStrSort;
- hContact:=CallService(MS_DB_CONTACT_FINDFIRST,0,0);
- while hContact<>0 do
- begin
- if StrCmp(PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0)),cPluginName)=0 then
- begin
- p:=DBReadUnicode(hContact,strCList,'MyHandle',nil);
- if p<>nil then
- begin
- mGetMem(tmp,SizeOf(tTrayRadioStation));
- tmp.name:=p;
- tmp.handle:=hContact;
- List_InsertPtr(@sl,tmp);
- end;
- end;
- hContact:=CallService(MS_DB_CONTACT_FINDNEXT,hContact,0);
- end;
-
- for i:=0 to sl.realCount-1 do
- begin
- if (i=0) or ((i mod 20)<>0) then
- flag:=MF_STRING
- else
- flag:=MF_STRING or MF_MENUBARBREAK;
- tmp:=sl.Items[i];
- AppendMenuW(result,flag,tmp.handle,tmp.name);
- mFreeMem(tmp.name);
- mFreeMem(tmp);
- end;
- List_Destroy(@sl);
- end;
-end;
-
-function CreateTrayMenu(wParam:WPARAM;lParam:LPARAM):int; cdecl;
-const
- startid = 100;
-var
- menu:HMENU;
- flag,id:integer;
- pt:TPOINT;
- playstr:pWideChar;
-begin
- id:=0;
- menu:=CreatePopupMenu;
- if menu<>0 then
- begin
- if gVolume<0 then
- flag:=MF_STRING+MF_CHECKED
- else
- flag:=MF_STRING+MF_UNCHECKED;
-
- if CallService(MS_RADIO_COMMAND,MRC_STATUS,RD_STATUS_GET)<>RD_STATUS_PAUSED then
- playstr:='Pause'
- else
- playstr:='Play';
-
- AppendMenuW(menu,flag ,startid+1,TranslateW('Mute'));
- AppendMenuW(menu,MF_STRING,startid+2,TranslateW(playstr));
- AppendMenuW(menu,MF_STRING,startid+3,TranslateW('Stop'));
- AppendMenuW(menu,MF_SEPARATOR,0,nil);
- AppendMenuW(menu,MF_POPUP,MakeStationsMenu,TranslateW('Play Station'));
- GetCursorPos(pt);
- id:=integer(TrackPopupMenu(menu,TPM_RETURNCMD+TPM_NONOTIFY,pt.x,pt.y,0,hiddenwindow,nil));
- case id of
- 0: ; // nothing
- startid+1: begin // mute
- Service_RadioMute(0,0);
- end;
- startid+2: begin // play/pause
- CallService(MS_RADIO_COMMAND,MRC_PAUSE,0);
- end;
- startid+3: begin // stop
- CallService(MS_RADIO_COMMAND,MRC_STOP,0);
- end;
- else // choose station
- Service_RadioPlayStop(id,0);
- end;
- DestroyMenu(menu);
- end;
- result:=id;
-end;
-
-procedure CreateMIMTrayMenu;
-var
- mi:TCListMenuItem;
-begin
- if ServiceExists(MS_CLIST_ADDTRAYMENUITEM)<>0 then
-// if hiddenwindow<>0 then
- begin
- FillChar(mi, sizeof(mi), 0);
- mi.cbSize :=sizeof(mi);
- mi.pszService:=MS_RADIO_TRAYMENU;
- mi.szName.a :=cPluginName;
- mi.hIcon :=CallService(MS_SKIN2_GETICON,0,lparam(IcoBtnSettings));
- Menu_AddTrayMenuItem(@mi);
- end;
-end;
-
diff --git a/plugins/mRadio/i_variables.inc b/plugins/mRadio/i_variables.inc
deleted file mode 100644
index fead4afad8..0000000000
--- a/plugins/mRadio/i_variables.inc
+++ /dev/null
@@ -1,82 +0,0 @@
-{Variables support}
-const
- numvars = 8;
-type
- tvar = packed record
- name :PWideChar;
- help :PAnsiChar;
- end;
-const
- vars:array [0..numvars-1] of tvar = (
- (name:'radio_name' ;help:'Station Name'),
- (name:'radio_url' ;help:'Station/playlist URL'),
- (name:'radio_active' ;help:'Currently played URL'),
- (name:'radio_genre' ;help:'Genre'),
- (name:'radio_bitrate';help:'Bitrate'),
- (name:'radio_title' ;help:'Current stream title'),
- (name:'radio_codec' ;help:'Currently used decoder'),
- (name:'radio_status' ;help:'Current status'));
-// contact,protocol,host,port,file/path
-
-function GetField(ai:PARGUMENTSINFO):pWideChar; cdecl;
-var
- i:integer;
- res:PWideChar;
-begin
- res:=nil;
- if ActiveContact<>0 then
- begin
- i:=0;
- repeat
- if lstrcmpiw(PWideChar(ai^.argv^),vars[i].name)=0 then
- break;
- inc(i);
- until i=numvars;
- case i of
- 0: res:=DBReadUnicode(ActiveContact,strCList ,optMyHandle);
- 1: res:=DBReadUnicode(ActiveContact,PluginName,optStationURL);
- 2: StrDupW(res,ActiveURLw);
- 3: res:=DBReadUnicode(ActiveContact,PluginName,optGenre);
- 4: res:=DBReadUnicode(ActiveContact,PluginName,optBitrate);
- 5: res:=MakeMessage;
- 6: res:=DBReadUnicode(0,PluginName,optActiveCodec);
- 7: StrDupW(res,TranslateW(GetStatusText(CallService(MS_RADIO_COMMAND,MRC_STATUS,RD_STATUS_GET))));
- end;
- end;
- if res=nil then
- begin
- mGetMem(res,2);
- res^:=#0;
- end;
- result:=res;
-end;
-
-function FreeField(szReturn:PWideChar):int; cdecl;
-begin
- mFreeMem(szReturn);
- result:=1;
-end;
-
-procedure RegisterVariables;
-const
- Prefix:PAnsiChar = 'Radio'#9;
-var
- rt:TTOKENREGISTER;
- i:integer;
- s:array [0..127] of AnsiChar;
- p:pAnsiChar;
-begin
- rt.cbSize :=SizeOf(rt);
- rt.memType :=TR_MEM_OWNER;
- rt.szService :=@GetField;
- rt.szCleanupService:=@FreeField;
- rt.flags:=TRF_FIELD or TRF_CLEANUP or TRF_PARSEFUNC or TRF_CLEANUPFUNC or TRF_UNICODE;
- p:=StrCopyE(s,Prefix);
- rt.szHelpText:=@s;
- for i:=0 to numvars-1 do
- begin
- rt.szTokenString.w:=vars[i].name;
- StrCopy(p,vars[i].help);
- CallService(MS_VARS_REGISTERTOKEN,0,lparam(@rt));
- end;
-end;
diff --git a/plugins/mRadio/i_vars.inc b/plugins/mRadio/i_vars.inc
deleted file mode 100644
index 26e7024cc1..0000000000
--- a/plugins/mRadio/i_vars.inc
+++ /dev/null
@@ -1,184 +0,0 @@
-{used variables}
-
-{$include m_radio.inc}
-
-const
- optActiveCodec:PAnsiChar = 'ActiveCodec';
- optLastStn :PAnsiChar = 'LastStation';
- optConnect :PAnsiChar = 'AutoConnect';
- optAutoMute :PAnsiChar = 'AutoMute';
- optEQ_OFF :PAnsiChar = 'eqoff';
- optStatusMsg :PAnsiChar = 'StatusMsg';
- optCurElement :PAnsiChar = 'LastPlayed';
- optPlayFirst :PAnsiChar = 'PlayFromFirst';
- optActiveURL :PAnsiChar = 'ActiveURL';
- optContRec :PAnsiChar = 'ContRec';
- optLoop :PAnsiChar = 'Loop';
- optShuffle :PAnsiChar = 'Shuffle';
- optRecPath :PAnsiChar = 'RecordPath';
- optStatus :PAnsiChar = 'Status';
- optVolume :PAnsiChar = 'Volume';
- optBuffer :PAnsiChar = 'Buffer';
- optPreBuf :PAnsiChar = 'PreBuf';
- optTimeout :PAnsiChar = 'Timeout';
- optVersion :PAnsiChar = 'version';
- optStatusTmpl :PAnsiChar = 'StatusTmpl';
- optNumTries :PAnsiChar = 'NumTries';
- optOffline :PAnsiChar = 'asOffline';
- // mRadio compatibility
- optStationURL :PAnsiChar = 'StationURL';
- optMyHandle :PAnsiChar = 'MyHandle';
- optGenre :PAnsiChar = 'Genre';
- optBitrate :PAnsiChar = 'Bitrate';
- // UserInfo compatibility
- optFirstName :PAnsiChar = 'FirstName';
- optNick :PAnsiChar = 'Nick';
- optLastName :PAnsiChar = 'LastName';
- optAge :PAnsiChar = 'Age';
- // 3D sound support
- optEAXType :PAnsiChar = 'EAXtype';
- optForcedMono :PAnsiChar = 'ForcedMono';
-
- optGroup :PAnsiChar = 'Group';
- optBASSPath :PAnsiChar = 'BASSpath';
- optTitle :PAnsiChar = 'Title';
- optArtist :PAnsiChar = 'Artist';
-
-var
- hhRadioStatus,
- // service handles
- hsPlayStop,
- hsRecord,
- hsSettings,
- hsSetVol,
- hsGetVol,
- hsMute,
- hsCommand,
- hsExport,
- hsImport,
- hsTrayMenu,
- hsEqOnOff,
-
- hNetLib,
- hDblClick,
- hHookShutdown,
- hCMenuItemRec,
- hCMenuItemPlay,
- contexthook,
- opthook,
- onsetting,
- ondelete,
- onloadhook:THANDLE;
- hiddenwindow:HWND;
-var
- plist:tPlaylist;
-// plFile:pWideChar; // playlist file name (for delete after using?)
-// plLocal:boolean; // true - no need to delete playlist
-var
- RemoteSong:bool;
- gVolume:integer;
- NumTries:cardinal;
- doLoop:cardinal;
- PlayFirst:cardinal;
- doShuffle:cardinal;
- ForcedMono:cardinal;
- doContRec:cardinal;
- AuConnect:cardinal;
- AuMute:cardinal;
- AsOffline:cardinal;
- isEQ_OFF:cardinal;
- PluginStatus:integer;
- storagep,storage:PAnsiChar;
- recpath:pWideChar;
- sBuffer,
- sTimeout,
- sPreBuf:cardinal;
-const
- hVolCtrl :HWND=0;
- hVolFrmCtrl :HWND=0;
-const
- {$IFDEF KOL_MCK}
- btnMute:pIcoButton = nil;
- {$ELSE}
- hMuteFrmCtrl:HWND=0;
- {$ENDIF}
-const
- Inited:boolean=false;
-const
- StatusTmpl:pWideChar = nil;
- proxy:pAnsiChar = nil;
-type
- tEQRec = record
- fx :HFX;
- wnd :HWND;
- param :BASS_DX8_PARAMEQ;
- text :PAnsiChar;
- end;
-var
- eq:array [0..9] of tEQRec = (
- (fx:0;wnd:0;param:(fCenter:80 ;fBandwidth:18;fGain:0);text:'80'),
- (fx:0;wnd:0;param:(fCenter:170 ;fBandwidth:18;fGain:0);text:'170'),
- (fx:0;wnd:0;param:(fCenter:310 ;fBandwidth:18;fGain:0);text:'310'),
- (fx:0;wnd:0;param:(fCenter:600 ;fBandwidth:18;fGain:0);text:'600'),
- (fx:0;wnd:0;param:(fCenter:1000 ;fBandwidth:18;fGain:0);text:'1k'),
- (fx:0;wnd:0;param:(fCenter:3000 ;fBandwidth:18;fGain:0);text:'3k'),
- (fx:0;wnd:0;param:(fCenter:6000 ;fBandwidth:18;fGain:0);text:'6k'),
- (fx:0;wnd:0;param:(fCenter:12000;fBandwidth:18;fGain:0);text:'12k'),
- (fx:0;wnd:0;param:(fCenter:14000;fBandwidth:18;fGain:0);text:'14k'),
- (fx:0;wnd:0;param:(fCenter:16000;fBandwidth:18;fGain:0);text:'16k'));
-const
- IcoBtnSettings:PAnsiChar = 'Radio_Setting';
- IcoBtnOn :PAnsiChar = 'Radio_On';
- IcoBtnOff :PAnsiChar = 'Radio_Off';
- IcoBtnRecUp :PAnsiChar = 'Radio_RecUp';
- IcoBtnRecDn :PAnsiChar = 'Radio_RecDn';
- IcoBtnAdd :PAnsiChar = 'Radio_Add';
- IcoBtnDel :PAnsiChar = 'Radio_Del';
-const
- hRecord :THANDLE = 0;
- chan :HSTREAM = 0;
- ActiveContact:THANDLE = 0;
- ActiveURLw :PWideChar = nil;
-
-type
- TEAXItem = record
- name:PWideChar;
- code:dword;
- end;
-const
- EAXItems:array [0..EAX_ENVIRONMENT_COUNT] of TEAXItem=(
- (name:'Off' ; code:0),
- (name:'Generic' ; code:EAX_ENVIRONMENT_GENERIC),
- (name:'Padded Cell' ; code:EAX_ENVIRONMENT_PADDEDCELL),
- (name:'Room' ; code:EAX_ENVIRONMENT_ROOM),
- (name:'Bathroom' ; code:EAX_ENVIRONMENT_BATHROOM),
- (name:'Living Room' ; code:EAX_ENVIRONMENT_LIVINGROOM),
- (name:'Stone Room' ; code:EAX_ENVIRONMENT_STONEROOM),
- (name:'Auditorium' ; code:EAX_ENVIRONMENT_AUDITORIUM),
- (name:'Concert Hall' ; code:EAX_ENVIRONMENT_CONCERTHALL),
- (name:'Cave' ; code:EAX_ENVIRONMENT_CAVE),
- (name:'Arena' ; code:EAX_ENVIRONMENT_ARENA),
- (name:'Hangar' ; code:EAX_ENVIRONMENT_HANGAR),
- (name:'Carpeted Hallway'; code:EAX_ENVIRONMENT_CARPETEDHALLWAY),
- (name:'Hallway' ; code:EAX_ENVIRONMENT_HALLWAY),
- (name:'Stone Corridor' ; code:EAX_ENVIRONMENT_STONECORRIDOR),
- (name:'Alley' ; code:EAX_ENVIRONMENT_ALLEY),
- (name:'Forrest' ; code:EAX_ENVIRONMENT_FOREST),
- (name:'City' ; code:EAX_ENVIRONMENT_CITY),
- (name:'Mountains' ; code:EAX_ENVIRONMENT_MOUNTAINS),
- (name:'Quarry' ; code:EAX_ENVIRONMENT_QUARRY),
- (name:'Plain' ; code:EAX_ENVIRONMENT_PLAIN),
- (name:'Parking Lot' ; code:EAX_ENVIRONMENT_PARKINGLOT),
- (name:'Sewer Pipe' ; code:EAX_ENVIRONMENT_SEWERPIPE),
- (name:'Under Water' ; code:EAX_ENVIRONMENT_UNDERWATER),
- (name:'Drugged' ; code:EAX_ENVIRONMENT_DRUGGED),
- (name:'Dizzy' ; code:EAX_ENVIRONMENT_DIZZY),
- (name:'Psychotic' ; code:EAX_ENVIRONMENT_PSYCHOTIC));
-
-type
- tPreset = record
- name :PWideChar;
- preset:array [0..9] of shortint;
- end;
-var
- Presets: array of tPreset;
diff --git a/plugins/mRadio/i_visual.inc b/plugins/mRadio/i_visual.inc
deleted file mode 100644
index 77012b55f2..0000000000
--- a/plugins/mRadio/i_visual.inc
+++ /dev/null
@@ -1,115 +0,0 @@
-{Visual part}
-function OnContactMenu(hContact:WPARAM;lParam:LPARAM):int;cdecl;
-var
- mi:TCListMenuItem;
-begin
- FillChar(mi,SizeOf(mi),0);
- mi.cbSize:=sizeof(mi);
- if StrCmp(PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0)),
- PluginName)<>0 then
- begin
- mi.flags:=CMIM_FLAGS or CMIF_HIDDEN;
- CallService(MS_CLIST_MODIFYMENUITEM,hCMenuItemPlay,tlparam(@mi));
- end
- else
- begin
- // play/Stop
- mi.flags:=CMIM_FLAGS or CMIM_ICON or CMIM_NAME;
- if THANDLE(hContact)<>ActiveContact then
- begin
- mi.szName.a:='Start broadcasting';
- mi.hIcon:=CallService(MS_SKIN2_GETICON,0,tlparam(IcoBtnOn));
- end
- else
- begin
- mi.szName.a:='Stop broadcasting';
- mi.hIcon:=CallService(MS_SKIN2_GETICON,0,tlparam(IcoBtnOff));
- end;
- CallService(MS_CLIST_MODIFYMENUITEM,hCMenuItemPlay,tlparam(@mi));
-
- // record
- mi.flags:=CMIM_FLAGS or CMIM_ICON or CMIM_NAME;
- if Service_RadioRecord(0,1)<>0 then
- begin
- mi.szName.a:='Stop record';
- mi.hIcon:=CallService(MS_SKIN2_GETICON,0,tlparam(IcoBtnRecDn));
- end
- else
- begin
- mi.szName.a:='Start record';
- mi.hIcon:=CallService(MS_SKIN2_GETICON,0,tlparam(IcoBtnRecUp));
- end;
- end;
- CallService(MS_CLIST_MODIFYMENUITEM,hCMenuItemRec,tlparam(@mi));
- result:=0;
-end;
-
-procedure CreateMenu;
-var
- mi:TCListMenuItem;
-begin
- FillChar(mi, sizeof(mi), 0);
- mi.cbSize :=sizeof(mi);
-// mi.popupPosition:=MenuUserInfoPos;
- mi.pszService:=MS_RADIO_RECORD;
- mi.szName.a :='Start/Stop Record';
- hCMenuItemRec:=Menu_AddContactMenuItem(@mi);
-
-//!! mi.flags :=CMIF_NOTOFFLINE or CMIF_NOTOFFLIST;
- mi.hIcon :=CallService(MS_SKIN2_GETICON,0,lparam(IcoBtnOn));
- mi.pszService :=MS_RADIO_PLAYSTOP;
- mi.szName.a :='Start/Stop broadcasting';
- hCMenuItemPlay:=Menu_AddContactMenuItem(@mi);
-end;
-
-procedure RegisterIcons;
-var
- sid:TSKINICONDESC;
-begin
- FillChar(sid,SizeOf(TSKINICONDESC),0);
- sid.cbSize:=SizeOf(TSKINICONDESC);
- sid.cx:=16;
- sid.cy:=16;
- sid.szSection.a:='Protocols/mRadio';
- sid.hDefaultIcon :=LoadImage(hInstance,MAKEINTRESOURCE(BTN_RECUP),IMAGE_ICON,16,16,0);
- sid.pszName :=IcoBtnRecUp;
- sid.szDescription.a:='Start record';
- Skin_AddIcon(@sid);
- DestroyIcon(sid.hDefaultIcon);
-
- sid.hDefaultIcon :=LoadImage(hInstance,MAKEINTRESOURCE(BTN_RECDN),IMAGE_ICON,16,16,0);
- sid.pszName :=IcoBtnRecDn;
- sid.szDescription.a:='Stop record';
- Skin_AddIcon(@sid);
- DestroyIcon(sid.hDefaultIcon);
-
- sid.hDefaultIcon :=LoadImage(hInstance,MAKEINTRESOURCE(IDI_MAIN),IMAGE_ICON,16,16,0);
- sid.pszName :=IcoBtnSettings;
- sid.szDescription.a:='Settings';
- Skin_AddIcon(@sid);
- DestroyIcon(sid.hDefaultIcon);
-
- sid.hDefaultIcon :=LoadImage(hInstance,MAKEINTRESOURCE(IDI_ON),IMAGE_ICON,16,16,0);
- sid.pszName :=IcoBtnOn;
- sid.szDescription.a:='Broadcast ON';
- Skin_AddIcon(@sid);
- DestroyIcon(sid.hDefaultIcon);
-
- sid.hDefaultIcon :=LoadImage(hInstance,MAKEINTRESOURCE(IDI_OFF),IMAGE_ICON,16,16,0);
- sid.pszName :=IcoBtnOff;
- sid.szDescription.a:='Broadcast OFF';
- Skin_AddIcon(@sid);
- DestroyIcon(sid.hDefaultIcon);
-
- sid.hDefaultIcon :=LoadImage(hInstance,MAKEINTRESOURCE(IDI_ADD),IMAGE_ICON,16,16,0);
- sid.pszName :=IcoBtnAdd;
- sid.szDescription.a:='Add EQ preset';
- Skin_AddIcon(@sid);
- DestroyIcon(sid.hDefaultIcon);
-
- sid.hDefaultIcon :=LoadImage(hInstance,MAKEINTRESOURCE(IDI_DEL),IMAGE_ICON,16,16,0);
- sid.pszName :=IcoBtnDel;
- sid.szDescription.a:='Delete EQ preset';
- Skin_AddIcon(@sid);
- DestroyIcon(sid.hDefaultIcon);
-end;
diff --git a/plugins/mRadio/ico/delete.ico b/plugins/mRadio/ico/delete.ico
deleted file mode 100644
index eea851da19..0000000000
--- a/plugins/mRadio/ico/delete.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/mRadio/ico/mradio.ico b/plugins/mRadio/ico/mradio.ico
deleted file mode 100644
index e95c6fe21a..0000000000
--- a/plugins/mRadio/ico/mradio.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/mRadio/ico/new.ico b/plugins/mRadio/ico/new.ico
deleted file mode 100644
index 73937210e0..0000000000
--- a/plugins/mRadio/ico/new.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/mRadio/ico/off.ico b/plugins/mRadio/ico/off.ico
deleted file mode 100644
index 041e55bb9e..0000000000
--- a/plugins/mRadio/ico/off.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/mRadio/ico/on.ico b/plugins/mRadio/ico/on.ico
deleted file mode 100644
index 35bf39e0b9..0000000000
--- a/plugins/mRadio/ico/on.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/mRadio/ico/recoff.ico b/plugins/mRadio/ico/recoff.ico
deleted file mode 100644
index 4bb6000ef0..0000000000
--- a/plugins/mRadio/ico/recoff.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/mRadio/ico/recon.ico b/plugins/mRadio/ico/recon.ico
deleted file mode 100644
index d8007b1c8c..0000000000
--- a/plugins/mRadio/ico/recon.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/mRadio/make.bat b/plugins/mRadio/make.bat
deleted file mode 100644
index dd8fca64a6..0000000000
--- a/plugins/mRadio/make.bat
+++ /dev/null
@@ -1,20 +0,0 @@
-@echo off
-if /i '%1' == 'fpc' (
- set OUTDIR="..\..\bin10\Release\Plugins"
- set FPCBIN=fpc.exe
-) else if /i '%1' == 'fpc64' (
- set OUTDIR="..\..\bin10\Release64\Plugins"
- set FPCBIN=ppcrossx64.exe
-)
-set PROJECT=mRadio
-
-if not exist %OUTDIR% mkdir %OUTDIR%
-md tmp
-
-rem brcc32.exe mradio.rc -fomradio.res
-
-%FPCBIN% @..\Utils.pas\fpc.cfg %PROJECT%.dpr %2 %3 %4 %5 %6 %7 %8 %9
-
-move .\tmp\%PROJECT%.dll %OUTDIR%
-del /Q tmp\*
-rd tmp
diff --git a/plugins/mRadio/mr_rc.inc b/plugins/mRadio/mr_rc.inc
deleted file mode 100644
index 41998194b6..0000000000
--- a/plugins/mRadio/mr_rc.inc
+++ /dev/null
@@ -1,87 +0,0 @@
-const
- IDD_SEARCH = 101;
- IDD_SETTING = 102;
- IDD_SETTING_TECH = 103;
- IDD_FRAME = 104;
-
- IDC_GENRE = 1025;
- IDC_BITRATE = 1026;
- IDC_STATION = 1027;
- IDC_LT = 1029;
- IDC_EQ = 1030;
- IDC_GT = 1031;
-
- IDC_LOOP = 1032;
- IDC_SHUFFLE = 1033;
- IDC_CONTREC = 1034;
- IDC_PLAYFIRST = 1035;
- IDC_EQOFF = 1036;
- IDC_BN_INIPATH = 1037;
- IDC_BN_URLPATH = 1038;
- IDC_CUSTOMINI = 1039;
-
- IDC_VOLUME = 1040;
- IDC_STATIONURL = 1041;
- IDC_ADD_LIST = 1042;
- IDC_ADD_INI = 1043;
- IDC_BN_RECPATH = 1044;
- IDC_ED_RECPATH = 1045;
- IDC_BN_RECORD = 1046;
- IDC_EAXTYPE = 1047;
- IDC_USEEAX = 1048;
- IDC_BUFFER = 1049;
- IDC_PREBUF = 1050;
- IDC_TIMEOUT = 1051;
- IDC_PRESET = 1052;
- IDC_TRIES = 1053;
- IDC_MONO = 1054;
-
- IDC_BASSPATH = 1100;
- IDC_BASSPTHBTN = 1101;
-
- IDC_ZERO = 1060;
- IDC_EQ00 = 1061;
- IDC_EQ01 = 1062;
- IDC_EQ02 = 1063;
- IDC_EQ03 = 1064;
- IDC_EQ04 = 1065;
- IDC_EQ05 = 1066;
- IDC_EQ06 = 1067;
- IDC_EQ07 = 1068;
- IDC_EQ08 = 1069;
- IDC_EQ09 = 1070;
- IDC_0 = 1161;
- IDC_1 = 1162;
- IDC_2 = 1163;
- IDC_3 = 1164;
- IDC_4 = 1165;
- IDC_5 = 1166;
- IDC_6 = 1167;
- IDC_7 = 1168;
- IDC_8 = 1169;
- IDC_9 = 1170;
-
- IDC_CONNECT = 1072;
- IDC_OFFLINE = 1073;
- IDC_AUTOMUTE = 1074;
-
- IDC_STATUS = 1075;
- IDC_HLP_VARS = 1076;
-
- IDC_IMPORT = 1077;
- IDC_EXPORT = 1078;
-
- IDC_EQ_ADD = 1079;
- IDC_EQ_DEL = 1080;
-
- IDC_RADIO_MUTE = 1025;
- IDC_RADIO_VOL = 1026;
-
- BTN_RECUP = 202;
- BTN_RECDN = 203;
-
- IDI_MAIN = 302;
- IDI_ON = 303;
- IDI_OFF = 304;
- IDI_ADD = 305;
- IDI_DEL = 306;
diff --git a/plugins/mRadio/mradio.dpr b/plugins/mRadio/mradio.dpr
deleted file mode 100644
index 56c2b7dba9..0000000000
--- a/plugins/mRadio/mradio.dpr
+++ /dev/null
@@ -1,350 +0,0 @@
-{.$DEFINE CHANGE_NAME_BUFFERED}
-{$include compilers.inc}
-{$IFDEF COMPILER_16_UP}
- {$WEAKLINKRTTI ON}
- {.$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}
-{$ENDIF}
-{$IMAGEBASE $13300000}
-library mradio;
-
-uses
-// FastMM4,
- {$IFDEF KOL_MCK}kol,icobuttons,KOLCCtrls,{$ENDIF}Windows,messages,commctrl
- ,common,io,wrapper,wrapdlgs,syswin
- ,Dynamic_Bass,dynbasswma
- ,m_api,dbsettings,mirutils,playlist,memini;
-
-{$include mr_rc.inc}
-{$r mradio.res}
-
-{$include i_vars.inc}
-
-const
- cPluginName = 'mRadio';
-const
- PluginName:PAnsiChar = cPluginName;
-
-function MakeMessage:pWideChar;
-var
- p,artist,title:pWideChar;
- len:cardinal;
-begin
- artist:=DBReadUnicode(0,PluginName,optArtist);
- title :=DBReadUnicode(0,PluginName,optTitle);
- len:=StrLenW(artist);
- if (artist<>nil) and (title<>nil) then
- inc(len,3);
- inc(len,StrLenW(title));
-
- if len>0 then
- begin
- mGetMem(result,(len+1)*SizeOf(WideChar));
- p:=result;
- if artist<>nil then
- begin
- p:=StrCopyEW(p,artist);
- if title<>nil then
- p:=StrCopyEW(p,' - ');
- mFreeMem(artist);
- end;
- if title<>nil then
- begin
- StrCopyW(p,title);
- mFreeMem(title);
- end;
- end
- else
- result:=nil;
-end;
-
-procedure SetStatus(hContact:THANDLE;status:integer);
-begin
-// if Status=ID_STATUS_OFFLINE then
-// MyStopBass;
-
- if status=ID_STATUS_OFFLINE then
- begin
- if (AsOffline=BST_UNCHECKED) or (PluginStatus<>ID_STATUS_OFFLINE) then
- status:=ID_STATUS_INVISIBLE;
- end;
-
- if hContact=0 then
- begin
- hContact:=CallService(MS_DB_CONTACT_FINDFIRST,0,0);
- while hContact<>0 do
- begin
- if StrCmp(PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0)),PluginName)=0 then
- begin
- DBWriteWord(hContact,PluginName,optStatus,status);
- end;
- hContact:=CallService(MS_DB_CONTACT_FINDNEXT,hContact,0);
- end;
- end
- else
- DBWriteWord(hContact,PluginName,optStatus,status);
-end;
-
-{$include i_search.inc}
-{$include i_bass.inc}
-{$include i_cc.inc}
-{$include i_variables.inc}
-{$include i_service.inc}
-{$include i_myservice.inc}
-{$include i_hotkey.inc}
-{$IFDEF KOL_MCK}
- {$include i_frame.inc}
-{$ELSE}
- {$include i_frameapi.inc}
-{$ENDIF}
-{$include i_tray.inc}
-{$include i_visual.inc}
-{$include i_optdlg.inc}
-
-function MirandaPluginInfoEx(mirandaVersion:DWORD):PPLUGININFOEX; cdecl;
-begin
- result:=@PluginInfo;
- PluginInfo.cbSize :=SizeOf(TPLUGININFOEX);
- PluginInfo.shortName :='mRadio Mod';
- PluginInfo.version :=$00000202;
- PluginInfo.description:='This plugin plays and records Internet radio streams.'+
- ' Also local media files can be played.';
- PluginInfo.author :='Awkward';
- PluginInfo.authorEmail:='panda75@bk.ru; awk1975@ya.ru';
- PluginInfo.copyright :='(c) 2007-2012 Awkward';
- PluginInfo.homepage :='http://code.google.com/p/delphi-miranda-plugins/';
- PluginInfo.flags :=UNICODE_AWARE;
- PluginInfo.uuid :=MIID_MRADIO;
-end;
-
-function OnModulesLoaded(wParam:WPARAM;lParam:LPARAM):int;cdecl;
-var
- nlu:TNETLIBUSER;
- szTemp:array [0..255] of AnsiChar;
- i:integer;
-begin
- UnhookEvent(onloadhook);
-
- DBWriteDWord(0,PluginName,optVersion,PluginInfo.version);
-
- szTemp[0]:='E';
- szTemp[1]:='Q';
- szTemp[2]:='_';
- szTemp[4]:=#0;
- for i:=0 to 9 do
- begin
- szTemp[3]:=AnsiChar(ORD('0')+i);
- eq[i].param.fGain:=DBReadByte(0,PluginName,szTemp,15)-15;
- end;
- LoadPresets;
-
- RegisterIcons;
- CreateMenu;
- CreateMIMTrayMenu;
-
- FillChar(nlu,SizeOf(nlu),0);
- StrCopy(szTemp,Translate('%s server connection'));
- StrReplace(szTemp,'%s',PluginName);
- nlu.szDescriptiveName.a:=szTemp;
- nlu.cbSize :=SizeOf(nlu);
- nlu.flags :=NUF_HTTPCONNS or NUF_NOHTTPSOPTION or NUF_OUTGOING;
- nlu.szSettingsModule :=PluginName;
- hNetLib:=CallService(MS_NETLIB_REGISTERUSER,0,tlparam(@nlu));
-
-// CallService(MS_RADIO_COMMAND,MRC_RECORD,2); record off - not so necessary
-
- recpath:=DBReadUnicode(0,PluginName,optRecPath);
-
- sPreBuf:=DBReadWord(0,PluginName,optPreBuf,75);
- BASS_SetConfig(BASS_CONFIG_NET_PREBUF,sPreBuf);
-
- sBuffer:=DBReadWord(0,PluginName,optBuffer,5000);
- BASS_SetConfig(BASS_CONFIG_NET_BUFFER,sBuffer);
-
- sTimeout:=DBReadWord(0,PluginName,optTimeout,5000);
- BASS_SetConfig(BASS_CONFIG_NET_TIMEOUT,sTimeout);
-
- doLoop :=DBReadByte(0,PluginName,optLoop);
- doShuffle :=DBReadByte(0,PluginName,optShuffle);
- doContRec :=DBReadByte(0,PluginName,optContRec);
- PlayFirst :=DBReadByte(0,PluginName,optPlayFirst);
- isEQ_OFF :=DBReadByte(0,PluginName,optEQ_OFF);
- AuConnect :=DBReadByte(0,PluginName,optConnect);
- AuMute :=DBReadByte(0,PluginName,optAutoMute);
- AsOffline :=DBReadByte(0,PluginName,optOffline);
- gVolume :=DBReadByte(0,PluginName,optVolume,50);
- NumTries :=DBReadByte(0,PluginName,optNumTries,1);
- ForcedMono:=DBReadByte(0,PluginName,optForcedMono);
- if NumTries<1 then NumTries:=1;
-
- SetStatus(0,ID_STATUS_OFFLINE);
-
- StatusTmpl:=DBReadUnicode(0,PluginName,optStatusTmpl,'%radio_title%');
-
- CallService(MS_RADIO_COMMAND,MRC_STATUS,RD_STATUS_NOSTATION);
-
- IsMultiThread:=true;
-
- RegisterVariables;
-
- if AuConnect<>BST_UNCHECKED then
- ActiveContact:=LoadContact(PluginName,optLastStn)
- else
- ActiveContact:=0;
-
- onsetting:=HookEvent(ME_DB_CONTACT_SETTINGCHANGED,@OnSettingsChanged);
- ondelete :=HookEvent(ME_DB_CONTACT_DELETED ,@OnContactDeleted);
- randomize;
- CreateFrame(0);
-
- RegisterHotKey;
-
- result:=0;
-end;
-
-function PreShutdown(wParam:WPARAM;lParam:LPARAM):int;cdecl;
-{
-var
- buf:array [0..MAX_PATH-1] of AnsiChar;
- fdata:WIN32_FIND_DATAA;
- p:pAnsiChar;
- fi:THANDLE;
-}
-begin
- RemoveTrayItems;
-
- CallService(MS_RADIO_COMMAND,MRC_STOP,1);
- UnregisterHotKey;
-
- DestroyProtoServices;
- DestroyWindow(hiddenwindow);
- DestroyFrame();
- MyFreeBASS;
- DBWriteByte(0,PluginName,optVolume,gVolume);
-
- DestroyServiceFunction(hsTrayMenu);
- DestroyServiceFunction(hsPlayStop);
- DestroyServiceFunction(hsRecord);
- DestroyServiceFunction(hsSettings);
- DestroyServiceFunction(hsSetVol);
- DestroyServiceFunction(hsGetVol);
- DestroyServiceFunction(hsMute);
- DestroyServiceFunction(hsCommand);
- DestroyServiceFunction(hsEqOnOff);
-
- DestroyServiceFunction(hsExport);
- DestroyServiceFunction(hsImport);
-
- DestroyHookableEvent(hhRadioStatus);
-
- UnhookEvent(onsetting);
- UnhookEvent(ondelete);
- UnhookEvent(hHookShutdown);
- UnhookEvent(hDblClick);
- UnhookEvent(opthook);
- UnhookEvent(contexthook);
-
- CallService(MS_NETLIB_CLOSEHANDLE,hNetLib,0);
- mFreeMem(storage);
- mFreeMem(storagep);
- mFreeMem(recpath);
- mFreeMem(StatusTmpl);
- mFreeMem(basspath);
- FreePresets;
-{
- //delete cover files
- buf[0]:=#0;
- GetTempPathA(MAX_PATH,buf);
- p:=StrEnd(buf);
- StrCopy(p,'mrAvt*.*');
-
- fi:=FindFirstFileA(buf,fdata);
- if fi<>THANDLE(INVALID_HANDLE_VALUE) then
- begin
- repeat
- StrCopy(p,fdata.cFileName);
- DeleteFileA(buf);
- until not FindNextFileA(fi,fdata);
- FindClose(fi);
- end;
-}
- result:=0;
-end;
-
-function Load(): int; cdecl;
-var
- desc:TPROTOCOLDESCRIPTOR;
- szTemp:array [0..MAX_PATH-1] of WideChar;
- pc:pWideChar;
- custom:pWideChar;
-begin
- Langpack_register;
-
- GetModuleFileNameW(0,szTemp,MAX_PATH-1);
- pc:=StrEndW(szTemp);
- repeat
- dec(pc);
- until pc^='\';
- inc(pc);
- pc^:=#0;
-
- custom:=DBReadUnicode(0,PluginName,optBASSPath,nil);
-
- if MyLoadBASS(szTemp,custom) then
- begin
- StrCopyW(pc,'plugins\mradio.ini');
-// StrDup(storage,szTemp);
- FastWideToAnsi(szTemp,storage);
- mGetMem(storagep,MAX_PATH+32);
- CallService(MS_DB_GETPROFILEPATH,MAX_PATH-1,lparam(storagep));
- StrCat(storagep,'\mradio.ini');
-
- FillChar(desc,SizeOf(desc),0);
- desc.cbSize:=PROTOCOLDESCRIPTOR_V3_SIZE;//SizeOf(desc);
- desc.szName:=PluginName;
- desc._type :=PROTOTYPE_PROTOCOL;
- CallService(MS_PROTO_REGISTERMODULE,0,lparam(@desc));
-
- hhRadioStatus:=CreateHookableEvent(ME_RADIO_STATUS);
-
- hsPlayStop:=CreateServiceFunction(MS_RADIO_PLAYSTOP,@Service_RadioPlayStop);
- hsRecord :=CreateServiceFunction(MS_RADIO_RECORD ,@Service_RadioRecord);
- hsSettings:=CreateServiceFunction(MS_RADIO_SETTINGS,@Service_RadioSettings);
- hsSetVol :=CreateServiceFunction(MS_RADIO_SETVOL ,@Service_RadioSetVolume);
- hsGetVol :=CreateServiceFunction(MS_RADIO_GETVOL ,@Service_RadioGetVolume);
- hsMute :=CreateServiceFunction(MS_RADIO_MUTE ,@Service_RadioMute);
- hsCommand :=CreateServiceFunction(MS_RADIO_COMMAND ,@ControlCenter);
- hsEqOnOff :=CreateServiceFunction(MS_RADIO_EQONOFF ,@Service_EqOnOff);
-
- hiddenwindow:=CreateHiddenWindow;
- hsTrayMenu:=CreateServiceFunction(MS_RADIO_TRAYMENU,@CreateTrayMenu);
-
- hsExport :=CreateServiceFunction(MS_RADIO_EXPORT ,@ExportAll);
- hsImport :=CreateServiceFunction(MS_RADIO_IMPORT ,@ImportAll);
-
-
- CreateProtoServices;
- onloadhook :=HookEvent(ME_SYSTEM_MODULESLOADED ,@OnModulesLoaded);
- hHookShutdown:=HookEvent(ME_SYSTEM_OKTOEXIT ,@PreShutdown);
- hDblClick :=HookEvent(ME_CLIST_DOUBLECLICKED ,@Service_RadioPlayStop{@DblClickProc});
- opthook :=HookEvent(ME_OPT_INITIALISE ,@OnOptInitialise);
- contexthook :=HookEvent(ME_CLIST_PREBUILDCONTACTMENU,@OnContactMenu);
-
- PluginStatus:=ID_STATUS_OFFLINE;
- end;
- mFreeMem(custom);
-
- Result:=0;
-end;
-
-function Unload: int; cdecl;
-begin
- Unload_BASSDLL;
- Result:=0;
-end;
-
-exports
- Load, Unload,
- MirandaPluginInfoEx;
-
-begin
-end.
diff --git a/plugins/mRadio/mradio.rc b/plugins/mRadio/mradio.rc
deleted file mode 100644
index 91e976fa35..0000000000
--- a/plugins/mRadio/mradio.rc
+++ /dev/null
@@ -1,182 +0,0 @@
-#include "mr_rc.inc"
-
-LANGUAGE 0,0
-
-IDD_SETTING DIALOGEX 0, 0, 304, 226, 0
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0
-{
- GROUPBOX "Add Station",-1,1,1,200,108, WS_TABSTOP
- LTEXT "Station Name",IDC_STATIC,6,12,192,8
- EDITTEXT IDC_STATION,4,22,194,11,ES_AUTOHSCROLL
- LTEXT "Station URL (required)",IDC_STATIC,6,36,178,8
- PUSHBUTTON "...", IDC_BN_URLPATH, 184,47,14,11, BS_BOTTOM
- EDITTEXT IDC_STATIONURL,4,47,178,11,ES_AUTOHSCROLL
- LTEXT "Genre",IDC_STATIC,6,60,192,8
- EDITTEXT IDC_GENRE,4,71,194,11,ES_AUTOHSCROLL
- LTEXT "Bitrate",IDC_STATIC,6,84,46,8
- EDITTEXT IDC_BITRATE,4,94,48,11, ES_RIGHT | ES_NUMBER
- CTEXT "Add station",IDC_STATIC,74,84,124,8
- PUSHBUTTON "To list", IDC_ADD_LIST, 74,94,60,11
- PUSHBUTTON "To INI" , IDC_ADD_INI , 138,94,60,11
-
- GROUPBOX "Record",-1,1,114,200,34, WS_TABSTOP
- CTEXT "Record path",IDC_STATIC,4,122,194,8,SS_CENTERIMAGE
- EDITTEXT IDC_ED_RECPATH,4,132,178,12,ES_AUTOHSCROLL
- PUSHBUTTON "...", IDC_BN_RECPATH, 184,132,14,12
-
- GROUPBOX "Status Message",-1,1,152,200,70, WS_TABSTOP
- CONTROL "V", IDC_HLP_VARS, "MButtonClass",WS_TABSTOP, 4,162,16,16,$18000000
- RTEXT "Status message template",IDC_STATIC,22,170,174,10
- EDITTEXT IDC_STATUS,4,180,194,40,
- ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN
-
- AUTOCHECKBOX "Shuffle playlist" ,IDC_SHUFFLE , 204, 4,98,22, BS_VCENTER | BS_MULTILINE
- AUTOCHECKBOX "Play from first" ,IDC_PLAYFIRST, 204, 28,98,22, BS_VCENTER | BS_MULTILINE
- AUTOCHECKBOX "Loop single media" ,IDC_LOOP , 204, 52,98,22, BS_VCENTER | BS_MULTILINE
- AUTOCHECKBOX "Continuous record" ,IDC_CONTREC , 204, 76,98,22, BS_VCENTER | BS_MULTILINE
- AUTOCHECKBOX "Autoconnect last station" ,IDC_CONNECT , 204,100,98,22, BS_VCENTER | BS_MULTILINE
- AUTOCHECKBOX "Protocol depending status" ,IDC_OFFLINE , 204,124,98,22, BS_VCENTER | BS_MULTILINE
- AUTOCHECKBOX "Mute with Miranda" ,IDC_AUTOMUTE , 204,148,98,22, BS_VCENTER | BS_MULTILINE
-
- PUSHBUTTON "Import File", IDC_IMPORT, 204,188,98,16, BS_MULTILINE
- PUSHBUTTON "Export All" , IDC_EXPORT, 204,206,98,16, BS_MULTILINE
-}
-
-IDD_SETTING_TECH DIALOGEX 0, 0, 304, 226, 0
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0
-{
- CTEXT "Use EAX",IDC_USEEAX,2,34,72,16,SS_CENTERIMAGE
- COMBOBOX IDC_EAXTYPE,75,34,96,75,CBS_DROPDOWNLIST | WS_VSCROLL
-
- AUTOCHECKBOX "Forced Mono",IDC_MONO,2,52,169,16, BS_RIGHT | BS_VCENTER | BS_LEFTTEXT
-
- CONTROL "",IDC_VOLUME,"msctls_trackbar32",TBS_NOTICKS | WS_TABSTOP|$100,19,12,129,16
- CTEXT "min",IDC_STATIC,5,15,18,8
- CTEXT "max",IDC_STATIC,150,15,18,8
- GROUPBOX "Volume",-1,2,2,170,28, WS_TABSTOP
-
- GROUPBOX "",-1,174,2,128,73, WS_TABSTOP
- LTEXT "Buffer, ms (5000)",IDC_STATIC,210,8,90,16,SS_CENTERIMAGE
- EDITTEXT IDC_BUFFER,178,10,30,12, ES_RIGHT | ES_NUMBER
- LTEXT "PreBuf, % (75%)",IDC_STATIC,210,24,90,16,SS_CENTERIMAGE
- EDITTEXT IDC_PREBUF,178,26,30,12, ES_RIGHT | ES_NUMBER
- LTEXT "Timeout, ms (5000)",IDC_STATIC,210,40,90,16,SS_CENTERIMAGE
- EDITTEXT IDC_TIMEOUT,178,42,30,12, ES_RIGHT | ES_NUMBER
- LTEXT "Tries to connect",IDC_STATIC,210,56,90,16,SS_CENTERIMAGE
- EDITTEXT IDC_TRIES,178,58,30,12, ES_RIGHT | ES_NUMBER
-
- LTEXT "BASS library path (empty for default)",IDC_STATIC,6,76,276,14,SS_CENTERIMAGE
- EDITTEXT IDC_BASSPATH, 2,90,284,11,ES_AUTOHSCROLL
- PUSHBUTTON "...", IDC_BASSPTHBTN, 288,90,14,11, BS_BOTTOM
-
- PUSHBUTTON "OFF", IDC_EQOFF,6 ,154,22,12,BS_PUSHLIKE | BS_CHECKBOX | BS_DEFPUSHBUTTON
- PUSHBUTTON "0" ,IDC_ZERO ,9 ,171,14,13
- RTEXT "15" ,IDC_STATIC,13,141,16,10
- RTEXT "-15",IDC_STATIC,13,199,16,10
-
- COMBOBOX IDC_PRESET,2,116,150,75,CBS_DROPDOWN | WS_VSCROLL
- CONTROL "+", IDC_EQ_ADD, "MButtonClass",WS_TABSTOP, 154,114,16,16,$18000000
- CONTROL "-", IDC_EQ_DEL, "MButtonClass",WS_TABSTOP, 174,114,16,16,$18000000
- LTEXT "Equalizer presets",IDC_STATIC,194,114,106,16,SS_CENTERIMAGE
-
- CTEXT "",IDC_0,34,211,16,9
- CONTROL "",IDC_EQ00,"msctls_trackbar32",TBS_LEFT|TBS_VERT|WS_TABSTOP, 29,136,22,75
- CTEXT "",IDC_1,61,211,16,9
- CONTROL "",IDC_EQ01,"msctls_trackbar32",TBS_LEFT|TBS_VERT|WS_TABSTOP, 55,136,22,75
- CTEXT "",IDC_2,87,211,16,9
- CONTROL "",IDC_EQ02,"msctls_trackbar32",TBS_LEFT|TBS_VERT|WS_TABSTOP, 81,136,22,75
- CTEXT "",IDC_3,113,211,16,9
- CONTROL "",IDC_EQ03,"msctls_trackbar32",TBS_LEFT|TBS_VERT|WS_TABSTOP,107,136,22,75
- CTEXT "",IDC_4,139,211,16,9
- CONTROL "",IDC_EQ04,"msctls_trackbar32",TBS_LEFT|TBS_VERT|WS_TABSTOP,133,136,22,75
- CTEXT "",IDC_5,165,211,16,9
- CONTROL "",IDC_EQ05,"msctls_trackbar32",TBS_LEFT|TBS_VERT|WS_TABSTOP,159,136,22,75
- CTEXT "",IDC_6,191,211,16,9
- CONTROL "",IDC_EQ06,"msctls_trackbar32",TBS_LEFT|TBS_VERT|WS_TABSTOP,185,136,22,75
- CTEXT "",IDC_7,217,211,16,9
- CONTROL "",IDC_EQ07,"msctls_trackbar32",TBS_LEFT|TBS_VERT|WS_TABSTOP,211,136,22,75
- CTEXT "",IDC_8,243,211,16,9
- CONTROL "",IDC_EQ08,"msctls_trackbar32",TBS_LEFT|TBS_VERT|WS_TABSTOP,237,136,22,75
- CTEXT "",IDC_9,269,211,16,9
- CONTROL "",IDC_EQ09,"msctls_trackbar32",TBS_LEFT|TBS_VERT|WS_TABSTOP,263,136,22,75
- GROUPBOX "Equalizer",IDC_STATIC,2,130,298,92
-}
-
-IDD_SEARCH DIALOGEX 0, 0, 110, 140
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0
-BEGIN
- LTEXT "Station",IDC_STATIC,8,1,98,8
- EDITTEXT IDC_STATION,4,11,102,12,ES_AUTOHSCROLL
- LTEXT "URL",IDC_STATIC,8,27,98,8
- EDITTEXT IDC_STATIONURL,4,37,102,12,ES_AUTOHSCROLL
- LTEXT "Genre",IDC_STATIC,8,53,98,8
- EDITTEXT IDC_GENRE,4,63,102,12,ES_AUTOHSCROLL
- LTEXT "Bitrate",IDC_STATIC,8,79,72,8
- EDITTEXT IDC_BITRATE,4,89,76,12, ES_RIGHT | ES_NUMBER
-
- AUTORADIOBUTTON "<",IDC_LT,86,80,20,10
- AUTORADIOBUTTON "=",IDC_EQ,86,91,20,10
- AUTORADIOBUTTON ">",IDC_GT,86,102,20,10
-
- LTEXT "Custom INI file",IDC_STATIC,8,112,98,8
- EDITTEXT IDC_CUSTOMINI,4,122,84,12,ES_AUTOHSCROLL
- PUSHBUTTON "...",IDC_BN_INIPATH, 90,122,14,12
-END
-
-// just for frame API version
-IDD_FRAME DIALOGEX 0, 0, 114, 16, 0
-STYLE DS_SETFONT | WS_CHILD | DS_FIXEDSYS | WS_VISIBLE
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0
-BEGIN
- CONTROL "" ,IDC_RADIO_VOL ,"msctls_trackbar32", TBS_BOTTOM|TBS_NOTICKS|$100,0,2,98,11
-// CONTROL "*",IDC_RADIO_MUTE,"MButtonClass" ,WS_TABSTOP,100,1,12,12//,$18000000
- PUSHBUTTON "*" ,IDC_RADIO_MUTE, 100,1,12,12,
-// BS_OWNERDRAW
- BS_FLAT | BS_ICON | BS_PUSHLIKE | BS_CHECKBOX | BS_DEFPUSHBUTTON | BS_CENTER | BS_VCENTER
-END
-
-
-IDI_MAIN ICON "ico\mradio.ico"
-IDI_ON ICON "ico\on.ico"
-IDI_OFF ICON "ico\off.ico"
-IDI_ADD ICON "ico\new.ico"
-IDI_DEL ICON "ico\delete.ico"
-BTN_RECUP ICON "ico\recon.ico"
-BTN_RECDN ICON "ico\recoff.ico"
-
-LANGUAGE 0,0
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,0,2,2
- PRODUCTVERSION 0,0,8,0
- FILEFLAGSMASK $3F
- FILEOS 4
- FILETYPE 2
- FILESUBTYPE 0
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "000004b0"
- BEGIN
- VALUE "CompanyName",""0
- VALUE "Comments", "Plugin to play Internet radio"0
- VALUE "FileDescription", "mRadio Mod plugin for Miranda NG"0
- VALUE "FileVersion", "0, 0, 2, 2 "0
- VALUE "InternalName", "mRadio Mod"0
- VALUE "OriginalFilename", "mradio.dll"0
- VALUE "ProductName", "mRadio Mod Dynamic Link Library (DLL)"0
- VALUE "ProductVersion", "0, 0, 8, 0 "0
- VALUE "SpecialBuild", "10.05.2012 "0
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation",0,1200
- END
-END
diff --git a/plugins/mRadio/mradio.res b/plugins/mRadio/mradio.res
deleted file mode 100644
index d70c64c58e..0000000000
--- a/plugins/mRadio/mradio.res
+++ /dev/null
Binary files differ
diff --git a/plugins/mRadio/proto_mradio/Proto_mRadio.vcxproj b/plugins/mRadio/proto_mradio/Proto_mRadio.vcxproj
deleted file mode 100644
index f78dc543ae..0000000000
--- a/plugins/mRadio/proto_mradio/Proto_mRadio.vcxproj
+++ /dev/null
@@ -1,130 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{2BCC460C-E7C0-4AA8-B680-B9DE561A8408}</ProjectGuid>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Icons\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Icons\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Icons\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Icons\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
- <IgnoreImportLibrary>true</IgnoreImportLibrary>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Link>
- <SubSystem>Windows</SubSystem>
- <NoEntryPoint>true</NoEntryPoint>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
- </Link>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Link>
- <SubSystem>Windows</SubSystem>
- <NoEntryPoint>true</NoEntryPoint>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
- </Link>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Link>
- <SubSystem>Windows</SubSystem>
- <NoEntryPoint>true</NoEntryPoint>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
- </Link>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Link>
- <SubSystem>Windows</SubSystem>
- <NoEntryPoint>true</NoEntryPoint>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
- </Link>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClInclude Include="src\resource.h" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="res\resource.rc" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/plugins/mRadio/proto_mradio/Proto_mRadio.vcxproj.filters b/plugins/mRadio/proto_mradio/Proto_mRadio.vcxproj.filters
deleted file mode 100644
index adb1b35427..0000000000
--- a/plugins/mRadio/proto_mradio/Proto_mRadio.vcxproj.filters
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="src\resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="res\resource.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/plugins/mRadio/proto_mradio/res/proto_away.ico b/plugins/mRadio/proto_mradio/res/proto_away.ico
deleted file mode 100644
index f9d97408f8..0000000000
--- a/plugins/mRadio/proto_mradio/res/proto_away.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/mRadio/proto_mradio/res/proto_invisible.ico b/plugins/mRadio/proto_mradio/res/proto_invisible.ico
deleted file mode 100644
index 6a868bc106..0000000000
--- a/plugins/mRadio/proto_mradio/res/proto_invisible.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/mRadio/proto_mradio/res/proto_offline.ico b/plugins/mRadio/proto_mradio/res/proto_offline.ico
deleted file mode 100644
index 5a7e6172ac..0000000000
--- a/plugins/mRadio/proto_mradio/res/proto_offline.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/mRadio/proto_mradio/res/proto_online.ico b/plugins/mRadio/proto_mradio/res/proto_online.ico
deleted file mode 100644
index 53f13cddca..0000000000
--- a/plugins/mRadio/proto_mradio/res/proto_online.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/mRadio/proto_mradio/res/resource.rc b/plugins/mRadio/proto_mradio/res/resource.rc
deleted file mode 100644
index 43ad52b944..0000000000
--- a/plugins/mRadio/proto_mradio/res/resource.rc
+++ /dev/null
@@ -1,37 +0,0 @@
-//Microsoft Developer Studio generated resource script.
-//
-
-#include "..\src\resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "winres.h"
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_ICON1 ICON "proto_online.ico"
-IDI_ICON2 ICON "proto_offline.ico"
-IDI_ICON3 ICON "proto_away.ico"
-IDI_ICON4 ICON "proto_invisible.ico"
-
-#endif // English (U.S.) resources
-///////////////////////////////////////////////////////////////////////////// \ No newline at end of file
diff --git a/plugins/mRadio/proto_mradio/src/resource.h b/plugins/mRadio/proto_mradio/src/resource.h
deleted file mode 100644
index d425e7b8b1..0000000000
--- a/plugins/mRadio/proto_mradio/src/resource.h
+++ /dev/null
Binary files differ
diff --git a/plugins/mRadio/readme.txt b/plugins/mRadio/readme.txt
deleted file mode 100644
index ea111e1056..0000000000
--- a/plugins/mRadio/readme.txt
+++ /dev/null
@@ -1,147 +0,0 @@
-Description:
-------------
-This plugin plays and records Internet radio streams. Also local media files can be played.
-
-This is not 'clear' mod of mRadio plugin from Bankrut.
-So, some things can be different or even uncomplete.
-
-Notes:
-------
-1) Supported formats
-BASS library support plugins, so format list can be expanded.
-BASS.dll give support for MP3 and OGG formats
-BASSWMA.dll give WMA/ASX stream support
-PLS (ansi), M3U (old and new format, ansi), M3U8 (old and new format utf8) supported.
-This is plugin processing and now all strings converted to ansi.
-
-2) Tooltip templates
-Tipper template:
-Common status message (not only mRadio): %sys:status_msg%
-also you can check CList/StatusMsg or StationURL values.
-
-mToolTip templates:
-[Station_Codec]
-DBSub=mRadio
-DBSet=ActiveCodec
-
-[Station_URL]
-DBSub=mRadio
-DBSet=StationURL
-
-[Station_Bitrate]
-DBSub=mRadio
-DBSet=Bitrate
-
-[Station_Genre]
-DBSub=mRadio
-DBSet=Genre
-
-3) Different info
- WMA stations don't recorded, only MP3 and OGG stream record tested.
- Not all metatags supported.
- Manual proxy settings supported.
- BASS Plugins loading ONLY when protocol going Online
-
-Changelog:
-----------
-0.0.2.1 ()
- 64 bit compatibility fix
- new event notifications
-0.0.2.0 (19 mar 2011)
- Adapted for FreePascal and 64 bit support
-0.0.1.7 ()
- Added internet radio reconnect on track end
- Added button to import all radiostations from file
- Added frame right-click action "Open mradio settings"
- Improved frame coloration
- Added Frame (1st try)
- Added another WMA stream processing
- Added option for several tries to connect radiostation
-0.0.1.6 (20 sep 2010)
- Changed streams/files tag process
-0.0.1.5 (6 sep 2010)
- Fixed simple form of M3U playlist reading
- Improved compatibility with Watrack plugin
- Restored ANSI URL processing if no Unicode possible (especially for BASSWMA)
- Fixed group choosing for "Add to List" of new stations
- Fixed some memory leaks
- Changed proxy processing to ability to use IE settings (through miranda proxy settings)
- Fixed crash when contact goin offline (Offline as offline setting)
- Code changed to BASS 2.4.6 support (unicode URL support)
-0.0.1.4 ()
- Added event ME_RADIO_STATUS
- Added Variables plugin parsing for record filename
- Added ability to choose BASS.dll placement
- Radio stopping now if active contact deleting
- Added services for import/export stations
-0.0.1.3 (15 oct 2009)
- Radio record filename must calc from media info
- Radio record fixed
-0.0.1.2 (15 oct 2009)
- Added equalizer preset work
- "Record" crash fixed
- Added changing icon in contact menu for start/stop broadcasting
-0.0.1.1 (10 oct 2009)
- Added option to export all radio station from list to choosed INI-file
-0.0.1.0 ()
- Fixed UTF8 station track info showing
- Dropped ANSI and pre-0.7 Miranda IM version support
-0.0.0.15 (14 jan 2008)
- Toolbar button to switch sound on/off affect now on mRadio sound
- Added 'radio_codec' variable
- Added GUID to header files
- Added option to show offline stations as Offline (not invisible)
- Added option to autconnect last played station
-0.0.0.14 ( nov 2007)
- Fixed: record directory not created if it not exists
- Fixed: Database hook error
- Station choosing change plugin status from Offline to Online
- Fixed: last played track wrongly restored at start
-0.0.0.13 (24 jun 2007)
- Added notification for 'Work Offline' IE mode
- New option for network timeout
-0.0.0.12 (20 jun 2007)
- Small fixes
- Added Unicode for file select dialog in Options
-0.0.0.11 (18 jun 2007)
- Added test unicode support (can work wrong)
- Added ability to change INI-file for station search
- Changed search interface for Miranda version 0.7+
- Added button to switch equalizer off
- Options interface changed
-0.0.0.10 (13 jun 2007)
- Added partial SHOUTcast metatags support
- Added playing station status info
-0.0.0.9 (10 jun 2007)
- Added support old and new ANSI and UTF8 M3U (M3U8) playlists
- Added relative pathnames in playlist support
-0.0.0.8 (9 jun 2007)
- Added partial updater support
- Small fixes
- Added new option for playlist
-0.0.0.7 (7 jun 2007)
- Fixed: equalizer values was reversed
- Added PLS and M3U playlist support
- Code changes
-0.0.0.6 (3 jun 2007)
- Fixed: Global volume (not music only) used
- Fixed: Can't break slowly connected stations
-0.0.0.5 (2 jun 2007)
- Fixed: Double click contact dialog can't open
- Changed: OGG station stream saving
-0.0.0.4 (1 jun 2007)
- Small Radio station search dialog adaptation for 0.7 and 0.6 Miranda versions
- Added volume control synchronization with SndVol
- Added option to repeat media
- Added global 'Record' menu item to contact menu
- Fixed: exit while online Radio status make crash
- Added: Equalizer
-0.0.0.3 (30 may 2007)
- Added UserInfoEx (station editing) compatibility
- Code cleaning and optimization
- Convert to (2 in 1)
-0.0.0.2 (30 may 2007)
- Added Variables plugin support
- Added Buffer size changing ability
-0.0.0.1 (29 may 2007)
- First release
diff --git a/plugins/mRadio/variants.pas b/plugins/mRadio/variants.pas
deleted file mode 100644
index c7c8fdc824..0000000000
--- a/plugins/mRadio/variants.pas
+++ /dev/null
@@ -1,7 +0,0 @@
-unit variants;
-
-interface
-
-implementation
-
-end. \ No newline at end of file