1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Change Mouse Cursor in the CList Control

Discussion in 'Win32' started by shobhit_ra, Apr 2, 2009.

  1. shobhit_ra

    shobhit_ra New Member

    Joined:
    Apr 2, 2009
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    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.
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,287
    Likes Received:
    364
    Trophy Points:
    83
    Load the needed cursor and use SetCursor API
     
  3. shobhit_ra

    shobhit_ra New Member

    Joined:
    Apr 2, 2009
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    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.
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,287
    Likes Received:
    364
    Trophy Points:
    83
    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.
     
  5. shobhit_ra

    shobhit_ra New Member

    Joined:
    Apr 2, 2009
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    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
     
  6. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,287
    Likes Received:
    364
    Trophy Points:
    83
    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.
     
  7. shobhit_ra

    shobhit_ra New Member

    Joined:
    Apr 2, 2009
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    I could not understand your reply.
    Please explain again with more detail.
     
  8. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,287
    Likes Received:
    364
    Trophy Points:
    83
    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
     

Share This Page