Added RichEdit NSD control
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6910 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
0322da94b2
commit
9e9ab4029c
4 changed files with 48 additions and 8 deletions
|
@ -232,6 +232,7 @@ Password,
|
|||
Number,
|
||||
FileRequest,
|
||||
DirRequest,
|
||||
RichEdit,
|
||||
ComboBox,
|
||||
DropList,
|
||||
ListBox,
|
||||
|
@ -533,6 +534,7 @@ SectionEnd</pre></blockquote>
|
|||
<li>${NSD_CreateNumber}</li>
|
||||
<li>${NSD_CreateFileRequest}</li>
|
||||
<li>${NSD_CreateDirRequest}</li>
|
||||
<li>${NSD_CreateRichEdit}</li>
|
||||
<li>${NSD_CreateComboBox}</li>
|
||||
<li>${NSD_CreateDropList}</li>
|
||||
<li>${NSD_CreateListBox}</li>
|
||||
|
@ -663,8 +665,8 @@ SectionEnd</pre></blockquote>
|
|||
<p><code>${NSD_LB_DelItem} <i>listbox_HWND</i> <i>itemindex</i></code></p>
|
||||
<p>Deletes a string from a list box.</p>
|
||||
|
||||
<h3><a name="mref-lbcleqar">NSD_LB_Clear</a></h3>
|
||||
<p><code>${NSD_LB_Clear} <i>listbox_HWND</i></code></p>
|
||||
<h3><a name="mref-lbclear">NSD_LB_Clear</a></h3>
|
||||
<p><code>${NSD_LB_Clear} <i>listbox_HWND</i> <i>$output</i></code></p>
|
||||
<p>Deletes all strings from a list box.</p>
|
||||
|
||||
<h3><a name="mref-lbgetcount">NSD_LB_GetCount</a></h3>
|
||||
|
|
|
@ -101,9 +101,10 @@ Function LBPage
|
|||
${NSD_CreateText} 1u 75u -2u 12u "New item #$9"
|
||||
Pop $EDIT
|
||||
!insertmacro CreateButton 1u 90u 50u 12u "Add (&Sorted)" $0 LBAction Add
|
||||
!insertmacro CreateButton 55u 90u 50u 12u "&Prepend" $0 LBAction Prepend
|
||||
!insertmacro CreateButton 110u 90u 50u 12u "&Append" $0 LBAction Append
|
||||
!insertmacro CreateButton 165u 90u 50u 12u "&Delete Last" $0 LBAction DL
|
||||
!insertmacro CreateButton 53u 90u 50u 12u "&Prepend" $0 LBAction Prepend
|
||||
!insertmacro CreateButton 105u 90u 50u 12u "&Append" $0 LBAction Append
|
||||
!insertmacro CreateButton 160u 90u 50u 12u "&Delete Last" $0 LBAction DL
|
||||
!insertmacro CreateButton 215u 90u 50u 12u "&Clear" $0 LBAction Clear
|
||||
|
||||
nsDialogs::Show
|
||||
FunctionEnd
|
||||
|
@ -128,6 +129,9 @@ Function LBAction
|
|||
${NSD_LB_DelItem} $1 $8
|
||||
${EndIf}
|
||||
Return
|
||||
${Case} "Clear"
|
||||
${NSD_LB_Clear} $1 ""
|
||||
Return
|
||||
${EndSelect}
|
||||
|
||||
IntOp $9 $9 + 1
|
||||
|
|
|
@ -6,8 +6,8 @@ Header file for creating custom installer pages with nsDialogs
|
|||
*/
|
||||
|
||||
!ifndef NSDIALOGS_INCLUDED
|
||||
!verbose push 2
|
||||
!define NSDIALOGS_INCLUDED
|
||||
!verbose push
|
||||
!verbose 3
|
||||
|
||||
!include LogicLib.nsh
|
||||
|
@ -58,6 +58,7 @@ Header file for creating custom installer pages with nsDialogs
|
|||
!define ES_READONLY 0x00000800
|
||||
!define ES_WANTRETURN 0x00001000
|
||||
!define ES_NUMBER 0x00002000
|
||||
!define ES_SAVESEL 0x00008000
|
||||
|
||||
!define SS_LEFT 0x00000000
|
||||
!define SS_CENTER 0x00000001
|
||||
|
@ -283,6 +284,18 @@ Header file for creating custom installer pages with nsDialogs
|
|||
!define __NSD_DirRequest_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${ES_AUTOHSCROLL}
|
||||
!define __NSD_DirRequest_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE}
|
||||
|
||||
!define __NSD_RichEdit_CLASS_10 "RICHEDIT" ; 1.0 (Riched32.dll) Win95/NT4
|
||||
!define __NSD_RichEdit_CLASS_20A "RICHEDIT20A" ; 2.0 (Riched20.dll) Win98/NT4 (NSIS makes sure this is registered even on Windows 95)
|
||||
!define __NSD_RichEdit_CLASS_20W "RICHEDIT20W"
|
||||
!define __NSD_RichEdit_CLASS_41W "RICHEDIT50W" ; 4.1 (MsftEdit.DLL) WinXP.SP1
|
||||
!ifdef NSIS_UNICODE
|
||||
!define /ifndef __NSD_RichEdit_CLASS ${__NSD_RichEdit_CLASS_20W}
|
||||
!else
|
||||
!define /ifndef __NSD_RichEdit_CLASS ${__NSD_RichEdit_CLASS_20A}
|
||||
!endif
|
||||
!define __NSD_RichEdit_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${ES_AUTOHSCROLL}|${ES_AUTOVSCROLL}|${ES_MULTILINE}|${ES_WANTRETURN}|${ES_SAVESEL}|${WS_HSCROLL}|${WS_VSCROLL}
|
||||
!define __NSD_RichEdit_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE}
|
||||
|
||||
!define __NSD_ComboBox_CLASS COMBOBOX
|
||||
!define __NSD_ComboBox_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${WS_VSCROLL}|${WS_CLIPCHILDREN}|${CBS_AUTOHSCROLL}|${CBS_HASSTRINGS}|${CBS_DROPDOWN}
|
||||
!define __NSD_ComboBox_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE}
|
||||
|
@ -351,6 +364,7 @@ Header file for creating custom installer pages with nsDialogs
|
|||
!insertmacro __NSD_DefineControl Number
|
||||
!insertmacro __NSD_DefineControl FileRequest
|
||||
!insertmacro __NSD_DefineControl DirRequest
|
||||
!insertmacro __NSD_DefineControl RichEdit
|
||||
!insertmacro __NSD_DefineControl ComboBox
|
||||
!insertmacro __NSD_DefineControl DropList
|
||||
!insertmacro __NSD_DefineControl ListBox
|
||||
|
@ -518,6 +532,12 @@ IntOp ${RET} ${RET} & ${BIT}
|
|||
!define NSD_SetTextLimit `${NSD_Edit_SetTextLimit} ` ; Legacy alias
|
||||
|
||||
|
||||
### RichEdit ###
|
||||
!define NSD_RichEd_SetSystemBackgroundColor `${__NSD_MkCtlCmd} EM_SETBKGNDCOLOR 1 0 ` ; COLOR_WINDOW
|
||||
!define NSD_RichEd_SetCustomBackgroundColor `${__NSD_MkCtlCmd_LP} EM_SETBKGNDCOLOR 0 ` ; LP:COLORREF
|
||||
!define NSD_RichEd_SetHideSelection `${__NSD_MkCtlCmd_WP} EM_HIDESELECTION 0 ` ; WP(BOOL):HideSelWithoutFocus (Toggles ES_NOHIDESEL & TXTBIT_HIDESELECTION)
|
||||
|
||||
|
||||
### CheckBox ###
|
||||
|
||||
!define NSD_GetState `!insertmacro __NSD_GetState `
|
||||
|
|
|
@ -107,6 +107,7 @@ TVM Tree-view control
|
|||
!define /math CCM_GETVERSION ${CCM_FIRST} + 0x8
|
||||
!define /math CCM_SETWINDOWTHEME ${CCM_FIRST} + 0xB ; WinXP
|
||||
!define /math CCM_DPISCALE ${CCM_FIRST} + 0xC
|
||||
!define WM_USER 0x400
|
||||
|
||||
!define CCS_TOP 1
|
||||
!define CCS_BOTTOM 3
|
||||
|
@ -182,7 +183,6 @@ TVM Tree-view control
|
|||
!define EM_CANUNDO 0x00C6
|
||||
!define EM_CHARFROMPOS 0x00D7
|
||||
!define EM_EMPTYUNDOBUFFER 0x00CD
|
||||
!define EM_EXLIMITTEXT 0x0435
|
||||
!define EM_FMTLINES 0x00C8
|
||||
!define EM_GETFIRSTVISIBLELINE 0x00CE
|
||||
!define EM_GETHANDLE 0x00BD
|
||||
|
@ -222,6 +222,21 @@ TVM Tree-view control
|
|||
!define ECM_FIRST 0x1500 ; CC6+
|
||||
!define /math EM_SETCUEBANNER ${ECM_FIRST} + 1
|
||||
|
||||
#RichEdit Messages#
|
||||
!define /math EM_EXGETSEL ${WM_USER} + 52
|
||||
!define /math EM_EXLIMITTEXT ${WM_USER} + 53
|
||||
!define /math EM_EXLINEFROMCHAR ${WM_USER} + 54
|
||||
!define /math EM_GETOLEINTERFACE ${WM_USER} + 60
|
||||
!define /math EM_HIDESELECTION ${WM_USER} + 63
|
||||
!define /math EM_SETBKGNDCOLOR ${WM_USER} + 67
|
||||
!define /math EM_STREAMIN ${WM_USER} + 73
|
||||
!define /math EM_STREAMOUT ${WM_USER} + 74
|
||||
!define /math EM_SETOPTIONS ${WM_USER} + 77
|
||||
!define /math EM_GETOPTIONS ${WM_USER} + 78
|
||||
!define /math EM_SETUNDOLIMIT ${WM_USER} + 82 ; v2+
|
||||
!define /math EM_AUTOURLDETECT ${WM_USER} + 91
|
||||
!define /math EM_SETFONTSIZE ${WM_USER} + 223 ; v3+
|
||||
|
||||
#Listbox Messages#
|
||||
!define LB_ADDFILE 0x0196
|
||||
!define LB_ADDSTRING 0x0180
|
||||
|
@ -481,7 +496,6 @@ TVM Tree-view control
|
|||
!define WM_UNICHAR 0x0109
|
||||
!define WM_UNINITMENUPOPUP 0x0125
|
||||
!define WM_UPDATEUISTATE 0x0128
|
||||
!define WM_USER 0x400
|
||||
!define WM_USERCHANGED 0x0054
|
||||
!define WM_VKEYTOITEM 0x002E
|
||||
!define WM_VSCROLL 0x0115
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue