Old 26th March 2007, 08:57   #1
paragrane
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?
paragrane is offline   Reply With Quote
Old 27th March 2007, 14:13   #2
paragrane
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
paragrane is offline   Reply With Quote
Old 27th March 2007, 14:22   #3
Comm@nder21
Major Dude
 
Join Date: Jul 2003
Location: germany, b-w
Posts: 734
Send a message via ICQ to Comm@nder21
be sure to define those ABOVE the !insertmacro MUI_PAGE_INSTFILES command.
Comm@nder21 is offline   Reply With Quote
Old 28th March 2007, 05:38   #4
paragrane
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?
paragrane is offline   Reply With Quote
Old 3rd April 2007, 23:29   #5
SteveRussell
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
SteveRussell is offline   Reply With Quote
Old 8th April 2007, 16:42   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
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
kichik is offline   Reply With Quote
Old 8th April 2007, 16:53   #7
SteveRussell
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!
SteveRussell is offline   Reply With Quote
Old 7th September 2011, 23:06   #8
mvisual
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"
mvisual is offline   Reply With Quote
Old 8th September 2011, 05:59   #9
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 548
Send a message via ICQ to T.Slappy
@mvisual: try to set XPStyle off
XP themes force their own color on the progress bar.

Did you tried this? ::
PHP Code:
!define MUI_INSTALLCOLORS "FF0000 00FF00"
!define MUI_INSTFILESPAGE_PROGRESSBAR "colored" 

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
T.Slappy is offline   Reply With Quote
Old 9th February 2012, 13:48   #10
C_10
Junior Member
 
Join Date: Feb 2012
Posts: 15
Hi, I have the same problem.

I tried:
code:
!include "LogicLib.nsh"
!include "MUI2.nsh"
!include "nsDialogs.nsh"
!include "Sections.nsh"
!include "WinMessages.nsh"

!define MUI_INSTALLCOLORS "000000 3F48CC"
!define MUI_INSTFILESPAGE_PROGRESSBAR colored

XPStyle off
Name "Progressbar"
OutFile "Progressbar.exe"
ShowInstDetails show

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES

Section Test
Sleep 100
SectionEnd



...but the progressbar is still green (Windows7) and green + XPStyle (WindowsXP)

How can I change the color? What is my mistake?
Please help
C_10 is offline   Reply With Quote
Old 9th February 2012, 14:24   #11
gfm688
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
gfm688 is offline   Reply With Quote
Old 9th February 2012, 15:23   #12
C_10
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:
System::Call UxTheme::SetWindowTheme(i,w,w)i(r0,"","")
What does (i,w,w)i(r0,"","") mean?
Is this line treated like a constant or can I change it?
C_10 is offline   Reply With Quote
Old 9th February 2012, 15:33   #13
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,319
Quote:
Originally Posted by C_10 View Post
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?

What does (i,w,w)i(r0,"","") mean?
Is this line treated like a constant or can I change it?
http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx meaning, you can change the two empty strings (You don't want to, but you could )

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 9th February 2012, 15:57   #14
C_10
Junior Member
 
Join Date: Feb 2012
Posts: 15
OK
Thanks Anders
C_10 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump