RSS Forums RSS

mouse functions for DOS

Please support our C++ advertiser: Programming Forums
Reply
Posts: 11
Reputation: RossSCann is an unknown quantity at this point 
Solved Threads: 0
RossSCann RossSCann is offline Offline
Newbie Poster

Help mouse functions for DOS

  #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
AddThis Social Bookmark Button
Reply With Quote  
Posts: 13,835
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: 1230
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Most Valuable Poster

Re: mouse functions for DOS

  #2  
Jan 21st, 2008
Reply With Quote  
Posts: 1,908
Reputation: Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold 
Solved Threads: 204
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: mouse functions for DOS

  #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 6:07 pm.
Reply With Quote  
Posts: 13,835
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: 1230
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Most Valuable Poster

Re: mouse functions for DOS

  #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.
Reply With Quote  
Posts: 13,835
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: 1230
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Most Valuable Poster

Re: mouse functions for DOS

  #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 7:01 pm.
Reply With Quote  
Posts: 11
Reputation: RossSCann is an unknown quantity at this point 
Solved Threads: 0
RossSCann RossSCann is offline Offline
Newbie Poster

Re: mouse functions for DOS

  #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  
Posts: 11
Reputation: RossSCann is an unknown quantity at this point 
Solved Threads: 0
RossSCann RossSCann is offline Offline
Newbie Poster

Re: mouse functions for DOS

  #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 3:17 pm. Reason: unintentional error. Sorry.
Reply With Quote  
Posts: 1,908
Reputation: Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold 
Solved Threads: 204
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: mouse functions for DOS

  #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 3:18 pm.
Reply With Quote  
Posts: 13,835
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: 1230
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Most Valuable Poster

Re: mouse functions for DOS

  #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.
Reply With Quote  
Posts: 1,908
Reputation: Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold 
Solved Threads: 204
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: mouse functions for DOS

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Similar Threads
Other Threads in the C++ Forum
Views: 1488 | Replies: 11 | Currently Viewing: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 10:24 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC