![]() |
#1 |
Junior Member
Join Date: Mar 2007
Location: PUNE
Posts: 17
|
Progress Bar color or style
Hello !!!!!
I am using UMUI interface. I want to change the color or style of Pogress bar on MUI_PAGE_INSTFILES page. How to do this? I have tried this----- !define MUI_INSTALLCOLORS "FF0000 00FF00" !define MUI_INSTFILESPAGE_PROGRESSBAR "colored" But it's not working. The error I am getting is------- "MUI_INSTFILESPAGE_PROGRESSBAR already define" but I cheked that It is defined only one time. I am not getting why the error is comming? |
![]() |
![]() |
![]() |
#2 |
Junior Member
Join Date: Mar 2007
Location: PUNE
Posts: 17
|
Progress Bar Style
Hello !!!!!
I am using UMUI interface. I want to change the color or style of Pogress bar on MUI_PAGE_INSTFILES page. How to do this? I have tried this----- !define MUI_INSTALLCOLORS "FF0000 00FF00" !define MUI_INSTFILESPAGE_PROGRESSBAR "colored" But it's not working. The error I am getting is------- "MUI_INSTFILESPAGE_PROGRESSBAR already defined" but I cheked that It is defined only one time. I am not getting why the error is comming? Please Help me how to do this |
![]() |
![]() |
![]() |
#3 |
Major Dude
|
be sure to define those ABOVE the !insertmacro MUI_PAGE_INSTFILES command.
hand by comm@nder21 ---------- WiKi pages:CreateInternetShortcut|Enhanced FindWindow|Parse CSV-Data|Open/Close CD-Drive|Installer without Icon|Vista application compatibility |
![]() |
![]() |
![]() |
#4 |
Junior Member
Join Date: Mar 2007
Location: PUNE
Posts: 17
|
Hi Comm@nder21
I tried what you said. !define MUI_INSTFILESPAGE_PROGRESSBAR "colored" But the above statement give me same error as follows "MUI_INSTFILESPAGE_PROGRESSBAR already defined" but I cheked that It is defined only one time. I am not getting why the error is comming? After that I commented that Statement and I run the program with only one statement as follows----- !define MUI_INSTALLCOLORS "FF0000 00FF00" It does not give any error but it does not change the color of Progress Bar. So can you give me some code or logic to do that? |
![]() |
![]() |
![]() |
#5 |
Senior Member
Join Date: Mar 2006
Location: United States
Posts: 109
|
I am having the same problem. What is the answer? Is something wrong with the following?
!define MUI_INSTFILESPAGE_PROGRESSBAR !insertmacro MUI_PAGE_INSTFILES |
![]() |
![]() |
![]() |
#6 |
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Define it above the first page insertion.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
![]() |
![]() |
![]() |
#7 |
Senior Member
Join Date: Mar 2006
Location: United States
Posts: 109
|
I should have posted that I did finally figure it out, though it was not clear to me why this is required. Thanks for the confirmation, kichik!
|
![]() |
![]() |
![]() |
#8 |
Junior Member
Join Date: Sep 2011
Posts: 1
|
I was having problems with this exact issue. Is there any way you can post what you have troubleshooted?
FYI: This is what I'm currently working on troublshooting: !include "WinMessages.nsh" !include "MUI2.nsh" !include "nsDialogs.nsh" OutFile "test.exe" Section SectionEnd Var dialog Var hwnd Var null !define /math PBM_SETRANGE32 ${WM_USER} + 6 !define MUI_INSTFILESPAGE_PROGRESSBAR "color" !define RED "0xD0A8A8" /*!insertmacro MUI_PAGE_INSTFILES*/ Page Custom page.custom Function page.custom nsDialogs::Create 1018 Pop $dialog ${NSD_CreateProgressBar} 0 0 100% 15 "0xD0A8A8" Pop $hwnd ${NSD_CreateTimer} NSD_Timer.Callback 10 nsDialogs::Show FunctionEnd /*Function ProgressBar.Color !define RED "0xD0A8A8" !define PINK "0x831618" FunctionEnd*/ Function NSD_Timer.Callback ${NSD_KillTimer} NSD_Timer.Callback SendMessage $hwnd ${PBM_SETRANGE32} 0 100 SendMessage $hwnd ${PBM_SETPOS} 1 0 Sleep 2000 SendMessage $hwnd ${PBM_SETPOS} 100 0 FunctionEnd !insertmacro MUI_LANGUAGE "English" |
![]() |
![]() |
![]() |
#9 |
Major Dude
|
@mvisual: try to set XPStyle off
XP themes force their own color on the progress bar. Did you tried this? :: PHP Code:
Cool looking installers with custom design: www.graphical-installer.com Create Setup Pages easily: www.install-designer.com Build installers in Visual Studio 2005-2019: www.visual-installer.com or RAD Studio 2009, 2010, XE-10.4 Sydney: www.rad-installer.com |
![]() |
![]() |
![]() |
#10 |
Junior Member
Join Date: Feb 2012
Posts: 15
|
Hi, I have the same problem.
I tried: code: ...but the progressbar is still green (Windows7) and green + XPStyle (WindowsXP) How can I change the color? What is my mistake? Please help |
![]() |
![]() |
![]() |
#11 |
Junior Member
Join Date: Jul 2010
Posts: 12
|
!define MUI_PAGE_CUSTOMFUNCTION_SHOW InstShow
!insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_LANGUAGE "English" !define PBM_SETBARCOLOR 0x0409 !define PBM_SETBKCOLOR 0x2001 Function InstShow FindWindow $0 "#32770" "" $HWNDPARENT GetDlgItem $0 $0 1004 System::Call UxTheme::SetWindowTheme(i,w,w)i(r0,"","") SendMessage $0 ${PBM_SETBARCOLOR} 0 0x000000 SendMessage $0 ${PBM_SETBKCOLOR} 0 0x3F48CC FunctionEnd |
![]() |
![]() |
![]() |
#12 | |
Junior Member
Join Date: Feb 2012
Posts: 15
|
Thanks gfm688 for your answer!!!
![]() I don't understand, why my code is wrong...but your code works excellent ![]() Can you please explain the line to me? Quote:
Is this line treated like a constant or can I change it? |
|
![]() |
![]() |
![]() |
#13 | |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
Quote:
![]() IntOp $PostCount $PostCount + 1 |
|
![]() |
![]() |
![]() |
#14 |
Junior Member
Join Date: Feb 2012
Posts: 15
|
OK
![]() Thanks Anders |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|