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 add animation CWaitCursor

how to add animation CWaitCursor

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorial
7 Posts 4 Posters 1 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.
  • P Offline
    P Offline
    ptr_Electron
    wrote on last edited by
    #1

    During long search operation in MFC applicaton how to add animation CWaitCursor

    C 1 Reply Last reply
    0
    • P ptr_Electron

      During long search operation in MFC applicaton how to add animation CWaitCursor

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      Everything is clearly explained (with an example and everything) in the documentation[^]. Basically, you just create an instance of the class at the begining of your lenghty function and it will be destroyed when the function exits.

      Cédric Moonen Software developer
      Charting control [v2.0] OpenGL game tutorial in C++

      P 1 Reply Last reply
      0
      • C Cedric Moonen

        Everything is clearly explained (with an example and everything) in the documentation[^]. Basically, you just create an instance of the class at the begining of your lenghty function and it will be destroyed when the function exits.

        Cédric Moonen Software developer
        Charting control [v2.0] OpenGL game tutorial in C++

        P Offline
        P Offline
        ptr_Electron
        wrote on last edited by
        #3

        Yes true, But I dont want the normal hour glass, but instead I need some other animation, so...

        N D 2 Replies Last reply
        0
        • P ptr_Electron

          Yes true, But I dont want the normal hour glass, but instead I need some other animation, so...

          N Offline
          N Offline
          Nibu babu thomas
          wrote on last edited by
          #4

          ptr_Electron wrote:

          Yes true, But I dont want the normal hour glass, but instead I need some other animation, so...

          If you've globally set an animated wait cursor then I guess that will be displayed instead of the hour glass. Also you can try LoadCursorFromFile.

          Nibu babu thomas Microsoft MVP for VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http://nibuthomas.wordpress.com

          1 Reply Last reply
          0
          • P ptr_Electron

            Yes true, But I dont want the normal hour glass, but instead I need some other animation, so...

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

            Can you respond to the WM_SETCURSOR message?

            "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            P 1 Reply Last reply
            0
            • D David Crow

              Can you respond to the WM_SETCURSOR message?

              "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

              "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

              P Offline
              P Offline
              ptr_Electron
              wrote on last edited by
              #6

              I wrote this code in the button click event, but no change in the run time I get normal pointer cursor. please advice, I want to display animated cursor.

              HCURSOR hcur;
              hcur = ::LoadCursorFromFile((LPCWSTR)"C:\\eglobe.ani");
              ::SetSystemCursor(hcur,OCR_NORMAL);

              when I add watch for "hcur" it is null and unused

              modified on Tuesday, May 26, 2009 5:36 AM

              D 1 Reply Last reply
              0
              • P ptr_Electron

                I wrote this code in the button click event, but no change in the run time I get normal pointer cursor. please advice, I want to display animated cursor.

                HCURSOR hcur;
                hcur = ::LoadCursorFromFile((LPCWSTR)"C:\\eglobe.ani");
                ::SetSystemCursor(hcur,OCR_NORMAL);

                when I add watch for "hcur" it is null and unused

                modified on Tuesday, May 26, 2009 5:36 AM

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

                Does hcur have global scope?

                "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

                "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                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