Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - cxtlistctrl selection colour problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

cxtlistctrl selection colour problem

 Post Reply Post Reply
Author
Message
douglashogan View Drop Down
Groupie
Groupie


Joined: 02 July 2003
Location: Switzerland
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote douglashogan Quote  Post ReplyReply Direct Link To This Post Topic: cxtlistctrl selection colour problem
    Posted: 13 November 2003 at 12:56pm

The selected item in a list control with custom colours does not get painted with the new colours and instead uses the windows default

?? why is this. It looks really strange.

Offending code follows...

 

void CXTListCtrlBase::OnCustomDrawImpl(NMHDR* pNMHDR, LRESULT* pResult)

{

...

    // Only change the background colour if the window is enabled, and
    // the item is not selected, otherwise use the system default.

    if (m_pListCtrl->IsWindowEnabled())
    {
     if (m_pListCtrl->GetItemState(iItem, LVIS_SELECTED) == 0)
     {
      lplvcd->clrText    = m_clrText;
      lplvcd->clrTextBk = m_clrTextBk;
     }
    }
...

}


 

Regards
Douglas Hogan
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.