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. About Mouse Icon

About Mouse Icon

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
8 Posts 3 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.
  • M Offline
    M Offline
    manish patel
    wrote on last edited by
    #1

    Hi All How can i get the Cursor(Which pointer is used like Pointer or Hand or Help ect) of the Mouse? Any help will be highly appriceated. Thanks in advance

    Manish Patel. B.E. - Information Technology.

    M 1 Reply Last reply
    0
    • M manish patel

      Hi All How can i get the Cursor(Which pointer is used like Pointer or Hand or Help ect) of the Mouse? Any help will be highly appriceated. Thanks in advance

      Manish Patel. B.E. - Information Technology.

      M Offline
      M Offline
      manish patel
      wrote on last edited by
      #2

      I have HCURSOR handle using GetCursorInfo function. now how can i extract information of mouse icon from this handle?

      Manish Patel. B.E. - Information Technology.

      _ 1 Reply Last reply
      0
      • M manish patel

        I have HCURSOR handle using GetCursorInfo function. now how can i extract information of mouse icon from this handle?

        Manish Patel. B.E. - Information Technology.

        _ Offline
        _ Offline
        _AnsHUMAN_
        wrote on last edited by
        #3

        Do you want to set the Mouse Cursor in your application to hand/hourglass etc? See SetCursor with IDC_HAND etc

        Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

        M 1 Reply Last reply
        0
        • _ _AnsHUMAN_

          Do you want to set the Mouse Cursor in your application to hand/hourglass etc? See SetCursor with IDC_HAND etc

          Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

          M Offline
          M Offline
          manish patel
          wrote on last edited by
          #4

          Thanks for your reply But i don't want to set Cursor, i want to get it. i.e. Whenever the Cursor changes from one type to another then my application should come to know that now cursor is changed and with which type. Is this possible?

          Manish Patel. B.E. - Information Technology.

          R 1 Reply Last reply
          0
          • M manish patel

            Thanks for your reply But i don't want to set Cursor, i want to get it. i.e. Whenever the Cursor changes from one type to another then my application should come to know that now cursor is changed and with which type. Is this possible?

            Manish Patel. B.E. - Information Technology.

            R Offline
            R Offline
            Rajkumar R
            wrote on last edited by
            #5

            I think the handle to system cursor return from LoadCursor(IDC_WAIT/...) return the unique same value everytime for the same cursor. u can compare the handle to the handle returned from GetCursor. and also i think u can compare that at WM_SETCURSOR notification. but why u need to know the state of app from the cursor, normally u will be setting the cursor for ur application, then u are able to know the current cursor without quering from the cursor.

            M 2 Replies Last reply
            0
            • R Rajkumar R

              I think the handle to system cursor return from LoadCursor(IDC_WAIT/...) return the unique same value everytime for the same cursor. u can compare the handle to the handle returned from GetCursor. and also i think u can compare that at WM_SETCURSOR notification. but why u need to know the state of app from the cursor, normally u will be setting the cursor for ur application, then u are able to know the current cursor without quering from the cursor.

              M Offline
              M Offline
              manish patel
              wrote on last edited by
              #6

              No this is not the case. I am developing application for screen sharing. In that i want to pass the type of mouse cursor just like (HAND, HELP, WAIT,...) I can also get the HCURSOR handle and by comparing it with inbuilt type i am getting cursor, but problem is with application that uses custom cursors like flash uses. So is there any other alternative then this one? CURSORINFO cInfo; cInfo.cbSize = sizeof(cInfo); if(cInfo.hCursor == LoadCursor(NULL, IDC_HAND)) { // For Hand Cursor } This works fine when cursor is of system type Now it will broken when i use it with flash because flash uses custom cursor so cInfo.hCursor will give some long values. Now i think you should understand my problem. If is there a way to know the type of cursor just like this is a cursor of type hand Thanks for your kind reply please help me on this. Thanks

              Manish Patel. B.E. - Information Technology.

              R 1 Reply Last reply
              0
              • R Rajkumar R

                I think the handle to system cursor return from LoadCursor(IDC_WAIT/...) return the unique same value everytime for the same cursor. u can compare the handle to the handle returned from GetCursor. and also i think u can compare that at WM_SETCURSOR notification. but why u need to know the state of app from the cursor, normally u will be setting the cursor for ur application, then u are able to know the current cursor without quering from the cursor.

                M Offline
                M Offline
                manish patel
                wrote on last edited by
                #7

                Is there any Event fire when mouse cursor change?

                Manish Patel. B.E. - Information Technology.

                1 Reply Last reply
                0
                • M manish patel

                  No this is not the case. I am developing application for screen sharing. In that i want to pass the type of mouse cursor just like (HAND, HELP, WAIT,...) I can also get the HCURSOR handle and by comparing it with inbuilt type i am getting cursor, but problem is with application that uses custom cursors like flash uses. So is there any other alternative then this one? CURSORINFO cInfo; cInfo.cbSize = sizeof(cInfo); if(cInfo.hCursor == LoadCursor(NULL, IDC_HAND)) { // For Hand Cursor } This works fine when cursor is of system type Now it will broken when i use it with flash because flash uses custom cursor so cInfo.hCursor will give some long values. Now i think you should understand my problem. If is there a way to know the type of cursor just like this is a cursor of type hand Thanks for your kind reply please help me on this. Thanks

                  Manish Patel. B.E. - Information Technology.

                  R Offline
                  R Offline
                  Rajkumar R
                  wrote on last edited by
                  #8

                  I would like to know why u need the type of cursor, if u want to use the same cursor on different process, use the handle, it is shareable among process [^], to use on different machine u can pass the image of cursor (for once). if u want to identify the type of cursor and there by determine the state of application, it is upto the application, for instance i can use WAIT cursor to indicate the purpose HAND.

                  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