CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Coloring the highlighted row in CListControl

  1. #1
    Join Date
    Dec 2019
    Posts
    13

    Coloring the highlighted row in CListControl

    Currently in CListControl the highlighted color of row is the default windows ( navy blue color )

    How can I change the default windows color of highlighted row in CListControl ?

  2. #2
    Join Date
    Jan 2009
    Posts
    342

    Re: Coloring the highlighted row in CListControl

    For achieving this I guess you would have to handle NM_CUSTOMDRAW message notification: https://docs.microsoft.com/en-us/win.../nm-customdraw
    You can find on internet how to do it.

  3. #3
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,732

    Re: Coloring the highlighted row in CListControl

    Another way is using owner draw (the style LVS_OWNERDRAWFIXED) and virtual DrawItem method.
    See the code example in https://www.codeproject.com/Articles...-an-Entire-Row
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)