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. Marquee Progess Bar

Marquee Progess Bar

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

    Hi, How to put marquee progress bar in win32 under windows XP.

    N C 2 Replies Last reply
    0
    • J JM2251

      Hi, How to put marquee progress bar in win32 under windows XP.

      N Offline
      N Offline
      Nuri Ismail
      wrote on last edited by
      #2

      Create your progress bar with PBS_MARQUEE[^] style. You can start and stop the animation, and control its speed using PBM_SETMARQUEE[^] message. :)

      1 Reply Last reply
      0
      • J JM2251

        Hi, How to put marquee progress bar in win32 under windows XP.

        C Offline
        C Offline
        Cool_Dev
        wrote on last edited by
        #3

        In win32

        //Set Marquee Style to Progress Bar
        SetWindowLongPtr(hwndProgressBar, GWL_STYLE, PBS_MARQUEE);
        //Turn On Marque
        SendMessage(hwndProgressBar, PBM_SETMARQUEE, (WPARAM)TRUE, (LPARAM)100/*interval*/);

        Marquee style needs additional requirements. If it doesn't work, try additional resource manifests. Build Requirements for Windows Vista Common Controls Manifest Resources

        J 1 Reply Last reply
        0
        • C Cool_Dev

          In win32

          //Set Marquee Style to Progress Bar
          SetWindowLongPtr(hwndProgressBar, GWL_STYLE, PBS_MARQUEE);
          //Turn On Marque
          SendMessage(hwndProgressBar, PBM_SETMARQUEE, (WPARAM)TRUE, (LPARAM)100/*interval*/);

          Marquee style needs additional requirements. If it doesn't work, try additional resource manifests. Build Requirements for Windows Vista Common Controls Manifest Resources

          J Offline
          J Offline
          JM2251
          wrote on last edited by
          #4

          I am getting compilation error: C2065: 'PBS_MARQUEE' : undeclared identifier I written the code the InitDialog() HWND hwndProgress=GetDlgItem(m_hwnd,IDC_PROGRESS1); SetWindowLongPtr(hwndProgress, GWL_STYLE, PBS_MARQUEE); My application is win32. Please suggest??

          E 1 Reply Last reply
          0
          • J JM2251

            I am getting compilation error: C2065: 'PBS_MARQUEE' : undeclared identifier I written the code the InitDialog() HWND hwndProgress=GetDlgItem(m_hwnd,IDC_PROGRESS1); SetWindowLongPtr(hwndProgress, GWL_STYLE, PBS_MARQUEE); My application is win32. Please suggest??

            E Offline
            E Offline
            Emilio Garavaglia
            wrote on last edited by
            #5

            Check your SDK version and the value asigned to the WINVER symbol. May be the definition of that constant is disabled by a old WINVER number

            2 bugs found. > recompile ... 65534 bugs found. :doh:

            C 1 Reply Last reply
            0
            • E Emilio Garavaglia

              Check your SDK version and the value asigned to the WINVER symbol. May be the definition of that constant is disabled by a old WINVER number

              2 bugs found. > recompile ... 65534 bugs found. :doh:

              C Offline
              C Offline
              Cool_Dev
              wrote on last edited by
              #6

              as emilo told, you can see those values in CommCtrl.h as

              #if (_WIN32_WINNT >= 0x0501)
              #define PBS_MARQUEE 0x08
              #endif // _WIN32_WINNT >= 0x0501

              #if (_WIN32_WINNT >= 0x0501)
              #define PBM_SETMARQUEE (WM_USER+10)
              #endif // _WIN32_WINNT >= 0x0501

              so check your source code (probably in targetver.h) for #define _WIN32_WINNT and check the value. Also, you can try defining those values manually in your code as

              #define PBS_MARQUEE 0x08
              #define PBM_SETMARQUEE (WM_USER+10)

              :thumbsup:

              E 1 Reply Last reply
              0
              • C Cool_Dev

                as emilo told, you can see those values in CommCtrl.h as

                #if (_WIN32_WINNT >= 0x0501)
                #define PBS_MARQUEE 0x08
                #endif // _WIN32_WINNT >= 0x0501

                #if (_WIN32_WINNT >= 0x0501)
                #define PBM_SETMARQUEE (WM_USER+10)
                #endif // _WIN32_WINNT >= 0x0501

                so check your source code (probably in targetver.h) for #define _WIN32_WINNT and check the value. Also, you can try defining those values manually in your code as

                #define PBS_MARQUEE 0x08
                #define PBM_SETMARQUEE (WM_USER+10)

                :thumbsup:

                E Offline
                E Offline
                Emilio Garavaglia
                wrote on last edited by
                #7

                err... this should be said to the OP not to myself

                2 bugs found. > recompile ... 65534 bugs found. :doh:

                C 1 Reply Last reply
                0
                • E Emilio Garavaglia

                  err... this should be said to the OP not to myself

                  2 bugs found. > recompile ... 65534 bugs found. :doh:

                  C Offline
                  C Offline
                  Cool_Dev
                  wrote on last edited by
                  #8

                  he might have seen it already :)

                  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