Suppose I need to capture the listView message and on the form have three listView, the variable m.Msg distinguish the listView1, listView2, listView3, ... and when run output message m.Msg variable in the attachment: http://www.mediafire.com/file/weab5ppsb355kc1/out_WndProc.doc

protected override void WndProc(ref Message m)
   {
        Debug.Print("out if: " + m.Msg);
        if (m.Msg == WM_NOFITY)
            {
                Debug.Print("in if: " + m.Msg);
            }
  }

Recommended Answers

Check your spelling on line 4, it should be WM_NOTIFY

Jump to Post

All 3 Replies

First, if you got an answer to your question, you should mark it as solved.
Second, no sure what you are trying to achieve here.
Guess you are using Visual Studio.
It has a most wonderful debugger.
Debug.Print etc. is very 'old style', just set breakpoints in your code and watch your variables.

Check your spelling on line 4, it should be WM_NOTIFY

commented: No fitty it is. +14

if debug what but how do I know if the m.Msg variable is a listview message ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.