Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,
How to change the colour of the list control and insert the text , i read we can change color using NM_CUSTOMDRAW,,, how to use it. It is not in the class wizard (messages),, pls guide me



thank you
Posted

1 solution

take a look at this article: http://msdn.microsoft.com/en-us/library/8w156kh2(v=vs.80).aspx[^]

Here you will be able to see how to do it:

// The pointer to my list view control.
extern CListCtrl* pmyListCtrl;
// Use the 3D button face color for the background.
COLORREF crBkColor = ::GetSysColor(COLOR_3DFACE);
pmyListCtrl->SetBkColor(crBkColor);
ASSERT(pmyListCtrl->GetBkColor() == crBkColor);


This should help you. :thumbsup:
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900