Listview - Die Farbe vom Column ändern (Header)

  • Die Text Farbe bei einem ListView ändere ich mit:

    -----> _GUICtrlListView_SetTextColor($ListView1, $CLR_BLACK)

    Aber wie kann ich die Schriftfarbe der Überschrift ändern?
    habe bis jetzt nix gefunden ^^

  • Ich habe jetzt die Lösung gefunden:


    Code
    ;get handle to child SysHeader32 control of ListView
    Global $hHeader = HWnd(GUICtrlSendMsg($ListView1, $LVM_GETHEADER, 0, 0))
    ;Turn off theme for header
    DllCall("uxtheme.dll", "int", "SetWindowTheme", "hwnd", $hHeader, "wstr", "", "wstr", "")
    ;subclass ListView to get at NM_CUSTOMDRAW notification sent to ListView
    Global $wProcNew = DllCallbackRegister("_LVWndProc", "ptr", "hwnd;uint;wparam;lparam")
    Global $wProcOld = _WinAPI_SetWindowLong($ListView1, $GWL_WNDPROC, DllCallbackGetPtr($wProcNew))

    Quelle: https://www.autoitscript.com/forum/topic/13…-headers-color/