Old 26th November 2010, 07:27   #1
hypheni9
Junior Member
 
Join Date: Feb 2010
Posts: 38
Install progress percentage

I am back to NSIS forum after a long break. Anyways hope all you are fine.

I generally use TitleProgress plugin to show progress percentage in the install page title page. Is there any other option to show the percentage in the client window ie: below the progress bar.?

Im trying to modifying the source of titleprog dll to make it appear in the client window. Still now I cant make it working, can anyone help me on that code?.

Check attachment for the src file, change .txt to .cpp.
Attached Files
File Type: txt titprog.txt (2.8 KB, 147 views)
hypheni9 is offline   Reply With Quote
Old 26th November 2010, 08:19   #2
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
#define FixTitleAorW(ch_t,ch_sf,percent) do{\
cch=SendMessage##ch_sf(hwndNSIS,WM_GETTEXT,++cch,(LPARAM)buf);\
ch_t* p=&(((ch_t*)buf)[cch-1]);\
if (*p==MakeCh##ch_sf('%')) \
{\
while(*p!=MakeCh##ch_sf(' '))--p;\
}\
else\
++p;\
wsprintf##ch_sf(p,MakeCh##ch_sf(" %u%%"),percent);\
SendMessage##ch_sf(hwndNSIS,WM_SETTEXT,0,(LPARAM)buf);\
}while(0)

These lines gets and sets the percentage to title. You can add a parameter to this plugin so that you can specify a control identify to set text, or modify it directly in the soure.
jiake is offline   Reply With Quote
Old 26th November 2010, 10:18   #3
hypheni9
Junior Member
 
Join Date: Feb 2010
Posts: 38
Whats the need of both Ascii or Unicode chars setting here ? Can I handle only Unicode and remove ascii part from the source code?
hypheni9 is offline   Reply With Quote
Old 26th November 2010, 11:18   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
If you want to but that plugin has been written to handle both without the need for two plugin DLL's.

Stu
Afrow UK 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