Click here to Skip to main content
15,796,738 members

Comments by NoviceCoder871987 (Top 12 by date)

NoviceCoder871987 10-Sep-23 5:14am View    
Yes, I agree. It's really shame that Microsoft hard-coded the grid lines color to COLOR_BTNFACE and left us with no control message to change their color. Simple stuff like that should really take no more than few seconds. I went with invalidating in response to LVN_ENDSCROLL notification and accepted control slight flickering.

Thanks for your contribution.
NoviceCoder871987 9-Sep-23 20:45pm View    
@Richard MacCutchan

Thanks for the link. That doesn't explain the behavior I'm getting.

After wrestling with this issue for a while, I found out that if we have LVS_EX_GRIDLINES style set, this issue is completely fixed without the need to invalidate and therefore, no flickering. With that style set, one must ensure that the lines will be drawn exactly over the default ones. I don't like this solution as it seems hacky. Otherwise, without LVS_EX_GRIDLINES style, we must invalidate after LVN_ENDSCROLL notification and have some flickering.

Note that this issue only happens with scrolling with arrow icons of scroll/Max thumb click. Every other scrolling, like mouse wheel works fine.
I don't see other options here. Hopefully someone can come up with a better solution.
NoviceCoder871987 18-May-19 0:28am View    
Yes thanks Rick. Very good method of adaptive timer interval. Did not think of it. You have very good imagination. I will accept your answer as the solution.
NoviceCoder871987 17-May-19 12:59pm View    
Thanks for your response. The load of items is not done at one go, meaning, its not loaded all in a single loop but rather from messages posted from worker threads. The impact of this without any kind of delay between posted message can be noticed in the listview control as the right click on this listview control never shows the menu up only if all items loaded. Each PostMessage/PostThreadMessage (Worker->GUI) will cause a load of a single listview item (LVM_INSERTITEM). Yes you have good answer, i prefer the responsive more than caring about how fast to load them.
NoviceCoder871987 17-May-19 5:05am View    
The Listview control does not respond during the load of items. How can i relief the listview to be responsive during load of items? i only thought of delay. Did not find another fix for this.