diff --git a/Contrib/Banner/Banner.c b/Contrib/Banner/Banner.c index 11f21a6d..7278d044 100644 --- a/Contrib/Banner/Banner.c +++ b/Contrib/Banner/Banner.c @@ -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) { if (!hwBanner) diff --git a/Contrib/Banner/Example.nsi b/Contrib/Banner/Example.nsi index f360eb65..0e5117cc 100644 --- a/Contrib/Banner/Example.nsi +++ b/Contrib/Banner/Example.nsi @@ -1,5 +1,7 @@ # Look at Readme.txt for usage alongside with the Modern UI +!include "WinMessages.nsh" + Name "Banner.dll test" OutFile "Banner Test.exe" @@ -8,10 +10,25 @@ ShowInstDetails show Function .onInit Banner::show /NOUNLOAD "Calculating important stuff..." + + Banner::getWindow /NOUNLOAD + Pop $1 + again: IntOp $0 $0 + 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 FunctionEnd diff --git a/Contrib/Banner/Readme.txt b/Contrib/Banner/Readme.txt index 74393a47..35dd28e8 100644 --- a/Contrib/Banner/Readme.txt +++ b/Contrib/Banner/Readme.txt @@ -10,6 +10,8 @@ Usage Banner::show /NOUNLOAD "Text to show" +[optional] Banner::getWindow /NOUNLOAD + Banner::destroy See Example.nsi for an example. diff --git a/Plugins/Banner.dll b/Plugins/Banner.dll index 34fce603..28c2257a 100644 Binary files a/Plugins/Banner.dll and b/Plugins/Banner.dll differ