Click to See Complete Forum and Search --> : Obtaining a CPoint object


Jim Bassett
May 20th, 1999, 01:03 PM
I have a MDI application that uses a CFormView. I have a ListCtrl control on the formview and I need to get a CPoint object of where my mouse is to find the particular row in a Clistview I am in. The message "On left button" only replys if I am in the area of the formview but does not reply if I am in the ListCtrl. How does one get a CPoint of the mouse location if it is not passed as an argument in the message function?

Thanks

Jim Bassett

May 20th, 1999, 01:30 PM
Try GetCursorPos. It will fill in a POINT structure for you. Or you could use GetMessagePos which is the position of the mouse cursor at the time the message was retrieved by GetMessage.