Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Win32 (http://www.go4expert.com/forums/win32/)
-   -   WIN32 ListView Column Click (http://www.go4expert.com/forums/win32-listview-column-click-t7588/)

MardukLitzer 28Nov2007 08:26

WIN32 ListView Column Click
 
Hello All, I'm having difficulty detecting the 'LVN_COLUMNCLICK' message from a ListView control. I am entering the WM_NOTIFY for sure, but I can't trap the LVN_COLUMNCLICK. Not sure where else to look, my code seems to follow what is listed on MSDN and just about every snippet I've found. Any ideas would be great!
See Below:
Code:

LPNMHDR nmHdr = NULL;
...code here
        //WM_NOTIFY is very first case, ensures lParam integrity
        switch(message){
        case WM_NOTIFY:
                nmHdr = (LPNMHDR) lParam;
                switch (nmHdr->code){
                        case LVN_COLUMNCLICK:
                                MessageBox(NULL, "CLICK DETECTED", NULL, MB_OK);
                                break;
...code here

Also have tried this:
Code:

...code here
case WM_NOTIFY:
            switch(((LPNMHDR)lParam)->code)
                  case LVN_COLUMNCLICK:
                        MessageBox(NULL, "CLICK DETECTED", NULL, MB_OK);
            return 0;
...code here



All times are GMT +5.5. The time now is 17:19.