clciking in dos

This is a discussion on clciking in dos within the C++ Programming forums, part of the General Programming Boards category; i know in dos you can click on selection and not type 1 for option 1 and 2 for ption ...

  1. #1
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608

    clciking in dos

    i know in dos you can click on selection and not type 1 for option 1 and 2 for ption and so on, how would i do this is a console based c++ program? to like click text and it does an operation.
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

  2. #2
    Registered User
    Join Date
    May 2002
    Posts
    317
    The only way I know of doing this is with assembly and it involves trapping interrupt 33 for the mouse.

  3. #3
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    is assembly in any way compatible with c++
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

  4. #4
    Registered User
    Join Date
    May 2002
    Posts
    317
    Yes, it is. However I have little experience in this aspect so if someone else would care to share light on the subject?

  5. #5
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    It could be done without assembly. It wouldn't be perfect though. Basically, your program would have to go into an infinite loop and check if the right mouse button was down(GetAsyncKeyState(VK_LBUTTON)). If it is, you can check the current location of the mouse and use that data. Again, this wouldn't be too pretty but it might work for what you are doing.

  6. #6
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Wasn't this program for dos?... I thought GetAsycKeyState() was a Windows thingee.

    And assembly is a completely different language thingee; you can work it into your code with the "asm" keyword though... I personally don't think it's worthwhile, because I have no patience trying to figure out what "move the register to the ax key placement module of the CPU system" means in the tutorials.
    Last edited by Hunter2; 07-20-2002 at 06:36 PM.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  7. #7
    Registered User
    Join Date
    Aug 2001
    Posts
    403
    i remember in pascal there was a "unit" (same as a library in C++) for mouse support in DOS.. I'd assume C++ has similar support.

    Try:
    www.pscode.com
    www.programmersheaven.com
    and the old standby - www.google.com

    (edit: I found a few, hopefully one will work for you)
    http://www.programmersheaven.com/sea...sp?FileID=6669
    http://www.programmersheaven.com/sea...p?FileID=14975
    Last edited by cozman; 07-20-2002 at 06:57 PM.

  8. #8
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    "console-based"

    I was assuming klinerr1 meant under windows because dos doesn't really have a console window.

  9. #9
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    if you were on a DOS compiler, and you wanted to avoid inline ASM, you could use their conventions for calling interrupts... they vary from compiler to compiler slightly... which are you using? check out RBIL (Ralph Brown's Interrupt List) for all your interrupt needs...
    hasafraggin shizigishin oppashigger...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File systems?? (Winxp -> DOS)
    By Shadow in forum Tech Board
    Replies: 4
    Last Post: 01-06-2003, 08:08 PM
  2. winver, winminor, winmajor can it be found from dos?
    By ronin in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 10-02-2002, 10:32 AM
  3. real mode dos & win dos
    By scott27349 in forum A Brief History of Cprogramming.com
    Replies: 26
    Last Post: 08-19-2002, 06:15 AM
  4. DOS program versus DOS console program
    By scromer in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 01-10-2002, 12:42 PM
  5. Shut off DOS screen automatically to Windows
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 11-08-2001, 06:14 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21