Added NSD Prepend/Append CB/LB helper macros
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6905 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
b929405bf8
commit
ed6a6e4d06
2 changed files with 42 additions and 4 deletions
|
@ -81,8 +81,10 @@ code
|
|||
</li>
|
||||
<li>ComboBox & DropList:
|
||||
<a href="#mref-cbaddstring">NSD_CB_AddString</a>,
|
||||
<a href="#mref-cbinsstring">NSD_CB_InsertString</a>,
|
||||
<a href="#mref-cbselectstring">NSD_CB_SelectString</a>,
|
||||
<a href="#mref-cbgetcount">NSD_CB_GetCount</a>
|
||||
<a href="#mref-cbgetcount">NSD_CB_GetCount</a>,
|
||||
NSD_CB_PrependString, NSD_CB_AppendString
|
||||
</li>
|
||||
<li>ListBox:
|
||||
<a href="#mref-lbaddstring">NSD_LB_AddString</a>,
|
||||
|
@ -92,7 +94,8 @@ code
|
|||
<a href="#mref-lbclear">NSD_LB_Clear</a>,
|
||||
<a href="#mref-lbgetcount">NSD_LB_GetCount</a>,
|
||||
<a href="#mref-lbselectstring">NSD_LB_SelectString</a>,
|
||||
<a href="#mref-lbgetselection">NSD_LB_GetSelection</a>
|
||||
<a href="#mref-lbgetselection">NSD_LB_GetSelection</a>,
|
||||
NSD_LB_PrependString, NSD_LB_AppendString
|
||||
</li>
|
||||
<li>Animation:
|
||||
<a href="#mref-animopenfile">NSD_Anim_OpenFile</a>,
|
||||
|
@ -801,6 +804,12 @@ SectionEnd</pre></blockquote>
|
|||
|
||||
<p>Adds a string to a combo box.</p>
|
||||
|
||||
<h3><a name="mref-cbinsstring"></a>NSD_CB_InsertString</h3>
|
||||
|
||||
<p><code>${NSD_CB_InsertString} <i>combo_HWND</i> <i>index</i> <i>string</i></code></p>
|
||||
|
||||
<p>Insert a string in a specified position in a combo box.</p>
|
||||
|
||||
<h3><a name="mref-cbselectstring"></a>NSD_CB_SelectString</h3>
|
||||
|
||||
<p><code>${NSD_CB_SelectString} <i>combo_HWND</i> <i>string</i></code></p>
|
||||
|
|
|
@ -286,8 +286,8 @@ Header file for creating custom installer pages with nsDialogs
|
|||
!define __NSD_ListBox_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE}
|
||||
|
||||
!define __NSD_SortedListBox_CLASS LISTBOX
|
||||
!define __NSD_SortedListBox_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${WS_VSCROLL}|${LBS_DISABLENOSCROLL}|${LBS_HASSTRINGS}|${LBS_NOINTEGRALHEIGHT}|${LBS_NOTIFY}|${LBS_SORT}
|
||||
!define __NSD_SortedListBox_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE}
|
||||
!define __NSD_SortedListBox_STYLE ${__NSD_ListBox_STYLE}|${LBS_SORT}
|
||||
!define __NSD_SortedListBox_EXSTYLE ${__NSD_ListBox_EXSTYLE}
|
||||
|
||||
!define __NSD_ProgressBar_CLASS msctls_progress32
|
||||
!define __NSD_ProgressBar_STYLE ${DEFAULT_STYLES}
|
||||
|
@ -502,6 +502,22 @@ System::Call 'COMCTL32::InitCommonControlsEx(*ls)' ; INITCOMMONCONTROLSEX as UIN
|
|||
!macroend
|
||||
|
||||
|
||||
!define NSD_CB_InsertString "!insertmacro _NSD_CB_InsertString "
|
||||
!macro _NSD_CB_InsertString CONTROL INDEX STRING
|
||||
SendMessage ${CONTROL} ${CB_INSERTSTRING} ${INDEX} `STR:${STRING}`
|
||||
!macroend
|
||||
|
||||
!define NSD_CB_PrependString "!insertmacro _NSD_CB_PrependString "
|
||||
!macro _NSD_CB_PrependString CONTROL STRING
|
||||
SendMessage ${CONTROL} ${CB_INSERTSTRING} 0 `STR:${STRING}`
|
||||
!macroend
|
||||
|
||||
!define NSD_CB_AppendString "!insertmacro _NSD_CB_AppendString "
|
||||
!macro _NSD_CB_AppendString CONTROL STRING
|
||||
SendMessage ${CONTROL} ${CB_INSERTSTRING} -1 `STR:${STRING}`
|
||||
!macroend
|
||||
|
||||
|
||||
!define NSD_CB_SelectString "!insertmacro _NSD_CB_SelectString "
|
||||
!macro _NSD_CB_SelectString CONTROL STRING
|
||||
SendMessage ${CONTROL} ${CB_SELECTSTRING} -1 `STR:${STRING}`
|
||||
|
@ -543,6 +559,9 @@ SendMessage ${CONTROL} ${CB_GETITEMDATA} ${INDEX} 0 ${VAR}
|
|||
SendMessage ${CONTROL} ${CB_SETITEMDATA} ${INDEX} ${DATA}
|
||||
!macroend
|
||||
|
||||
!define NSD_CB_DelItem `${__NSD_MkCtlCmd_WP} CB_DELETESTRING 0 `
|
||||
!define NSD_CB_LimitText `${__NSD_MkCtlCmd_WP} CB_LIMITTEXT 0 `
|
||||
|
||||
|
||||
### ListBox ###
|
||||
|
||||
|
@ -557,6 +576,16 @@ SendMessage ${CONTROL} ${CB_SETITEMDATA} ${INDEX} ${DATA}
|
|||
SendMessage ${CONTROL} ${LB_INSERTSTRING} ${INDEX} `STR:${STRING}`
|
||||
!macroend
|
||||
|
||||
!define NSD_LB_PrependString "!insertmacro _NSD_LB_PrependString "
|
||||
!macro _NSD_LB_PrependString CONTROL STRING
|
||||
SendMessage ${CONTROL} ${LB_INSERTSTRING} 0 `STR:${STRING}`
|
||||
!macroend
|
||||
|
||||
!define NSD_LB_AppendString "!insertmacro _NSD_LB_AppendString "
|
||||
!macro _NSD_LB_AppendString CONTROL STRING
|
||||
SendMessage ${CONTROL} ${LB_INSERTSTRING} -1 `STR:${STRING}`
|
||||
!macroend
|
||||
|
||||
|
||||
!define NSD_LB_DelString `!insertmacro __NSD_LB_DelString `
|
||||
!macro __NSD_LB_DelString CONTROL STRING
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue