Skip to content
⌘ NSIS Forum Archive

Existence a space character in the installer's title default page

2 posts

r2du-soft#

Existence a space character in the installer's title default page

I encountered a problem that was a bit strange to me!

Custome Pages haven't Space Character in the last Character [Caption (Title Bar)]


But MUI_PAGES have Space Character in the last Character [Caption (Title Bar)]



;------------------
XPStyle on
;------------------
!include "MUI.nsh"
;------------------
Caption "Test Title Bar"
;------------------
!insertmacro MUI_PAGE_LICENSE "C:\1.txt"
Page Custom Show_Custom_Page
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE English
;------------------

Function Show_Custom_Page
nsDialogs::Create 1018
Pop $0
;-----
;Work
FindWindow $0 "" "Test Title Bar" #Have not Space
MessageBox MB_OK "Now You Are in Custome_PAGES$\r$\nTitle Bar Without Space Return number: $0 And Find Application With This Title Bar"
;-
;Don't Work
FindWindow $1 "" "Test Title Bar " #Have Space
MessageBox MB_OK "Now You Are in Custome_PAGES$\r$\nTitle Bar With Space Return number: $1 And Don't Find Application With This Title Bar"
;-----
nsDialogs::Show
FunctionEnd


Section


;-----
;Work
FindWindow $3 "" "Test Title Bar " #Have Space
MessageBox MB_OK "Now You Are in MUI_PAGES$\r$\nTitle Bar With Space Return number: $3 And Don't Find Application With This Title Bar"

;-
;Don't Work
FindWindow $4 "" "Test Title Bar" #Have not Space
MessageBox MB_OK "Now You Are in MUI_PAGES$\r$\nTitle Bar Without Space Return number: $4 And Find Application With This Title Bar"
;-----


SectionEnd