CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    51

    Owner Draw Fixed ListCtrl

    Is there a way to change the text color and background color of a listctrl in report mode for individual rows. The SetTextColor() method changes the whole control. There is an example of the background color for individual rows that build on the highlighting of the entire row article, but in VC6.0 the highlight entire row article is obsolete with the LVS_EX_FULLROWSELECT). I was wondering if the only way to change the background color or text color of individual rows is to override the DrawItem() method. If it is, can you do that without derriving a new class from CListCtrl?

    Thanks,

    Steve

    Steven M. McNeese
    [email protected]

  2. #2
    Join Date
    Apr 1999
    Posts
    65

    Re: Owner Draw Fixed ListCtrl

    Buddy,
    I havent looked into the CUSTOMDRAW of ListCtrl but with the older controls such as
    buttons,listboxes etc. the thing is that u need
    not derive any class from CButton or CListBox.
    Just in the *.rc specify as OWNER_DRAW and
    handle the messages DRAWITEM and MEASSUREITEM in the parent window proc


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured