cursor and co-ord

This is a discussion on cursor and co-ord within the C++ Programming forums, part of the General Programming Boards category; Hi, How can I make a crosshair cursor that when you click on a certain co-ord, some text displays? Thanks, ...

  1. #1
    Registered User stuart_cpp's Avatar
    Join Date
    Apr 2006
    Location
    UK
    Posts
    31

    cursor and co-ord

    Hi,
    How can I make a crosshair cursor that when you click on a certain co-ord, some text displays?
    Thanks,
    Stuart_cpp
    Last edited by stuart_cpp; 07-24-2006 at 07:20 AM.

  2. #2
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    what compiler and operating system???

  3. #3
    Registered User stuart_cpp's Avatar
    Join Date
    Apr 2006
    Location
    UK
    Posts
    31
    Default Compiler and using Dev-C++

  4. #4
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,470
    you probably mean mingw and you also probably mean windows
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #5
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    first you need to learn how to write an MS-Windows gui program -- you can't do what you have in mind with a console program. If you don't know how to write a win32 api program then start with this tutorial. After you learn that you can use the sample program as a starter program for your own programs. After you learn that pretty well then either (1) you will know the answer to your own question, or (2) repost you question when the answer will make more sense to you.

  6. #6
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,470
    It's actually possible to do it in a console. Although difficult for a beginner.

    http://www.electroguys.com/articles/mouse/ provides an introduction to the subject. There are probably some libs or header files out there with a more complete framework.

    One I know of is the Turbo Vision library. Although to have that linked just to use the mouse part of it is probably wasteful.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  7. #7
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    Mario: how do you make a cross-hair cursor with a console program? And the link you posted is for 16-bit MS-DOS programs, which are of course unusable in modern MS-Windows compilers.
    Last edited by Ancient Dragon; 07-24-2006 at 09:11 AM.

  8. #8
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,470
    You are right. Amidst the conversation I forgot about the original question.

    EDIT: However Turbo Vision is much Win32 compatible. But yes. No crosshair cursor
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Popular pages Recent additions subscribe to a feed

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