mouse functions for DOS

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Jan 2007
Posts: 15
Reputation: RossSCann is an unknown quantity at this point 
Solved Threads: 0
RossSCann RossSCann is offline Offline
Newbie Poster

mouse functions for DOS

 
0
  #1
Jan 21st, 2008
Does anyone know of a source of mouse functions for a console application in the visual C++.net developement environment package?
Thanks,
Ross
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,331
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1453
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: mouse functions for DOS

 
0
  #2
Jan 21st, 2008
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,951
Reputation: Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of 
Solved Threads: 214
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: mouse functions for DOS

 
0
  #3
Jan 21st, 2008
I don't know about .NET, but the Win32 functions are all listed here: Console Functions (MSDN).

You will need to enable mouse input with SetConsoleMode.
You can read it using ReadConsoleInput.

Use GetStdHandle to get a windows handle for the console input.
Use GetNumberOfConsoleInputEvents to poll for any console input, or use the console input handle with one of the wait functions.

Hope this helps.

[EDIT] Alas, AD, the cursor info is for the little blinking square or underline in the output console display.
Last edited by Duoas; Jan 21st, 2008 at 7:07 pm.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,331
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1453
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: mouse functions for DOS

 
0
  #4
Jan 21st, 2008
Originally Posted by Duoas View Post
[EDIT] Alas, AD, the cursor info is for the little blinking square or underline in the output console display.
Ah yes -- that only sets the size of that blinking cursor. Need to call ReadConsoleInput() to retrieve the mouse events.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,331
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1453
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: mouse functions for DOS

 
0
  #5
Jan 21st, 2008
Here are some example console programs. I have not used to code for a few years, but since its win32 api functions I suppose the programs will work with modern compilers.
Last edited by Ancient Dragon; Jan 21st, 2008 at 8:01 pm.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 15
Reputation: RossSCann is an unknown quantity at this point 
Solved Threads: 0
RossSCann RossSCann is offline Offline
Newbie Poster

Re: mouse functions for DOS

 
0
  #6
Jan 22nd, 2008
Originally Posted by Ancient Dragon View Post
Here are some example console programs. I have not used to code for a few years, but since its win32 api functions I suppose the programs will work with modern compilers.
Unfortunately none of the samples have mouse functions.
Ross
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 15
Reputation: RossSCann is an unknown quantity at this point 
Solved Threads: 0
RossSCann RossSCann is offline Offline
Newbie Poster

Re: mouse functions for DOS

 
0
  #7
Jan 22nd, 2008
The cost of MSDN is way more than a hobby programmer can justify
Last edited by Ancient Dragon; Jan 22nd, 2008 at 4:17 pm. Reason: unintentional error. Sorry.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,951
Reputation: Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of 
Solved Threads: 214
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: mouse functions for DOS

 
0
  #8
Jan 22nd, 2008
Those links don't work for you?

[EDIT]
Don't you dare put words in my mouth. If you want to edit your own posts again have fun.
Last edited by Duoas; Jan 22nd, 2008 at 4:18 pm.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,331
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1453
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: mouse functions for DOS

 
0
  #9
Jan 22nd, 2008
Originally Posted by Duoas View Post
Those links don't work for you?

Don't you dare put words in my mouth. If you want to edit your own posts again have fun.
I agree completely and apologize for that error. I meant to quote your post, not edit it. I removed my post and put it below.

MSDN is FREE for god's sake. www.microsoft.com But I suspect you are talking about the subscriptions which have huge annual fees.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,951
Reputation: Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of 
Solved Threads: 214
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: mouse functions for DOS

 
0
  #10
Jan 22nd, 2008
Ah, I understand what happened.

Sorry RossSCann, I thought you had done the edit. (And I had flagged the post as "bad".)
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC