Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Mouse Input In C Programs, using checkbox etc
klusk
post Mar 5 2008, 11:59 AM
Post #1


Newbie [Level 2]
**

Group: [HOSTED]
Posts: 35
Joined: 16-February 08
From: bombay
Member No.: 57,972



how can we use mouse input in C programs...i think that works only in graphics mode...
i tried a few functions that are available but they are not working...either i dont know how to use them properly or they dont work under my compiler...i use borlandv3.
do i have to download some file from internet which will make it work or i need to use a different compiler.....
and also i wish to know what all things i can do with it once it starts working,i mean checkbox or optionbox or making mouse focus specific areas.................
I know these things can be done better with other languages like VB ..but i need to work in C.

This post has been edited by klusk: Mar 5 2008, 12:01 PM
Go to the top of the page
 
+Quote Post
CrashCore
post Mar 6 2008, 12:20 AM
Post #2


Super Member
*********

Group: [HOSTED]
Posts: 205
Joined: 8-April 05
Member No.: 5,385



I'm not sure how much this helps, but I found a utility that can help with graphics implementation for C++. I am unsure how it works for C. I also haven't tested it or anything, but I guess it is worth a try.

http://www.genlogic.com/rel26.html

Also note that this does use Active-X (yuck!), which I guess saves you all the bother of reading the 25 X-Windows books to learn to make a simple pop-up...which I guess is a good thing.
Go to the top of the page
 
+Quote Post
fffanatics
post Mar 6 2008, 03:11 AM
Post #3


Privileged Member
*********

Group: [HOSTED]
Posts: 937
Joined: 14-April 05
From: West Chester, PA
Member No.: 5,636



The only was to get mouse input in C programs is to include either the windows.h header file or the x-window headers. The reason is that C is a console language and does not do anything with graphics since a console is keyboard based. However, if you add a graphics header to make the program into a graphical one, you will be able to get mouse input. Look into using winmain on windows. You will see there is msgproc which has a bunch of mouse messages and this is where you will handle mouse input.
Go to the top of the page
 
+Quote Post
klusk
post Mar 6 2008, 02:53 PM
Post #4


Newbie [Level 2]
**

Group: [HOSTED]
Posts: 35
Joined: 16-February 08
From: bombay
Member No.: 57,972



QUOTE(fffanatics @ Mar 6 2008, 08:41 AM) *
The only was to get mouse input in C programs is to include either the windows.h header file or the x-window headers. The reason is that C is a console language and does not do anything with graphics since a console is keyboard based. However, if you add a graphics header to make the program into a graphical one, you will be able to get mouse input. Look into using winmain on windows. You will see there is msgproc which has a bunch of mouse messages and this is where you will handle mouse input.


thanx...winmain will do the work i wanted, just a part of C project at school..thought of adding something new...
i'll have to learn using winmain now.....
just thinking of trying windows.h and x- window headers but they are not present in my include directory...
i havent started using winmain...so if there is some connection between the two ....forgive me for asking this...but i just thought they are different

This post has been edited by klusk: Mar 6 2008, 03:00 PM
Go to the top of the page
 
+Quote Post
osknockout
post Mar 25 2008, 03:11 AM
Post #5


Super Member
*********

Group: Members
Posts: 370
Joined: 14-November 04
From: Elysium
Member No.: 2,280



QUOTE
The only was to get mouse input in C programs is to include either the windows.h header file or the x-window headers.
That's not true at all.

The gpm library (http://linux.schottelius.org/gpm/) provides a mouse server without any x11 stuffs. I don't know how well it can be natively ported to windows (or if one already exists) but it should be able to be cygwin'd.
Go to the top of the page
 
+Quote Post
howardh
post Mar 30 2008, 07:22 PM
Post #6


Newbie
*

Group: Members
Posts: 4
Joined: 24-February 08
Member No.: 58,381



adrianxw's website shows you how to use mouse input with the console (Working with Windows Consoles, Part 5) plus a few other interesting tutorials for win32 console apps.

http://www.adrianxw.dk/SoftwareSite/index.html
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Catching Key Input And Closing Wordpad.(0)
  2. Can't Compile Assembly Programs.(2)
  3. C/c++ Programming Experince(3)
  4. How To Input A Password In C(0)
  5. Buffer Overflow In Action Tutorial(0)
  6. Programs(4)
  7. Simple C++ Programs.(17)
  8. C++ Programmers(1)


 



- Lo-Fi Version Time is now: 13th May 2008 - 05:46 PM