假设控件句柄为 $0,要修改的字串索引为 2
MSDN:
SendMessage(
(HWND) hWnd, // handle to destination window
LB_DELETESTRING, // message to send
(WPARAM) wParam, // string index
(LPARAM) lParam // not used; must be zero
);
NSIS:
SendMessage $0 ${LB_DELETESTRING} 2 ""
MSDN:
SendMessage(
(HWND) hWnd, // handle to destination window
LB_INSERTSTRING, // message to send
(WPARAM) wParam, // item index
(LPARAM) lParam // string (LPCTSTR)
);
NSIS:
SendMessage $0 ${LB_INSERTSTRING} 2 "STR:新字串"