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 Progress Control

Marquee Progress Control

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
12 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.
  • E Eugen Podsypalnikov

    Try it :) :

    HWND hwndProgress = GetDlgItem(m_hwnd, IDC_PROGRESS1);
    LONG_PTR lStyle = ::GetWindowLongPtr(hwndProgress, GWL_STYLE);
    lStyle |= PBS_MARQUEE;
    ::SetWindowLongPtr(hwndProgress, GWL_STYLE, lStyle);
    ::SendMessage(hwndProgress, PBM_SETMARQUEE, WPARAM(TRUE), LPARAM(50));

    virtual void BeHappy() = 0;

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

    Thanks for reply but above code is working with MFC application but not win32 application. In win32 Only blank Progress bar is coming. I am using VS 2005. Any help?

    E 1 Reply Last reply
    0
    • J JM2251

      Thanks for reply but above code is working with MFC application but not win32 application. In win32 Only blank Progress bar is coming. I am using VS 2005. Any help?

      E Offline
      E Offline
      Eugen Podsypalnikov
      wrote on last edited by
      #4

      Try to change the control line in your .rc file:

      CONTROL "",IDC_PROGRESS1,"msctls_progress32",PBS_MARQUEE,7,7,156,14

      ...and then send only the PBM_SETMARQUEE message in your init scope :)

      virtual void BeHappy() = 0;

      J 1 Reply Last reply
      0
      • E Eugen Podsypalnikov

        Try to change the control line in your .rc file:

        CONTROL "",IDC_PROGRESS1,"msctls_progress32",PBS_MARQUEE,7,7,156,14

        ...and then send only the PBM_SETMARQUEE message in your init scope :)

        virtual void BeHappy() = 0;

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

        If I change It display error: error RC2104 : undefined keyword or key name: PBS_MARQUEE I defined the PBS_MARQUEE in resource.h , error is not coming but progress bar is still empty and not in marquee mode.

        modified on Friday, April 9, 2010 5:44 AM

        E 1 Reply Last reply
        0
        • J JM2251

          If I change It display error: error RC2104 : undefined keyword or key name: PBS_MARQUEE I defined the PBS_MARQUEE in resource.h , error is not coming but progress bar is still empty and not in marquee mode.

          modified on Friday, April 9, 2010 5:44 AM

          E Offline
          E Offline
          Eugen Podsypalnikov
          wrote on last edited by
          #6

          Try to set it at the beginning of the .rc file, just for a test :) :

          #define PBS_MARQUEE 8

          virtual void BeHappy() = 0;

          J 1 Reply Last reply
          0
          • E Eugen Podsypalnikov

            Try to set it at the beginning of the .rc file, just for a test :) :

            #define PBS_MARQUEE 8

            virtual void BeHappy() = 0;

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

            ya I did but not working. Same blank progress bar is coming.

            E 1 Reply Last reply
            0
            • J JM2251

              ya I did but not working. Same blank progress bar is coming.

              E Offline
              E Offline
              Eugen Podsypalnikov
              wrote on last edited by
              #8

              Is it presented on the test machine ? :) : Minimum DLL Version comctl32.dll version 6.00 or later Minimum operating systems Windows XP

              virtual void BeHappy() = 0;

              J 1 Reply Last reply
              0
              • E Eugen Podsypalnikov

                Is it presented on the test machine ? :) : Minimum DLL Version comctl32.dll version 6.00 or later Minimum operating systems Windows XP

                virtual void BeHappy() = 0;

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

                This file (COMCTL32.DLL) is exist in system32 folder. File Version is: 5.82.2900.2180 OS -Windows XP But on the same machine MFC marquee progress bar is working. Now Please suggest????

                E 1 Reply Last reply
                0
                • J JM2251

                  This file (COMCTL32.DLL) is exist in system32 folder. File Version is: 5.82.2900.2180 OS -Windows XP But on the same machine MFC marquee progress bar is working. Now Please suggest????

                  E Offline
                  E Offline
                  Eugen Podsypalnikov
                  wrote on last edited by
                  #10

                  Try to save this file as c:\common.manifest and set it (c:\common.manifest) at ProjectSettings->ManifestTool->InputAndOutput->AdditionalManifestFiles :) :

                  <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
                  <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
                  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
                  <security>
                  <requestedPrivileges>
                  <requestedExecutionLevel
                  level="asInvoker"
                  uiAccess="false"
                  />
                  </requestedPrivileges>
                  </security>
                  </trustInfo>
                  <dependency>
                  <dependentAssembly>
                  <assemblyIdentity
                  type="win32"
                  name="Microsoft.Windows.Common-Controls"
                  version="6.0.0.0"
                  processorArchitecture="X86"
                  publicKeyToken="6595b64144ccf1df"
                  language="*"
                  />
                  </dependentAssembly>
                  </dependency>
                  </assembly>

                  ...or make the same settings as at your MFC project :)

                  virtual void BeHappy() = 0;

                  J E 2 Replies Last reply
                  0
                  • E Eugen Podsypalnikov

                    Try to save this file as c:\common.manifest and set it (c:\common.manifest) at ProjectSettings->ManifestTool->InputAndOutput->AdditionalManifestFiles :) :

                    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
                    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
                    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
                    <security>
                    <requestedPrivileges>
                    <requestedExecutionLevel
                    level="asInvoker"
                    uiAccess="false"
                    />
                    </requestedPrivileges>
                    </security>
                    </trustInfo>
                    <dependency>
                    <dependentAssembly>
                    <assemblyIdentity
                    type="win32"
                    name="Microsoft.Windows.Common-Controls"
                    version="6.0.0.0"
                    processorArchitecture="X86"
                    publicKeyToken="6595b64144ccf1df"
                    language="*"
                    />
                    </dependentAssembly>
                    </dependency>
                    </assembly>

                    ...or make the same settings as at your MFC project :)

                    virtual void BeHappy() = 0;

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

                    Thanks a lot..its working

                    1 Reply Last reply
                    0
                    • E Eugen Podsypalnikov

                      Try to save this file as c:\common.manifest and set it (c:\common.manifest) at ProjectSettings->ManifestTool->InputAndOutput->AdditionalManifestFiles :) :

                      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
                      <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
                      <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
                      <security>
                      <requestedPrivileges>
                      <requestedExecutionLevel
                      level="asInvoker"
                      uiAccess="false"
                      />
                      </requestedPrivileges>
                      </security>
                      </trustInfo>
                      <dependency>
                      <dependentAssembly>
                      <assemblyIdentity
                      type="win32"
                      name="Microsoft.Windows.Common-Controls"
                      version="6.0.0.0"
                      processorArchitecture="X86"
                      publicKeyToken="6595b64144ccf1df"
                      language="*"
                      />
                      </dependentAssembly>
                      </dependency>
                      </assembly>

                      ...or make the same settings as at your MFC project :)

                      virtual void BeHappy() = 0;

                      E Offline
                      E Offline
                      Eric Olstad
                      wrote on last edited by
                      #12

                      This was incredibly helpful. It also seems to be the only place I can find where this is actually documented. Thank you.

                      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