visual studio - CListCtrl mouse events not working -


i have clistctrl in cdialog. , of events not getting called clistctrl. example onmousemove no getting called when mouse pointer on clistctrl works if mouse pointer on window or editcontrol etc.

note: clistctrl set report view.

can explain behavior?

i have suffered similar symptoms, (reported in question "mfc clistctrl not appear after minimise-restore" under name). found did, many messages not appear think should, not @ all. , others have found same thing. solved creating own class inheriting clistctrl , overriding onnotify(...). found received messages, trapped ones wanted , revised behaviour suit in own class. (i preventing resizing of column widths.) no other code needed in case.

bool ccompilationlistctrl::onnotify(wparam wparam, lparam lparam, lresult* presult) {     hd_notify *phdn = (hd_notify*)lparam;     {         if(phdn->hdr.code == hdn_begintrackw || phdn->hdr.code == hdn_begintracka)         {             *presult = true;             return true;         }         if(phdn->hdr.code == hdn_endtrackw || phdn->hdr.code == hdn_endtracka)         {             *presult = true;             return true;         }         if(phdn->hdr.code == hdn_dividerdblclickw || phdn->hdr.code == hdn_dividerdblclicka)         {             *presult = true;             return true;         }     }     return clistctrl::onnotify(wparam, lparam, presult); } 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -