<p>Vista has introduced a new API to display a text in the list view control when it doesn't have any items. As the MSDN library states, I should process the <code>LVN_GETEMPTYMARKUP</code> notification.</p>

<p>In the inherited <code>ListView</code> control the <code>WndProc</code> method is overriden:</p>

<pre><code>protected override void WndProc(ref Message m) {
  try {
    if(m.Msg == 78 /* WM_NOTIFY */) {
      var nmhdr = (NMHDR)Marshal.PtrToStructure(m.LParam, typeof(NMHDR));
      if(nmhdr.code == -187 /* LVN_GETEMPTYMARKUP */) {
        var nmlvemptymarkup =
          (NMLVEMPTYMARKUP)Marshal.PtrToStructure(m.LParam, typeof(NMLVEMPTYMARKUP));
        nmlvemptymarkup.szMarkup = "The ListView is empty.";
        m.Result = (IntPtr)1;
      }
    }
  } finally {
    base.WndProc(ref m);
  }
}
</code></pre>

<p>However, it doesn't work (although it doesn't throw any exception). Actually I never get <code>nmhdr.code</code> equals to -187. Any ideas?</p>

Have you tried calling
```
SetWindowTheme
```
on the control, as indicated in
this article
?