News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

ListView group header text.

Started by georgek01, February 07, 2006, 08:29:47 AM

Previous topic - Next topic

georgek01

Hello all!

I hope someone can assist with the following problem I'm experiencing.

I have a ListView control with a few list items under a group header. Ultimately I would like to walk through the list view groups and compare the header text to column text so I can re-assign items to different groups, depending on the column clicked by the user. I am however unable to "get" the group header text.

The test app I attached creates 1 group and adds 2 items to it. When the Group Header button is clicked, the group header text should be displayed in a message box.

Your assistance will be greatly appreciated!!

[attachment deleted by admin]
What we have to learn to do, we learn by doing.

- ARISTOTLE (384-322 BC)

Tedd

LVM_GETCOLUMN ?
(with lvcol.imask = LVCF_TEXT)
No snowflake in an avalanche feels responsible.

georgek01

I'm looking for the group header text filled by the LVGROUP structure from LVM_GETGROUPINFO message as per code extract below.


local lvg:LVGROUP

; --- set structure options
mov lvg.cbSize, sizeof lvg
mov lvg.imask, LVGF_HEADER or LVGF_NONE
mov lvg.pszHeader, offset dbuffer
mov lvg.cchHeader, lengthof dbuffer

; --- fill lvg structure with group ID = 0
invoke SendMessage,hList,LVM_GETGROUPINFO,0d,addr lvg

.if eax != -1
invoke WideCharToMultiByte,0,0,addr dbuffer,-1,addr cbuffer,128,NULL,NULL
.if eax != 0
invoke MessageBox,h,addr cbuffer,addr szAppName,MB_OK
.else
invoke ShowErrorMessage,h
.endif
.endif


What we have to learn to do, we learn by doing.

- ARISTOTLE (384-322 BC)