Print Page | Close Window

cxtlistctrl selection colour problem

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=241
Printed Date: 19 May 2024 at 3:19am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: cxtlistctrl selection colour problem
Posted By: douglashogan
Subject: cxtlistctrl selection colour problem
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net