Click here to Skip to main content
15,886,038 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I'm trying to make my own header draw.
So far it's working but I can't find the internal ID from the header.

What I have tried:

Dim pnmhdr = CType(m.GetLParam(GetType(NMHDR)), NMHDR)
                If pnmhdr.code = NM_CUSTOMDRAW Then
                    Dim pnmlv = CType(m.GetLParam(GetType(NMLVCUSTOMDRAW)), NMLVCUSTOMDRAW)
                    Select Case pnmlv.nmcd.dwDrawStage
                        Case CDDS.CDDS_PREPAINT
                            If (pnmlv.dwItemType = LVCDI_GROUP) Then
                                Dim rectHeader As New RECT With {
                                    .top = LVGGR_HEADER
                                }
                                Dim rectGroep As New RECT With {
                                    .top = LVGGR_GROUP
                                    }
                                Dim nItem = CInt(pnmlv.nmcd.dwItemSpec)


But Item gives me a number higher that the number of groups. It looks like after removeing groups the counter keeps counting from the same number. and not restarting from zero.

So the question is how do I find the real ID

Jan
Posted
Comments
JR212 22-May-21 12:59pm    
Nobody

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900