added getWindow
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3564 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
aeaefd9776
commit
4e6cf01f9c
4 changed files with 26 additions and 1 deletions
|
@ -109,6 +109,12 @@ void __declspec(dllexport) show(HWND hwndParent, int string_size, char *variable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void __declspec(dllexport) getWindow(HWND hwndParent, int string_size, char *variables, stack_t **stacktop)
|
||||||
|
{
|
||||||
|
wsprintf(buf, "%u", hwBanner);
|
||||||
|
pushstring(buf);
|
||||||
|
}
|
||||||
|
|
||||||
void __declspec(dllexport) destroy(HWND hwndParent, int string_size, char *variables, stack_t **stacktop)
|
void __declspec(dllexport) destroy(HWND hwndParent, int string_size, char *variables, stack_t **stacktop)
|
||||||
{
|
{
|
||||||
if (!hwBanner)
|
if (!hwBanner)
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
# Look at Readme.txt for usage alongside with the Modern UI
|
# Look at Readme.txt for usage alongside with the Modern UI
|
||||||
|
|
||||||
|
!include "WinMessages.nsh"
|
||||||
|
|
||||||
Name "Banner.dll test"
|
Name "Banner.dll test"
|
||||||
|
|
||||||
OutFile "Banner Test.exe"
|
OutFile "Banner Test.exe"
|
||||||
|
@ -8,10 +10,25 @@ ShowInstDetails show
|
||||||
|
|
||||||
Function .onInit
|
Function .onInit
|
||||||
Banner::show /NOUNLOAD "Calculating important stuff..."
|
Banner::show /NOUNLOAD "Calculating important stuff..."
|
||||||
|
|
||||||
|
Banner::getWindow /NOUNLOAD
|
||||||
|
Pop $1
|
||||||
|
|
||||||
again:
|
again:
|
||||||
IntOp $0 $0 + 1
|
IntOp $0 $0 + 1
|
||||||
Sleep 1
|
Sleep 1
|
||||||
StrCmp $0 2000 0 again
|
StrCmp $0 1000 0 again
|
||||||
|
|
||||||
|
GetDlgItem $2 $1 1030
|
||||||
|
SendMessage $2 ${WM_SETTEXT} 0 "STR:Calculating more important stuff..."
|
||||||
|
|
||||||
|
StrCpy $0 0
|
||||||
|
|
||||||
|
again2:
|
||||||
|
IntOp $0 $0 + 1
|
||||||
|
Sleep 1
|
||||||
|
StrCmp $0 1000 0 again2
|
||||||
|
|
||||||
Banner::destroy
|
Banner::destroy
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,8 @@ Usage
|
||||||
|
|
||||||
Banner::show /NOUNLOAD "Text to show"
|
Banner::show /NOUNLOAD "Text to show"
|
||||||
|
|
||||||
|
[optional] Banner::getWindow /NOUNLOAD
|
||||||
|
|
||||||
Banner::destroy
|
Banner::destroy
|
||||||
|
|
||||||
See Example.nsi for an example.
|
See Example.nsi for an example.
|
||||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue