Talk:NsDialogs FAQ: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
(Created page with '== How to delete items in a ComboBox == By extending the [http://nsis.sourceforge.net/Docs/nsDialogs/Readme.html nsDialogs] header with the following code is it possible to delet...')
(No difference)

Revision as of 15:16, 6 April 2009

How to delete items in a ComboBox

By extending the nsDialogs header with the following code is it possible to delete a string value from a ComboBox. The code is not safe yet. If a string is not found it will delete the first entry in the ComboBox.

!macro __NSD_CB_DelString CONTROL STRING
 
    SendMessage ${CONTROL} ${CB_FINDSTRING} -1 `STR:${STRING}` $R0
    SendMessage ${CONTROL} ${CB_DELETESTRING} $R0 0
 
!macroend
 
!define NSD_CB_DelString `!insertmacro __NSD_CB_DelString`

89.146.13.36 15:16, 6 April 2009 (UTC)