Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CursorInfo

CursorInfo

Scheduled Pinned Locked Moved C / C++ / MFC
question
6 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    duta
    wrote on last edited by
    #1

    Hi there i'm using GetCursorInfo in order to have the handle to the cursor. How can I know what type of cursor do I have ( ex arrow, hand, wait)???

    M S B 3 Replies Last reply
    0
    • D duta

      Hi there i'm using GetCursorInfo in order to have the handle to the cursor. How can I know what type of cursor do I have ( ex arrow, hand, wait)???

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      duta wrote:

      How can I know what type of cursor do I have ( ex arrow, hand, wait)???

      If it's a custom cursor, then you won't know what it is. For system predefined cursors, you MAY be able to compare the handle to the handle returned by LoadCursor() for predefined cursors. I'm not sure if those handles are always the same but it's easy enough to test :) Mark

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      D 1 Reply Last reply
      0
      • D duta

        Hi there i'm using GetCursorInfo in order to have the handle to the cursor. How can I know what type of cursor do I have ( ex arrow, hand, wait)???

        S Offline
        S Offline
        Shog9 0
        wrote on last edited by
        #3

        A better question is, why do you want to do that? As Mark stated, it's gonna fall apart if someone sets up a custom cursor anyway, and even if that never happens you'd still be depending a good deal on what is essentially an implementation detail of how Windows loads common images... so unless this is a convenience thing (you need to record the current cursor for some reason and want to display a friendly name for it if possible), you're better off finding another way of maintaining state.

        ----

        ...the wind blows over it and it is gone, and its place remembers it no more...

        1 Reply Last reply
        0
        • D duta

          Hi there i'm using GetCursorInfo in order to have the handle to the cursor. How can I know what type of cursor do I have ( ex arrow, hand, wait)???

          B Offline
          B Offline
          Bram van Kampen
          wrote on last edited by
          #4

          The Bottom Line is that good programming practice dictates, that you keep track of what you do! That's called Programming!

          Bram van Kampen

          1 Reply Last reply
          0
          • M Mark Salsbery

            duta wrote:

            How can I know what type of cursor do I have ( ex arrow, hand, wait)???

            If it's a custom cursor, then you won't know what it is. For system predefined cursors, you MAY be able to compare the handle to the handle returned by LoadCursor() for predefined cursors. I'm not sure if those handles are always the same but it's easy enough to test :) Mark

            Mark Salsbery Microsoft MVP - Visual C++ :java:

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            Mark Salsbery wrote:

            ...but it's easy enough to test

            Surely you jest!


            "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

            "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

            M 1 Reply Last reply
            0
            • D David Crow

              Mark Salsbery wrote:

              ...but it's easy enough to test

              Surely you jest!


              "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

              "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

              M Offline
              M Offline
              Mark Salsbery
              wrote on last edited by
              #6

              No. And don't call me surely :)

              Mark Salsbery Microsoft MVP - Visual C++ :java:

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups