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 appearence of mouse pointer to sand Time

How to change the appearence of mouse pointer to sand Time

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorialquestion
7 Posts 7 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.
  • K Offline
    K Offline
    kapardhi
    wrote on last edited by
    #1

    Hai I have an MFC application in which i download a binary file into a device. I have a status bar, which tells the progress of download, during this time i want to change the appearence of the mouse pointer to a sand time which is being done in almost all applications , how to do it ? Thanks!

    C K S C I 6 Replies Last reply
    0
    • K kapardhi

      Hai I have an MFC application in which i download a binary file into a device. I have a status bar, which tells the progress of download, during this time i want to change the appearence of the mouse pointer to a sand time which is being done in almost all applications , how to do it ? Thanks!

      C Offline
      C Offline
      Code o mat
      wrote on last edited by
      #2

      BeginWaitCursor()[^] and EndWaitCursor()[^]

      > The problem with computers is that they do what you tell them to do and not what you want them to do. <

      1 Reply Last reply
      0
      • K kapardhi

        Hai I have an MFC application in which i download a binary file into a device. I have a status bar, which tells the progress of download, during this time i want to change the appearence of the mouse pointer to a sand time which is being done in almost all applications , how to do it ? Thanks!

        K Offline
        K Offline
        K Sushilkumar
        wrote on last edited by
        #3

        If you are using MFC then try,

        BeginWaitCursor();
        ...
        EndWaitCursor();

        or

        CCmdTarget::BeginWaitCursor();
        ...
        CCmdTarget::EndWaitCursor();

        Thanks.

        1 Reply Last reply
        0
        • K kapardhi

          Hai I have an MFC application in which i download a binary file into a device. I have a status bar, which tells the progress of download, during this time i want to change the appearence of the mouse pointer to a sand time which is being done in almost all applications , how to do it ? Thanks!

          S Offline
          S Offline
          Stuart Dootson
          wrote on last edited by
          #4

          [CWaitCursor](http://msdn.microsoft.com/en-us/library/wc7bzytb%28VS.80%29.aspx)[[^](http://msdn.microsoft.com/en-us/library/wc7bzytb%28VS.80%29.aspx)]

          1 Reply Last reply
          0
          • K kapardhi

            Hai I have an MFC application in which i download a binary file into a device. I have a status bar, which tells the progress of download, during this time i want to change the appearence of the mouse pointer to a sand time which is being done in almost all applications , how to do it ? Thanks!

            C Offline
            C Offline
            Chandrasekharan P
            wrote on last edited by
            #5

            u can use SetCursor function

            SetCursor(LoadCursor(NULL, IDC_WAIT));

            IDC_WAIT is HourGlass

            1 Reply Last reply
            0
            • K kapardhi

              Hai I have an MFC application in which i download a binary file into a device. I have a status bar, which tells the progress of download, during this time i want to change the appearence of the mouse pointer to a sand time which is being done in almost all applications , how to do it ? Thanks!

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

              In addition to your other replies, you might be up/downloading the file using some sort of background thread. If the upload takes any length of time, I *hope* you're using a thread to keep your UI responsive. In which case, you will also have to handle WM_SETCURSOR, other wise as soon as the mouse moves, your cursor will go back to normal. Yours-been-bitten-by-this-in-the-past, Iain.

              1 Reply Last reply
              0
              • K kapardhi

                Hai I have an MFC application in which i download a binary file into a device. I have a status bar, which tells the progress of download, during this time i want to change the appearence of the mouse pointer to a sand time which is being done in almost all applications , how to do it ? Thanks!

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

                kapardhi wrote:

                ...how to do it ?

                Simply respond to the WM_SETCURSOR message.

                "Love people and use things, not love things and use people." - Unknown

                "The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch

                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