GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ 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 02-Apr-2006, 05:28
puffamuffa puffamuffa is offline
New Member
 
Join Date: Apr 2006
Posts: 4
puffamuffa is on a distinguished road

Mouse Click


Hi all,

I want to do something like this:
I want to detect the moment the user click on the left mouse button in ANY window, so that I can do something else once they click.

How can I do that?

Thanks in advance,

P.
  #2  
Old 02-Apr-2006, 10:09
Brenton S. Brenton S. is offline
New Member
 
Join Date: Mar 2006
Location: Piscataway, NJ
Posts: 21
Brenton S. is on a distinguished road
Smile

Re: Mouse Click


Hello puffamuffa,

Well, what I would do is use the GetAsyncKeyState() function.

Ex:

Code:
if(GetAsyncKeyState(VK_LBUTTON) & 0x8000) /* Is the left mouse button being pressed? */ { /* Do something */ }

I hope I've been of some help.
  #3  
Old 02-Apr-2006, 18:09
puffamuffa puffamuffa is offline
New Member
 
Join Date: Apr 2006
Posts: 4
puffamuffa is on a distinguished road

Re: Mouse Click


Thanks Brenton S. I will have a go with this function.
 
 

Recent GIDBlogWriting a book 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
How to generate mouse event? high12398 C++ Forum 3 20-Apr-2006 19:24
How to move with mouse, drawn line. stormlab C++ Forum 0 01-Apr-2006 13:20
Automatic mouse moving and clicking Padek78 MS Visual C++ / MFC Forum 2 29-Mar-2005 00:50
Detecting a mouse click outside of control arran.s MS Visual C++ / MFC Forum 1 27-Oct-2004 07:01
Sydog's DVD to Divx Conversion Guide asanthadenz Computer Software Forum - Windows 1 14-Mar-2003 15:08

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

All times are GMT -6. The time now is 08:57.


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