Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 135,961 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,542 people online right now. Registration is fast and FREE... Join Now!




MFC Help....Mouse Coordinates

 
Reply to this topicStart new topic

MFC Help....Mouse Coordinates

JohnMiogi
16 Apr, 2007 - 02:59 PM
Post #1

New D.I.C Head
*

Joined: 16 Apr, 2007
Posts: 1


My Contributions
Hello all, I am kind of new to programming and I have having a great deal trouble trying to get the mouse to click on screen in MFC SDI mode and I need to have the screen where I click with my mouse say the x, and y coordinates..

I have tried so many things that I dont even remember anymore, I have used the GetCurrentPosition, which I dont kbow how to use anyhow..

Please could someone help me get this problem I have been working on for so long now. I am using Visual Studio 6.0, working in MFC evvironment, single document Interface

Thanks ..

John wub.gif
User is offlineProfile CardPM
+Quote Post

NickDMax
RE: MFC Help....Mouse Coordinates
16 Apr, 2007 - 05:39 PM
Post #2

2B||!2B
Group Icon

Joined: 18 Feb, 2007
Posts: 2,858



Thanked: 48 times
Dream Kudos: 550
My Contributions
What are you clicking on? If you are clicking on a control then windows will send the position of the click in a message to the control. In fact every time a button is clicked windows sticks it in a message to something... if you "hook" the destination of the message you can "listen in" and get the coordinates.


User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/1/08 09:31AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month