Click here to Skip to main content
15,747,205 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When I click on an element of listBox element becomes blu, Ib want to do blue an element without click oln it, how can I write code?

What I have tried:

I searched on internet but there is how change color of the string, and not how highlight element
Updated 21-Nov-19 23:25pm

1 solution

You would need to use the NM_CUSTOMDRAW message to paint the listbox contents in your code. See How to Create an Owner-Drawn List Box - Win32 apps | Microsoft Docs[^].
Share this answer
Member 14594285 22-Nov-19 5:49am    
thanks I solved

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