Old 7th April 2016, 17:20   #1
16-Bit Moderator
Koopa's Avatar
Join Date: Apr 2004
Posts: 4,341
nsDialogs::SelectFileDialog Issue with pre-selected file


I have added a open file window to my Backup Tool, which is working fine,
When I preselect a file which should be added windows always shows it like this:

I manually must move the cursor to the left to make it look normal:

I haven't found any info related to that issue neither in the NSIS docu nor in MSDN.
Using NSIS v3.0RC1 and Unicode scripts.

Any idea?

Function OnRMBackup_BrowseButtonClick

Var /GLOBAL Restore_Mode_Backup_Browser_Value

nsDialogs::SelectFileDialog /NOUNLOAD open "$Selected_Backup_File" "$(BACKUP_FOLDER_ZIP_FILE_PICKER)|*.zip;*.7z"

Pop $Restore_Mode_Backup_Browser_Value

${If} $Restore_Mode_Backup_Browser_Value != "error"
SendMessage $Restore_Mode_Backup_Text ${WM_SETTEXT} 0 "STR:$Restore_Mode_Backup_Browser_Value"
StrCpy $Restore_Mode_Backup_Text "$Restore_Mode_Backup_Browser_Value" ; Update path variable
Pop $Restore_Mode_Backup_Text
SendMessage $Restore_Mode_Backup_Text ${WM_SETTEXT} 0 "STR:"
StrCpy $Restore_Mode_Backup_Text "" ; if error store it in default path
Pop $Restore_Mode_Backup_Text


Koopa is offline   Reply With Quote
Old 7th April 2016, 19:39   #2
Anders's Avatar
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,172
I can confirm that this bug happens on Windows 8 as well but it must be a bug in Windows when the filename is long. NSIS just calls GetOpenFileName with OPENFILENAME.lpstrFile set to the path you specify...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

nsdialogs, winbug

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump