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.
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.
The only way I know of doing this is with assembly and it involves trapping interrupt 33 for the mouse.
is assembly in any way compatible with c++
Yes, it is. However I have little experience in this aspect so if someone else would care to share light on the subject?
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.
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.
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.
"console-based"
I was assuming klinerr1 meant under windows because dos doesn't really have a console window.
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...