windowText.nsh 834 B

12345678910111213141516171819202122232425262728293031323334353637
  1. !ifndef NULLSOFT_NX_WINDOW_TEXT_NSIS_HEADER
  2. !define NULLSOFT_NX_WINDOW_TEXT_NSIS_HEADER
  3. !include "system.nsh"
  4. !macro NX_SetWindowText __hwnd __text
  5. System::Call "${fnSetWindowText}(${__hwnd}, '${__text}')"
  6. !macroend
  7. !define NX_SetWindowText "!insertmacro 'NX_SetWindowText'"
  8. !macro NX_GetWindowText __hwnd __textOut
  9. System::Call "${fnGetWindowText}(${__hwnd}, ${__textOut}, ${NSIS_MAX_STRLEN})"
  10. !macroend
  11. !define NX_GetWindowText "!insertmacro 'NX_GetWindowText'"
  12. !macro NX_AppendWindowText __hwnd __text
  13. Push ${__hwnd}
  14. Push ${__text}
  15. Exch $R0 ; text
  16. Exch
  17. Exch $R1 ; hwnd
  18. Push $0
  19. StrCpy $0 ""
  20. ${NX_GetWindowText} $R1 $0
  21. StrCpy $0 "$0$R0"
  22. ${NX_SetWindowText} $R1 $0
  23. Pop $0
  24. Pop $R1
  25. Pop $R0
  26. !macroend
  27. !define NX_AppendWindowText "!insertmacro 'NX_AppendWindowText'"
  28. !endif ;NULLSOFT_NX_WINDOW_TEXT_NSIS_HEADER