GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 07-Dec-2006, 15:18
Vampyre Vampyre is offline
New Member
 
Join Date: Dec 2006
Posts: 1
Vampyre is on a distinguished road

Mouse Location in Visual Studio


Can anyone show me how to get the mouse location when clicked?
  #2  
Old 12-Dec-2006, 20:40
TurboPT's Avatar
TurboPT TurboPT is offline
Regular Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 992
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: Mouse Location in Visual Studio


CPP / C++ / C Code:
POINT aPoint;
CString info;

GetCursorPos(&aPoint);

info.Format("mouse point(x / y): %d / %d", aPoint.x, aPoint.y);

MessageBox(info);
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
  #3  
Old 31-Jan-2008, 14:28
raviras raviras is offline
New Member
 
Join Date: Jan 2008
Posts: 15
raviras is an unknown quantity at this point

Re: Mouse Location in Visual Studio


ya i guess i will need a little more help. I am still in the learning phase, so please bear with me.

Here is the code that i am trying,

#include<iostream>
#include<windows.h>
#include<cmath>
#include<string>
#include <afxwin.h>

int main(int argc, char* argv[])
{
POINT aPoint;
CString info;
GetCursorPos(&aPoint);
info.Format("mouse point(x / y): %d / %d", aPoint.x, aPoint.y);
MessageBox(info);
}

This doesn't seem right...

Ravi
  #4  
Old 31-Jan-2008, 14:35
TurboPT's Avatar
TurboPT TurboPT is offline
Regular Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 992
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: Mouse Location in Visual Studio


I posted a modification back at the other post.
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
 
 

Recent GIDBlogPython ebook by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
need help with a console menu system BullBuchanan C++ Forum 6 20-Aug-2006 15:46
How Visual C++ only from Visual Studio .net Picstudent .NET Forum 2 28-May-2006 21:52
Microsoft visual studio 6 nadavsh MS Visual C++ / MFC Forum 0 05-Mar-2006 06:39
Visual Studio .NET 2003 problem in executing C source files Debugger1 C Programming Language 14 04-Jun-2005 03:51
What is "Ambigious symbol" ??*( a compilation error) small_ticket C++ Forum 2 07-Jan-2005 22:10

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 16:10.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.