Search code examples
listboxruntimensislistboxitem

NSIS: How to add Items to a listbox control?


How to add items to a listbox control at run time in NSIS?


Solution

  • Okey I got that:

    GetDlgItem $1 $HWND 1200
    SendMessage $1 ${LB_ADDSTRING} 1 "STR:$R2"
    

    where R2 contains the string I want to add to my list box. Ok now can anyone help me with a code to read a file line-by-line till EOF and display this file line-by-line in the listbox. Also the file that I am reading here contains list of filenames and depending upon user selection of listitem from the listbox I want to delete that particular file.