I have been trying to subclass my Listview so I can do some custom drawing, but, it seems no matter what I try it glitches out.

This is my current Code

Code:
 

Public Function WindowProcChannel(ByVal hwnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
    On Error Resume Next
    
    If ((uMsg And WM_DRAWITEM) = WM_DRAWITEM) Then
        Dim udtDIS As DRAWITEMSTRUCT
        
        If ((lParam = 0) Or (wParam > 0)) Then
            Exit Function
        End If
        
        Call CopyMemory(udtDIS, ByVal lParam, Len(udtDIS))
        
        Select Case (udtDIS.ItemAction)
            Case ODA_DRAWENTIRE:
                If (udtDIS.ItemId = -1) Then
                    Exit Function
                End If
 
                DrawChannel udtDIS, hwnd
                Exit Function
        End Select
   ' ElseIf ((uMsg And WM_NOTIFY) = WM_NOTIFY) Then
       ' Dim udtNMHDR As NMHDR
    
        'If ((lParam = 0) Or (wParam > 0)) Then
           ' Exit Function
        'End If
    
        'Call CopyMemory(udtNMHDR, ByVal lParam, LenB(udtNMHDR))
    
        'Select Case (udtNMHDR.code)
           ' Case LVN_BEGINDRAG:  Exit Function
           ' Case LVN_BEGINRDRAG: Exit Function
       ' End Select
    End If

    WindowProcChannel = CallWindowProc(hWnd_Config, hwnd, uMsg, wParam, lParam)
End Function

Public Sub DrawChannel(ByRef udtDIS As DRAWITEMSTRUCT, hwnd As Long)
    Dim uRECT   As RECT
    Dim hDC     As Long
    
    Dim Index As Integer
    
    Dim Brush As Long
    Dim Pen As Long
    
    Dim PingPOS As Long
        PingPOS = 180
    Index = udtDIS.ItemId + 1
    
     With uRECT
        .Top = udtDIS.rcItem.Top
        .Bottom = udtDIS.rcItem.Bottom
        .Left = udtDIS.rcItem.Left
        .Right = udtDIS.rcItem.Right + 100
    End With
    
    
    Brush = CreateSolidBrush(vbBlack)
        
    DrawFocusRect udtDIS.hDC, uRECT
    
    FillRect udtDIS.hDC, uRECT, Brush
        
    DeleteObject Brush
    
    
     With udtDIS.rcItem
        .Left = (udtDIS.rcItem.Left + 1)
        .Top = (udtDIS.rcItem.Top + 1)
    End With
    
    If frmMain.lvChannel(View).ListItems.Count > SendMessage(frmMain.lvChannel(View).hwnd, LVM_GETCOUNTPERPAGE, 0&, ByVal 0&) Then
        PingPOS = 160
        
    Else
        PingPOS = 180
        
    End If
     
    hDC = CreateCompatibleDC(udtDIS.hDC)
   
    SelectObject hDC, frmMain.ClientImages.ListImages(PickIcon(Profiles.Profile(View).Channel.User(Index).Product, Profiles.Profile(View).Channel.User(Index).Flags)).Picture.Handle
    BitBlt udtDIS.hDC, udtDIS.rcItem.Left, udtDIS.rcItem.Top, 36, 17, hDC, 0, 0, vbSrcCopy
    
    With uRECT
        .Left = (udtDIS.rcItem.Left + 40)
        .Right = udtDIS.rcItem.Right
        .Top = udtDIS.rcItem.Top + 2
        .Bottom = (udtDIS.rcItem.Top + 17)
    End With
    
    'draw the Username
    
    SetTextColor udtDIS.hDC, PickColor(Profiles.Profile(View).Channel.User(Index).Product, Profiles.Profile(View).Channel.User(Index).Flags)
    DrawText udtDIS.hDC, Profiles.Profile(View).Channel.User(Index).Username, Len(Profiles.Profile(View).Channel.User(Index).Username), uRECT, (DT_VCENTER Or DT_LEFT)
    
     'Draw the PING ICON
    
    SelectObject hDC, frmMain.ClientImages.ListImages(GetLag(Profiles.Profile(View).Channel.User(Index).Ping, Profiles.Profile(View).Channel.User(Index).Flags)).Picture.Handle
    BitBlt udtDIS.hDC, PingPOS, udtDIS.rcItem.Top, 35, 17, hDC, 0, 0, vbSrcCopy
    
    If (udtDIS.ItemState And ODS_SELECTED) Then
        
        Brush = SelectObject(udtDIS.hDC, GetStockObject(NULL_BRUSH))
        Pen = SelectObject(udtDIS.hDC, CreatePen(0, 1, vbBotNet))
        
        Rectangle udtDIS.hDC, udtDIS.rcItem.Left, udtDIS.rcItem.Top, udtDIS.rcItem.Right, udtDIS.rcItem.Bottom
        
        DeleteDC Brush
        DeleteDC Pen
    Else
        Brush = SelectObject(udtDIS.hDC, GetStockObject(NULL_BRUSH))
        Pen = SelectObject(udtDIS.hDC, CreatePen(0, 1, vbBlack))
        
        Rectangle udtDIS.hDC, udtDIS.rcItem.Left, udtDIS.rcItem.Top, udtDIS.rcItem.Right, (udtDIS.rcItem.Top + 17)
        
        DeleteDC Brush
        DeleteDC Pen
    End If
   

    DeleteDC hDC
End Sub
It's a bit sloppy now, but its just some trail and error coding, maybe I can get some insight on what i'm doing wrong?