Changing the Header was pretty straight forward
Code: Select all
LV_GroupSetHeader(HLV, gId, sHeader)
{
; LVGF_HEADER := 0x1
; LVM_SETGROUPINFO := 0x1093
LVG_Size := (A_PtrSize * 6) + (17 * 4)
, VarSetCapacity(LVG, LVG_Size, 0) ; struct LVGROUP
, NumPut(LVG_Size, LVG, 0, "UInt") ; cbSize
, NumPut(0x1, LVG, 4, "UInt") ; Mask
, NumPut(&sHeader, LVG, 8, "Ptr") ; pszHeader
SendMessage, 0x1093, % gId, % &LVG, , % "ahk_id " . HLV
}
I am unsure of how to get
UINT cItems; using
LVM_GETGROUPINFO
Assuming 64bit I calculated the offset to be 108 is this correct?
Code: Select all
typedef struct tagLVGROUP { ;Offset
UINT cbSize; 0
UINT mask; 4
LPWSTR pszHeader; 8
int cchHeader; 16
LPWSTR pszFooter; 20
int cchFooter; 28
int iGroupId; 36
UINT stateMask; 40
UINT state; 44
UINT uAlign; 48
LPWSTR pszSubtitle; 52
UINT cchSubtitle; 56
LPWSTR pszTask; 60
UINT cchTask; 64
LPWSTR pszDescriptionTop; 68
UINT cchDescriptionTop; 72
LPWSTR pszDescriptionBottom; 76
UINT cchDescriptionBottom; 80
int iTitleImage; 88
int iExtendedImage; 96
int iFirstItem; 104
UINT cItems; 108
LPWSTR pszSubsetTitle; 112
UINT cchSubsetTitle; 116
} LVGROUP, *PLVGROUP;
At this point Im stuck. This does not work
Code: Select all
LV_GetGroupItems(HLV, gId)
{
; LVM_GETGROUPINFO := 0x1095
; LVGF_ITEMS := 0x4000
Static cItemsOffset := (A_PtrSize * 6) + (15 * 4)
LVG_Size := (A_PtrSize * 6) + (17 * 4)
, VarSetCapacity(LVG, LVG_Size, 0) ; struct LVGROUP
, NumPut(LVG_Size, LVG, 0, "UInt") ; cbSize
, NumPut(0x4000, LVG, 4, "UInt") ; Mask
SendMessage, 0x1095, % gId, % &LVG, , % "ahk_id " . HLV
return NumGet(LGV, cItemsOffset, "UInt")
}