Marquee Progress Control
-
Hi, I am tring place a progress bar on dialog and make it Marquee Progress Control in win32. I tried with some code in InitDialog (): HWND hwndProgress=GetDlgItem(m_hwnd,IDC_PROGRESS1); ::SetWindowLongPtr(hwndProgress,GWL_STYLE,PBS_MARQUEE); ::SendMessage(hwndProgress,(UINT) PBM_SETMARQUEE,(WPARAM) TRUE,(LPARAM)50); But Progress bar is not visible. If I comment SetWindowLongPtr(), progess bar visible but not marquee. Plz guide.
-
Hi, I am tring place a progress bar on dialog and make it Marquee Progress Control in win32. I tried with some code in InitDialog (): HWND hwndProgress=GetDlgItem(m_hwnd,IDC_PROGRESS1); ::SetWindowLongPtr(hwndProgress,GWL_STYLE,PBS_MARQUEE); ::SendMessage(hwndProgress,(UINT) PBM_SETMARQUEE,(WPARAM) TRUE,(LPARAM)50); But Progress bar is not visible. If I comment SetWindowLongPtr(), progess bar visible but not marquee. Plz guide.
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;
-
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;
-
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?
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;
-
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;
-
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
Try to set it at the beginning of the
.rc
file, just for a test :) :#define PBS_MARQUEE 8
virtual void BeHappy() = 0;
-
Try to set it at the beginning of the
.rc
file, just for a test :) :#define PBS_MARQUEE 8
virtual void BeHappy() = 0;
-
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;
-
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;
-
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????
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;
-
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;
-
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;
This was incredibly helpful. It also seems to be the only place I can find where this is actually documented. Thank you.