hypheni9
26th November 2010 07:27 UTC
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.
jiake
26th November 2010 08:19 UTC
#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.
hypheni9
26th November 2010 10:18 UTC
Whats the need of both Ascii or Unicode chars setting here ? Can I handle only Unicode and remove ascii part from the source code?
Afrow UK
26th November 2010 11:18 UTC
If you want to but that plugin has been written to handle both without the need for two plugin DLL's.
Stu