How to handle multiple WM_NOTIFY cases ?

Pages: 12
Your two listviews should have distinct IDs. Both your CreateWindowsEx calls are being passed ID_LISTVIEW for the control ID which is problematic.

(EDIT spotted later that you stated as much)

Then when you handle the WM_NOTIFY message you can use the idFrom member of the NMHDR structure passed to the handler to work out whether to call NotifyHandlerXP or NotifyHandler

Andy

WM_NOTIFY message
https://docs.microsoft.com/en-us/windows/win32/controls/wm-notify


Last edited on
I don't mind the size of a column,,, this is here:

 
lvC.cx = 250;


but I really wanna resolve this problem...
Yup I was just arrived there and the only problem was this to use different id for both .. and use the ID from the NMHDR structure from each one..
HAhahaha the link you show I was just on the same page reading it.. Ty Andy

Ty for the help guys.. I was started to get fire.... but there's always a solution..

Once again thank you all..
Let's say I just let the case notify like this:

1
2
3
4
5
6
case WM_NOTIFY:
        {
            (NotifyHandlerXP(hWnd, msg, wp, lp));
            (NotifyHandler(hWnd, msg, wp, lp));
            break;
        }


Well I only changed the ID_LISTVIEWXP and the NUM_ITEMLENXP for the second listview control in the header and now works fine..
Topic archived. No new replies allowed.
Pages: 12