Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to change the CListCtrl control's Header(column) background color

How to change the CListCtrl control's Header(column) background color

Scheduled Pinned Locked Moved C / C++ / MFC
c++comhelptutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Girish601
    wrote on last edited by
    #1

    Hi group Can anybody help me out I want to change the background color of the header(column tab)in the ListControl Actually i am doing a project in VC++ I am able to change the background color of the CListCtrl but i failed to change the color of the header tab, so can anybody help me out VC++ vcforums@gmail.com

    D 1 Reply Last reply
    0
    • G Girish601

      Hi group Can anybody help me out I want to change the background color of the header(column tab)in the ListControl Actually i am doing a project in VC++ I am able to change the background color of the CListCtrl but i failed to change the color of the header tab, so can anybody help me out VC++ vcforums@gmail.com

      D Offline
      D Offline
      DiWa
      wrote on last edited by
      #2

      Hi, you need to owner-draw the complete headercontrol to do so, which means: - subclass the header control that is a child of the listcontrol in its PreSubclassWIndow handler - for every button in the headercontrol set the HDF-OWNERDRAW flag - draw the button in the DrawItem handler takes only some 100 lines of code... dirk

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups