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. How to Change the Cursor

How to Change the Cursor

Scheduled Pinned Locked Moved C / C++ / MFC
graphicstutorial
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.
  • S Offline
    S Offline
    santhoshv84
    wrote on last edited by
    #1

    Hello Everyone, I am using a Dialog Application, in which i am using two sliding dialogs for customizing the main dialog. I want to change the cursor for each sliding dialog. Should be Bitmap. Tell me if any one knows it.

    Thanks and Regards. SANTHOSH V

    H I N 3 Replies Last reply
    0
    • S santhoshv84

      Hello Everyone, I am using a Dialog Application, in which i am using two sliding dialogs for customizing the main dialog. I want to change the cursor for each sliding dialog. Should be Bitmap. Tell me if any one knows it.

      Thanks and Regards. SANTHOSH V

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      Did you use of CreateCursor for create it and SetCursor for set it?


      WhiteSky


      S 1 Reply Last reply
      0
      • H Hamid Taebi

        Did you use of CreateCursor for create it and SetCursor for set it?


        WhiteSky


        S Offline
        S Offline
        santhoshv84
        wrote on last edited by
        #3

        I used CreateCursor and SetCursor. It is working in main dialog. But, it is not working in the sliding dailogs. There are two sliding dialogs. I am want to use company logo as a cursor.

        Thanks and Regards. SANTHOSH V

        D 1 Reply Last reply
        0
        • S santhoshv84

          Hello Everyone, I am using a Dialog Application, in which i am using two sliding dialogs for customizing the main dialog. I want to change the cursor for each sliding dialog. Should be Bitmap. Tell me if any one knows it.

          Thanks and Regards. SANTHOSH V

          I Offline
          I Offline
          Iain Clarke Warrior Programmer
          wrote on last edited by
          #4

          It sounds like you need to handle WM_SETCURSOR in your sliding dialogs. But this would only handle the cursor on the dialog itself, not on any buttons, static controls etc. To handle all those cases would be possible by using subclassed controls also, but it sounds like rather a lot of work... You also have the separate problem of turning an arbitary bitmap into a cursor! Iain.

          1 Reply Last reply
          0
          • S santhoshv84

            Hello Everyone, I am using a Dialog Application, in which i am using two sliding dialogs for customizing the main dialog. I want to change the cursor for each sliding dialog. Should be Bitmap. Tell me if any one knows it.

            Thanks and Regards. SANTHOSH V

            N Offline
            N Offline
            Nelek
            wrote on last edited by
            #5

            Are the sliding dialogs coordinates fixed? You can get the dimensions and position of the dialogs. Then get the position of the mouse according to the main frame or the desktop and, if you are inside of the region ocuped by your dialog when is visible... then change the cursor to the one you want. I made it in my project when being over one bitmap (that represents an element that can be configured in advanced window), and changing cursor depending on the element.

            Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?

            1 Reply Last reply
            0
            • S santhoshv84

              I used CreateCursor and SetCursor. It is working in main dialog. But, it is not working in the sliding dailogs. There are two sliding dialogs. I am want to use company logo as a cursor.

              Thanks and Regards. SANTHOSH V

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

              santhoshv84 wrote:

              But, it is not working in the sliding dailogs.

              Are those dialogs responding to the WM_SETCURSOR message?


              "A good athlete is the result of a good and worthy opponent." - David Crow

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

              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