Home > Software engineering >  MFC ClistCtrl custom painting?
MFC ClistCtrl custom painting?

Time:10-04

Want to use a list of change control the background color of the item, when the variable changes, figure will not automatically change color, manually change the window size and drag the list will change color, could you tell me what's the solution?

CodePudding user response:

After you modify variables, you have a call CListCtrl forced to refresh? M_list. Invalidate ()/InvalidateRect ();

CodePudding user response:

You can try to do the monitoring in the OnSize function

CodePudding user response:

"The change control the background color of the item list"
Void CReportCtrl: : OnCustomDraw (NMHDR * pNMHDR, LRESULT * pResult)
  • Related