Unit ExHeaderControl

Classes

TExHeaderControl -
TExHeaderSection -
TExHeaderSections -

Functions

Header_CreateDragImage - (int)SNDMSG((hwnd), HDM_ORDERTOINDEX, (WPARAM)i, 0
Header_GetImageList - (HIMAGELIST)SNDMSG((hwnd), HDM_SETIMAGELIST, 0, (LPARAM)himl
Header_GetItemEx -
Header_GetItemRect -
Header_GetOrderArray - (HIMAGELIST)SNDMSG((hwnd), HDM_CREATEDRAGIMAGE, (WPARAM)i, 0
Header_InsertItemEx - ***************************************************************************** * CommCtrl Functions *
Header_OrderToIndex - (HIMAGELIST)SNDMSG((hwnd), HDM_GETIMAGELIST, 0, 0
Header_SetHotDivider - (BOOL)SNDMSG((hwnd), HDM_SETORDERARRAY, (WPARAM)iCount, (LPARAM)lpi) lparam = int array of size HDM_GETITEMCOUNT the array specifies the order that all items should be displayed.
Header_SetImageList - (BOOL)SNDMSG((hwnd), HDM_GETITEMRECT, (WPARAM)iItem, (LPARAM)lprc
Header_SetItemEx -
Header_SetOrderArray - (BOOL)SNDMSG((hwnd), HDM_GETORDERARRAY, (WPARAM)iCount, (LPARAM)lpi
Register -

Types

PHDDispInfoEx
PHDDispInfoExA
PHDDispInfoExW
PHDItemEx
PHDItemExA
PHDItemExW
PHDNotifyEx
PHDNotifyExA
PHDNotifyExW
PIntArray
TDrawSectionEvent
TExHeaderStyle
TExHeaderStyles
THDDispInfoEx
THDDispInfoExA
THDDispInfoExW
THDItemEx
THDItemExA
THDItemExW
THDNotifyEx
THDNotifyExA
THDNotifyExW
THeaderSectionStyle
TIntArray
TSectionCallBackEvent
TSectionDragBeginEvent
TSectionDragEndQueryEvent
TSectionNotifyEvent
TSectionTrackEvent

Constants

HDF_BITMAP_ON_RIGHT
HDF_IMAGE
HDI_DI_SETITEM
HDI_IMAGE
HDI_ORDER
HDM_CREATEDRAGIMAGE
HDM_GETIMAGELIST
HDM_GETITEMRECT
HDM_GETORDERARRAY
HDM_ORDERTOINDEX
HDM_SETHOTDIVIDER
HDM_SETIMAGELIST
HDM_SETORDERARRAY
HDN_BEGINDRAG
HDN_ENDDRAG
HDN_GETDISPINFO
HDN_GETDISPINFOA
HDN_GETDISPINFOW

Variables


Functions


function Header_CreateDragImage(Header: HWnd; Index: Integer): HImageList;

(int)SNDMSG((hwnd), HDM_ORDERTOINDEX, (WPARAM)i, 0

function Header_GetImageList(Header: HWnd): HImageList;

(HIMAGELIST)SNDMSG((hwnd), HDM_SETIMAGELIST, 0, (LPARAM)himl

function Header_GetItemEx(Header: HWnd; Index: Integer; var Item: THDItemEx): Bool;


function Header_GetItemRect(Header: HWnd; Index: Integer; var Rect: TRect): BOOL;


function Header_GetOrderArray(Header: HWnd; iCount: Integer; pi: PInteger): BOOL;

(HIMAGELIST)SNDMSG((hwnd), HDM_CREATEDRAGIMAGE, (WPARAM)i, 0

function Header_InsertItemEx(Header: HWnd; Index: Integer; const Item: THDItemEx): Integer;

***************************************************************************** * CommCtrl Functions *

function Header_OrderToIndex(Header: HWnd; Order: Integer): Integer;

(HIMAGELIST)SNDMSG((hwnd), HDM_GETIMAGELIST, 0, 0

function Header_SetHotDivider(Header: HWnd; fPos: BOOL; dw: Longint): Integer;

(BOOL)SNDMSG((hwnd), HDM_SETORDERARRAY, (WPARAM)iCount, (LPARAM)lpi) 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

function Header_SetImageList(Header: HWnd; iImageList: Integer): HImageList;

(BOOL)SNDMSG((hwnd), HDM_GETITEMRECT, (WPARAM)iItem, (LPARAM)lprc

function Header_SetItemEx(Header: HWnd; Index: Integer; const Item: THDItemEx): Bool;


function Header_SetOrderArray(Header: HWnd; iCount: Integer; pi: PInteger): BOOL;

(BOOL)SNDMSG((hwnd), HDM_GETORDERARRAY, (WPARAM)iCount, (LPARAM)lpi

procedure Register;


Types


PHDDispInfoEx = PHDDispInfoExA

PHDDispInfoExA = ^THDDispInfoExA

PHDDispInfoExW = ^THDDispInfoExW

PHDItemEx = PHDItemExA

PHDItemExA = ^THDItemExA

PHDItemExW = ^THDItemExW

PHDNotifyEx = PHDNotifyExA

PHDNotifyExA = ^THDNotifyExA

PHDNotifyExW = ^THDNotifyExW

PIntArray = ^TIntArray

TDrawSectionEvent = procedure(ExHeaderControl: TExHeaderControl;
    Section: TExHeaderSection; const Rect: TRect; Pressed: Boolean) of object

TExHeaderStyle = (hsFullDrag, hsDragDrop, hsColumnClick, hsHotTrack);

TExHeaderStyles = set of TExHeaderStyle

THDDispInfoEx = THDDispInfoExA

THDDispInfoExA = record
hdr : TNMHDR;
Item : Integer;
mask : Word;
pszText : PChar;
cchTextMax : Integer;
iImage : Integer;
lParam : LPARAM;
end;

THDDispInfoExW = record
hdr : TNMHDR;
Item : Integer;
mask : Word;
pszText : PWideChar;
cchTextMax : Integer;
iImage : Integer;
lParam : LPARAM;
end;

THDItemEx = THDItemExA

THDItemExA = record
Mask : Cardinal;
cxy : Integer;
pszText : PAnsiChar;
hbm : HBITMAP;
cchTextMax : Integer;
fmt : Integer;
lParam : LPARAM;
iImage : Integer;
iOrder : Integer;
end;

THDItemExW = record
Mask : Cardinal;
cxy : Integer;
pszText : PWideChar;
hbm : HBITMAP;
cchTextMax : Integer;
fmt : Integer;
lParam : LPARAM;
iImage : Integer;
iOrder : Integer;
end;

THDNotifyEx = THDNotifyExA

THDNotifyExA = record
Hdr : TNMHDR;
Item : Integer;
Button : Integer;
PItem : PHDItemExA;
end;

THDNotifyExW = record
Hdr : TNMHDR;
Item : Integer;
Button : Integer;
PItem : PHDItemExW;
end;

THeaderSectionStyle = (hsNormal, hsOwnerDraw, hsCallBack);

TIntArray = array[0..(MaxInt div SizeOf(Integer)-1)] of Integer;
(int)SNDMSG((hwnd), HDM_SETHOTDIVIDER, (WPARAM)fPos, (LPARAM)dw) 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) {******************************************************************************* * End of Extended Header definitions from commctrl.h *
TSectionCallBackEvent = procedure(ExHeaderControl: TExHeaderControl;
    Section: TExHeaderSection; var ImageIndex: Integer; var Text: String) of object

TSectionDragBeginEvent = procedure(ExHeaderControl: TExHeaderControl;
    Section: TExHeaderSection; var AllowDrag: Boolean) of object

TSectionDragEndQueryEvent = procedure(ExHeaderControl: TExHeaderControl;
    Section: TExHeaderSection; NewOrderPos: Integer; var AllowDrag: Boolean) of object

TSectionNotifyEvent = procedure(ExHeaderControl: TExHeaderControl;
    Section: TExHeaderSection) of object

TSectionTrackEvent = procedure(ExHeaderControl: TExHeaderControl;
    Section: TExHeaderSection; Width: Integer;
    State: TSectionTrackState) of object

Constants

HDF_BITMAP_ON_RIGHT = $1000

***************************************************************************** * Extended Header definitions from commctrl.h *

HDF_IMAGE = $0800

HDI_DI_SETITEM = $0040

HDI_IMAGE = $0020

HDI_ORDER = $0080

HDM_CREATEDRAGIMAGE = (HDM_FIRST + 16)

HDM_GETIMAGELIST = (HDM_FIRST + 9)

HDM_GETITEMRECT = (HDM_FIRST + 7)

HDM_GETORDERARRAY = (HDM_FIRST + 17)

HDM_ORDERTOINDEX = (HDM_FIRST + 15)

HDM_SETHOTDIVIDER = (HDM_FIRST + 19)

HDM_SETIMAGELIST = (HDM_FIRST + 8)

HDM_SETORDERARRAY = (HDM_FIRST + 18)

HDN_BEGINDRAG = (HDN_FIRST-10)

HDN_ENDDRAG = (HDN_FIRST-11)

HDN_GETDISPINFO = HDN_GETDISPINFOA

HDN_GETDISPINFOA = (HDN_FIRST-9)

HDN_GETDISPINFOW = (HDN_FIRST-29)


Variables