Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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);
- }
- }
- listview_onPaint(object sender, eventargs e)
- {
- if ( listview.items.count <= 0 )
- {
- e.graphics.drawstring("The Listview is empty"); //put all the proper args in here!
- }
- }
Add Comment
Please, Sign In to add comment