Change Mouse Cursor in the CList Control

shobhit_ra's Avatar, Join Date: Apr 2009
Go4Expert Member
Hello All

I am using MFC Dialog based aplication.
I have to change Mouse Curser when mouse move on the CList control.

Please suggest or provide the code for it.
Thanks.
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Load the needed cursor and use SetCursor API
shobhit_ra's Avatar, Join Date: Apr 2009
Go4Expert Member
Where to load the cursor?
How would I know that the cursor has moved on List control?
There is no event regarding this.

Please suggest.
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
There are mouse events related to the control like MouseIn and out as well as Hover of mouse and using them you have the get it.

Also loading the cursor can be done in the initdialog and then have them in the Variable and set / reset them as needed.
shobhit_ra's Avatar, Join Date: Apr 2009
Go4Expert Member
There are LBtnClick, RBtnClick, DblClick .... events for the control.
For Clist control there is no MouseIn or MouseOut events and MouseOver event is for the dialog only.

CList get notified on following events - Setfocus (when clicking through mouse), KillFocus, SelChange....

I am not finding any event when Mouse just goes over it???

Please suggest.
Thanks for the reply
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
I guess what you are looking at is the front end and I guess you need to get into looking at MSDN rather than front end.
shobhit_ra's Avatar, Join Date: Apr 2009
Go4Expert Member
I could not understand your reply.
Please explain again with more detail.
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
The Mouseevent is there for all the windows control. Its just that if you use MSDN you would get to see them and write code for them but the UI Editor does not show all of them