Click here to Skip to main content
15,894,106 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I inherited some old MCF/C++ code that needs some changes. The bulk of the UI is CListCtrl that shows some real-time data in "data grid" fashion. The client wants me to colorize certain rows (or row texts) in certain colors according to status data in one of the columns. While this assignment would be pretty trivial in Win Forms/WPF it doesn't seem so in MFC after some googling (mind you, I have very little experience in MCF ... I can find my way around code, but that is pretty much all).

What would be the easiest (least invasive) way to accomplish something like this ...

C++
switch (status)
{
   case warning:
      // set row text color to yellow
      break;
   case error:
      // set row text color to red
      break;
   case active:
      // set row text color to green
      break;
   default:
      // do nothing ... leave color as-is
      break;
}


The "status" is one of the row values that can change any time.

Any help would be appreciated.
Posted

1 solution

I strongly doubt you may find any article here on CListCtrl customization...[^].
 
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