0

I have created a Window in C++ using CreateWindowEx function of WinAPI and it contains a ListView control with Items and SubItems. I want to update this Window from an external process. What I want to achieve is that based on some conditions, I want to change the color of specific SubItem of a specific Item in that ListView control.

I have searched a lot but have not found the solution to update a specific cell(Item,SubItem) of ListView. What is the solution for this problem?

  • 2
    I think you need to handle the [NM_CUSTOMDRAW](https://learn.microsoft.com/en-us/windows/win32/controls/nm-customdraw) message for this. – Paul Sanders Apr 25 '21 at 23:19
  • Does this [thread](https://stackoverflow.com/questions/5055851/how-can-i-modify-the-font-colors-of-individual-characters-in-a-listview-subitem/5055879#5055879) work for you? – Zeus Apr 26 '21 at 08:10
  • No, it updates when ListView is loaded but i want to update it later after its loaded based on certain condition – hardcore developer Apr 26 '21 at 15:03
  • `I want to update this Window from an external process.` Could you explain why you want to achieve it? Refer to:[Is it legal to have a cross-process parent/child or owner/owned window relationship?](https://devblogs.microsoft.com/oldnewthing/20130412-00/?p=4683) – Zeus Apr 27 '21 at 01:34

0 Answers0