Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Request refresh of LVN_GETEMPTYMARKUP

I am using the LVN_GETEMPTYMARKUP to show some text in my ListCtrl until it gets some content. The problem I am facing is I can't seem to find a way to refresh this text and effectively force ListCtrl to send this notification more than once.

Is there a way to tell ListCtrl to refresh the "markup"?

like image 303
wpfwannabe Avatar asked Jan 14 '23 10:01

wpfwannabe


2 Answers

Well this is a fairly old thread however i came across to this and will provide an answer for anyone that came to same place like me.

It is possible to resend LVN_GETEMPTYMARKUP message to the listview by sending LVM_RESETEMPTYTEXT = (LVM_FIRST + 84) message to the listview or by obtaining IListView interface and executing ResetEmptyText method. In this way you can conditionaly change or clear the empty text :)

like image 57
Dimitar Tsenev Avatar answered Feb 01 '23 04:02

Dimitar Tsenev


I looked at the source, and it appears that the listview control sends the LVN_GETEMPTYMARKUP query exactly once and caches the result.

Therefore, I believe that the only way to get the behavior you're looking for is to recreate the control as appropriate.

like image 36
Eric Brown Avatar answered Feb 01 '23 03:02

Eric Brown