root / tmp / org.txm.setups / nsis / Include / nsDialogs.nsh @ 3101
Historique | Voir | Annoter | Télécharger (43,11 ko)
1 | 728 | mdecorde | /* |
---|---|---|---|
2 | 728 | mdecorde | |
3 | 728 | mdecorde | nsDialogs.nsh |
4 | 728 | mdecorde | Header file for creating custom installer pages with nsDialogs |
5 | 728 | mdecorde | |
6 | 728 | mdecorde | */ |
7 | 728 | mdecorde | |
8 | 728 | mdecorde | !ifndef NSDIALOGS_INCLUDED |
9 | 2956 | mdecorde | !verbose push 2 |
10 | 728 | mdecorde | !define NSDIALOGS_INCLUDED |
11 | 728 | mdecorde | !verbose 3 |
12 | 728 | mdecorde | |
13 | 728 | mdecorde | !include LogicLib.nsh |
14 | 728 | mdecorde | !include WinMessages.nsh |
15 | 728 | mdecorde | |
16 | 2956 | mdecorde | !define /ifndef WS_EX_DLGMODALFRAME 0x00000001 |
17 | 2956 | mdecorde | !define /ifndef WS_EX_NOPARENTNOTIFY 0x00000004 |
18 | 2956 | mdecorde | !define /ifndef WS_EX_TOPMOST 0x00000008 |
19 | 2956 | mdecorde | !define /ifndef WS_EX_ACCEPTFILES 0x00000010 |
20 | 2956 | mdecorde | !define /ifndef WS_EX_TRANSPARENT 0x00000020 |
21 | 2956 | mdecorde | !define /ifndef WS_EX_MDICHILD 0x00000040 |
22 | 2956 | mdecorde | !define /ifndef WS_EX_TOOLWINDOW 0x00000080 |
23 | 2956 | mdecorde | !define /ifndef WS_EX_WINDOWEDGE 0x00000100 |
24 | 2956 | mdecorde | !define /ifndef WS_EX_CLIENTEDGE 0x00000200 |
25 | 2956 | mdecorde | !define /ifndef WS_EX_CONTEXTHELP 0x00000400 |
26 | 2956 | mdecorde | !define /ifndef WS_EX_RIGHT 0x00001000 |
27 | 2956 | mdecorde | !define /ifndef WS_EX_LEFT 0x00000000 |
28 | 2956 | mdecorde | !define /ifndef WS_EX_RTLREADING 0x00002000 |
29 | 2956 | mdecorde | !define /ifndef WS_EX_LTRREADING 0x00000000 |
30 | 2956 | mdecorde | !define /ifndef WS_EX_LEFTSCROLLBAR 0x00004000 |
31 | 2956 | mdecorde | !define /ifndef WS_EX_RIGHTSCROLLBAR 0x00000000 |
32 | 2956 | mdecorde | !define /ifndef WS_EX_CONTROLPARENT 0x00010000 |
33 | 2956 | mdecorde | !define /ifndef WS_EX_STATICEDGE 0x00020000 |
34 | 2956 | mdecorde | !define /ifndef WS_EX_APPWINDOW 0x00040000 |
35 | 728 | mdecorde | |
36 | 2956 | mdecorde | !define /ifndef WS_CHILD 0x40000000 |
37 | 2956 | mdecorde | !define /ifndef WS_VISIBLE 0x10000000 |
38 | 2956 | mdecorde | !define /ifndef WS_DISABLED 0x08000000 |
39 | 2956 | mdecorde | !define /ifndef WS_CLIPSIBLINGS 0x04000000 |
40 | 2956 | mdecorde | !define /ifndef WS_CLIPCHILDREN 0x02000000 |
41 | 2956 | mdecorde | !define /ifndef WS_MAXIMIZE 0x01000000 |
42 | 2956 | mdecorde | !define /ifndef WS_VSCROLL 0x00200000 |
43 | 2956 | mdecorde | !define /ifndef WS_HSCROLL 0x00100000 |
44 | 2956 | mdecorde | !define /ifndef WS_GROUP 0x00020000 |
45 | 2956 | mdecorde | !define /ifndef WS_TABSTOP 0x00010000 |
46 | 728 | mdecorde | |
47 | 728 | mdecorde | !define ES_LEFT 0x00000000 |
48 | 728 | mdecorde | !define ES_CENTER 0x00000001 |
49 | 728 | mdecorde | !define ES_RIGHT 0x00000002 |
50 | 728 | mdecorde | !define ES_MULTILINE 0x00000004 |
51 | 728 | mdecorde | !define ES_UPPERCASE 0x00000008 |
52 | 728 | mdecorde | !define ES_LOWERCASE 0x00000010 |
53 | 728 | mdecorde | !define ES_PASSWORD 0x00000020 |
54 | 728 | mdecorde | !define ES_AUTOVSCROLL 0x00000040 |
55 | 728 | mdecorde | !define ES_AUTOHSCROLL 0x00000080 |
56 | 728 | mdecorde | !define ES_NOHIDESEL 0x00000100 |
57 | 728 | mdecorde | !define ES_OEMCONVERT 0x00000400 |
58 | 728 | mdecorde | !define ES_READONLY 0x00000800 |
59 | 728 | mdecorde | !define ES_WANTRETURN 0x00001000 |
60 | 728 | mdecorde | !define ES_NUMBER 0x00002000 |
61 | 2956 | mdecorde | !define ES_SAVESEL 0x00008000 |
62 | 728 | mdecorde | |
63 | 728 | mdecorde | !define SS_LEFT 0x00000000 |
64 | 728 | mdecorde | !define SS_CENTER 0x00000001 |
65 | 728 | mdecorde | !define SS_RIGHT 0x00000002 |
66 | 728 | mdecorde | !define SS_ICON 0x00000003 |
67 | 728 | mdecorde | !define SS_BLACKRECT 0x00000004 |
68 | 728 | mdecorde | !define SS_GRAYRECT 0x00000005 |
69 | 728 | mdecorde | !define SS_WHITERECT 0x00000006 |
70 | 728 | mdecorde | !define SS_BLACKFRAME 0x00000007 |
71 | 728 | mdecorde | !define SS_GRAYFRAME 0x00000008 |
72 | 728 | mdecorde | !define SS_WHITEFRAME 0x00000009 |
73 | 728 | mdecorde | !define SS_USERITEM 0x0000000A |
74 | 728 | mdecorde | !define SS_SIMPLE 0x0000000B |
75 | 728 | mdecorde | !define SS_LEFTNOWORDWRAP 0x0000000C |
76 | 728 | mdecorde | !define SS_OWNERDRAW 0x0000000D |
77 | 728 | mdecorde | !define SS_BITMAP 0x0000000E |
78 | 728 | mdecorde | !define SS_ENHMETAFILE 0x0000000F |
79 | 728 | mdecorde | !define SS_ETCHEDHORZ 0x00000010 |
80 | 728 | mdecorde | !define SS_ETCHEDVERT 0x00000011 |
81 | 728 | mdecorde | !define SS_ETCHEDFRAME 0x00000012 |
82 | 728 | mdecorde | !define SS_TYPEMASK 0x0000001F |
83 | 728 | mdecorde | !define SS_REALSIZECONTROL 0x00000040 |
84 | 728 | mdecorde | !define SS_NOPREFIX 0x00000080 |
85 | 728 | mdecorde | !define SS_NOTIFY 0x00000100 |
86 | 728 | mdecorde | !define SS_CENTERIMAGE 0x00000200 |
87 | 728 | mdecorde | !define SS_RIGHTJUST 0x00000400 |
88 | 728 | mdecorde | !define SS_REALSIZEIMAGE 0x00000800 |
89 | 728 | mdecorde | !define SS_SUNKEN 0x00001000 |
90 | 728 | mdecorde | !define SS_EDITCONTROL 0x00002000 |
91 | 728 | mdecorde | !define SS_ENDELLIPSIS 0x00004000 |
92 | 728 | mdecorde | !define SS_PATHELLIPSIS 0x00008000 |
93 | 728 | mdecorde | !define SS_WORDELLIPSIS 0x0000C000 |
94 | 728 | mdecorde | !define SS_ELLIPSISMASK 0x0000C000 |
95 | 728 | mdecorde | |
96 | 728 | mdecorde | !define BS_PUSHBUTTON 0x00000000 |
97 | 728 | mdecorde | !define BS_DEFPUSHBUTTON 0x00000001 |
98 | 728 | mdecorde | !define BS_CHECKBOX 0x00000002 |
99 | 728 | mdecorde | !define BS_AUTOCHECKBOX 0x00000003 |
100 | 728 | mdecorde | !define BS_RADIOBUTTON 0x00000004 |
101 | 728 | mdecorde | !define BS_3STATE 0x00000005 |
102 | 728 | mdecorde | !define BS_AUTO3STATE 0x00000006 |
103 | 728 | mdecorde | !define BS_GROUPBOX 0x00000007 |
104 | 728 | mdecorde | !define BS_USERBUTTON 0x00000008 |
105 | 728 | mdecorde | !define BS_AUTORADIOBUTTON 0x00000009 |
106 | 728 | mdecorde | !define BS_PUSHBOX 0x0000000A |
107 | 728 | mdecorde | !define BS_OWNERDRAW 0x0000000B |
108 | 728 | mdecorde | !define BS_TYPEMASK 0x0000000F |
109 | 728 | mdecorde | !define BS_LEFTTEXT 0x00000020 |
110 | 728 | mdecorde | !define BS_TEXT 0x00000000 |
111 | 728 | mdecorde | !define BS_ICON 0x00000040 |
112 | 728 | mdecorde | !define BS_BITMAP 0x00000080 |
113 | 728 | mdecorde | !define BS_LEFT 0x00000100 |
114 | 728 | mdecorde | !define BS_RIGHT 0x00000200 |
115 | 728 | mdecorde | !define BS_CENTER 0x00000300 |
116 | 728 | mdecorde | !define BS_TOP 0x00000400 |
117 | 728 | mdecorde | !define BS_BOTTOM 0x00000800 |
118 | 728 | mdecorde | !define BS_VCENTER 0x00000C00 |
119 | 728 | mdecorde | !define BS_PUSHLIKE 0x00001000 |
120 | 728 | mdecorde | !define BS_MULTILINE 0x00002000 |
121 | 728 | mdecorde | !define BS_NOTIFY 0x00004000 |
122 | 728 | mdecorde | !define BS_FLAT 0x00008000 |
123 | 728 | mdecorde | !define BS_RIGHTBUTTON ${BS_LEFTTEXT} |
124 | 728 | mdecorde | |
125 | 728 | mdecorde | !define CBS_SIMPLE 0x0001 |
126 | 728 | mdecorde | !define CBS_DROPDOWN 0x0002 |
127 | 728 | mdecorde | !define CBS_DROPDOWNLIST 0x0003 |
128 | 728 | mdecorde | !define CBS_OWNERDRAWFIXED 0x0010 |
129 | 728 | mdecorde | !define CBS_OWNERDRAWVARIABLE 0x0020 |
130 | 728 | mdecorde | !define CBS_AUTOHSCROLL 0x0040 |
131 | 728 | mdecorde | !define CBS_OEMCONVERT 0x0080 |
132 | 728 | mdecorde | !define CBS_SORT 0x0100 |
133 | 728 | mdecorde | !define CBS_HASSTRINGS 0x0200 |
134 | 728 | mdecorde | !define CBS_NOINTEGRALHEIGHT 0x0400 |
135 | 728 | mdecorde | !define CBS_DISABLENOSCROLL 0x0800 |
136 | 728 | mdecorde | !define CBS_UPPERCASE 0x2000 |
137 | 728 | mdecorde | !define CBS_LOWERCASE 0x4000 |
138 | 728 | mdecorde | |
139 | 728 | mdecorde | !define LBS_NOTIFY 0x0001 |
140 | 728 | mdecorde | !define LBS_SORT 0x0002 |
141 | 728 | mdecorde | !define LBS_NOREDRAW 0x0004 |
142 | 728 | mdecorde | !define LBS_MULTIPLESEL 0x0008 |
143 | 728 | mdecorde | !define LBS_OWNERDRAWFIXED 0x0010 |
144 | 728 | mdecorde | !define LBS_OWNERDRAWVARIABLE 0x0020 |
145 | 728 | mdecorde | !define LBS_HASSTRINGS 0x0040 |
146 | 728 | mdecorde | !define LBS_USETABSTOPS 0x0080 |
147 | 728 | mdecorde | !define LBS_NOINTEGRALHEIGHT 0x0100 |
148 | 728 | mdecorde | !define LBS_MULTICOLUMN 0x0200 |
149 | 728 | mdecorde | !define LBS_WANTKEYBOARDINPUT 0x0400 |
150 | 728 | mdecorde | !define LBS_EXTENDEDSEL 0x0800 |
151 | 728 | mdecorde | !define LBS_DISABLENOSCROLL 0x1000 |
152 | 728 | mdecorde | !define LBS_NODATA 0x2000 |
153 | 728 | mdecorde | !define LBS_NOSEL 0x4000 |
154 | 728 | mdecorde | !define LBS_COMBOBOX 0x8000 |
155 | 728 | mdecorde | |
156 | 2956 | mdecorde | !define ACS_CENTER 0x0001 |
157 | 2956 | mdecorde | !define ACS_TRANSPARENT 0x0002 ; The parent of the animation control must not have the WS_CLIPCHILDREN style |
158 | 2956 | mdecorde | !define ACS_AUTOPLAY 0x0004 |
159 | 2956 | mdecorde | !define ACS_TIMER 0x0008 ; < CC6 |
160 | 728 | mdecorde | |
161 | 2956 | mdecorde | !define TBS_AUTOTICKS 0x0001 |
162 | 2956 | mdecorde | !define TBS_VERT 0x0002 |
163 | 2956 | mdecorde | !define TBS_HORZ 0x0000 |
164 | 2956 | mdecorde | !define TBS_TOP 0x0004 |
165 | 2956 | mdecorde | !define TBS_BOTTOM 0x0000 |
166 | 2956 | mdecorde | !define TBS_LEFT 0x0004 |
167 | 2956 | mdecorde | !define TBS_RIGHT 0x0000 |
168 | 2956 | mdecorde | !define TBS_BOTH 0x0008 |
169 | 2956 | mdecorde | !define TBS_NOTICKS 0x0010 |
170 | 2956 | mdecorde | !define TBS_ENABLESELRANGE 0x0020 |
171 | 2956 | mdecorde | !define TBS_FIXEDLENGTH 0x0040 |
172 | 2956 | mdecorde | !define TBS_NOTHUMB 0x0080 |
173 | 2956 | mdecorde | !define TBS_TOOLTIPS 0x0100 ; IE3 |
174 | 2956 | mdecorde | !define TBS_REVERSED 0x0200 ; IE5 |
175 | 2956 | mdecorde | !define TBS_DOWNISLEFT 0x0400 ; _WIN32_IE >= 0x0501 |
176 | 2956 | mdecorde | !define TBS_NOTIFYBEFOREMOVE 0x0800 ; IE6? |
177 | 2956 | mdecorde | !define TBS_TRANSPARENTBKGND 0x1000 ; Vista |
178 | 728 | mdecorde | |
179 | 2956 | mdecorde | !define UDS_WRAP 0x0001 |
180 | 2956 | mdecorde | !define UDS_SETBUDDYINT 0x0002 |
181 | 2956 | mdecorde | !define UDS_ALIGNRIGHT 0x0004 |
182 | 2956 | mdecorde | !define UDS_ALIGNLEFT 0x0008 |
183 | 2956 | mdecorde | !define UDS_AUTOBUDDY 0x0010 |
184 | 2956 | mdecorde | !define UDS_ARROWKEYS 0x0020 |
185 | 2956 | mdecorde | !define UDS_HORZ 0x0040 |
186 | 2956 | mdecorde | !define UDS_NOTHOUSANDS 0x0080 |
187 | 2956 | mdecorde | !define UDS_HOTTRACK 0x0100 ; 98+ |
188 | 728 | mdecorde | |
189 | 2956 | mdecorde | !define MCS_DAYSTATE 0x0001 |
190 | 2956 | mdecorde | !define MCS_MULTISELECT 0x0002 |
191 | 2956 | mdecorde | !define MCS_WEEKNUMBERS 0x0004 |
192 | 2956 | mdecorde | !define MCS_NOTODAYCIRCLE 0x0008 |
193 | 2956 | mdecorde | !define MCS_NOTODAY 0x0010 ; IE4+? |
194 | 2956 | mdecorde | !define MCS_NOTRAILINGDATES 0x0040 ; Vista+ |
195 | 2956 | mdecorde | !define MCS_SHORTDAYSOFWEEK 0x0080 ; Vista+ |
196 | 2956 | mdecorde | !define MCS_NOSELCHANGEONNAV 0x0100 ; Vista+ |
197 | 2956 | mdecorde | |
198 | 2956 | mdecorde | !define DTS_UPDOWN 0x01 |
199 | 2956 | mdecorde | !define DTS_SHOWNONE 0x02 |
200 | 2956 | mdecorde | !define DTS_SHORTDATEFORMAT 0x00 |
201 | 2956 | mdecorde | !define DTS_LONGDATEFORMAT 0x04 |
202 | 2956 | mdecorde | !define DTS_SHORTDATECENTURYFORMAT 0x0C |
203 | 2956 | mdecorde | !define DTS_TIMEFORMAT 0x09 |
204 | 2956 | mdecorde | !define DTS_APPCANPARSE 0x10 |
205 | 2956 | mdecorde | !define DTS_RIGHTALIGN 0x20 |
206 | 2956 | mdecorde | |
207 | 2956 | mdecorde | !define /ifndef LR_DEFAULTCOLOR 0x0000 |
208 | 2956 | mdecorde | !define /ifndef LR_MONOCHROME 0x0001 |
209 | 2956 | mdecorde | !define /ifndef LR_COLOR 0x0002 |
210 | 2956 | mdecorde | !define /ifndef LR_COPYRETURNORG 0x0004 |
211 | 2956 | mdecorde | !define /ifndef LR_COPYDELETEORG 0x0008 |
212 | 2956 | mdecorde | !define /ifndef LR_LOADFROMFILE 0x0010 |
213 | 2956 | mdecorde | !define /ifndef LR_LOADTRANSPARENT 0x0020 |
214 | 2956 | mdecorde | !define /ifndef LR_DEFAULTSIZE 0x0040 |
215 | 2956 | mdecorde | !define /ifndef LR_VGACOLOR 0x0080 |
216 | 2956 | mdecorde | !define /ifndef LR_LOADMAP3DCOLORS 0x1000 |
217 | 2956 | mdecorde | !define /ifndef LR_CREATEDIBSECTION 0x2000 |
218 | 2956 | mdecorde | !define /ifndef LR_COPYFROMRESOURCE 0x4000 |
219 | 2956 | mdecorde | !define /ifndef LR_SHARED 0x8000 |
220 | 2956 | mdecorde | |
221 | 2956 | mdecorde | !define /ifndef IMAGE_BITMAP 0 |
222 | 2956 | mdecorde | !define /ifndef IMAGE_ICON 1 |
223 | 2956 | mdecorde | !define /ifndef IMAGE_CURSOR 2 |
224 | 2956 | mdecorde | !define /ifndef IMAGE_ENHMETAFILE 3 |
225 | 2956 | mdecorde | |
226 | 2956 | mdecorde | !define /ifndef GWL_STYLE -16 |
227 | 2956 | mdecorde | !define /ifndef GWL_EXSTYLE -20 |
228 | 2956 | mdecorde | |
229 | 2956 | mdecorde | #define /ifndef ICC_LISTVIEW_CLASSES 0x0001 ; SysListView32 and SysHeader32 |
230 | 2956 | mdecorde | #define /ifndef ICC_TREEVIEW_CLASSES 0x0002 ; SysTabControl32 and tooltips_class32 |
231 | 2956 | mdecorde | #define /ifndef ICC_BAR_CLASSES 0x0004 ; ToolbarWindow32, msctls_statusbar32, msctls_trackbar32 and tooltips_class32 |
232 | 2956 | mdecorde | #define /ifndef ICC_TAB_CLASSES 0x0008 ; SysTabControl32 and tooltips_class32 |
233 | 2956 | mdecorde | #define /ifndef ICC_UPDOWN_CLASS 0x0010 ; msctls_updown32 |
234 | 2956 | mdecorde | #define /ifndef ICC_PROGRESS_CLASS 0x0020 ; msctls_progress32 |
235 | 2956 | mdecorde | #define /ifndef ICC_HOTKEY_CLASS 0x0040 ; msctls_hotkey32 |
236 | 2956 | mdecorde | #define /ifndef ICC_ANIMATE_CLASS 0x0080 ; SysAnimate32 |
237 | 2956 | mdecorde | #define /ifndef ICC_WIN95_CLASSES 0x00FF |
238 | 2956 | mdecorde | !define /ifndef ICC_DATE_CLASSES 0x0100 ; CC4.70+ (NT4+/IE3.1+/Win95 OSR2) SysDateTimePick32, SysMonthCal32 and CC6.10+(Vista+) DropDown |
239 | 2956 | mdecorde | !define /ifndef ICC_USEREX_CLASSES 0x0200 ; CC4.??+ (NT4+/IE3.?+/Win95 OSR2) ComboBoxEx32 |
240 | 2956 | mdecorde | !define /ifndef ICC_COOL_CLASSES 0x0400 ; CC4.70+ (NT4+/IE3.1+/Win95 OSR2) ReBarWindow32 |
241 | 2956 | mdecorde | !define /ifndef ICC_INTERNET_CLASSES 0x0800 ; CC4.71+ (IE4+) SysIPAddress32 |
242 | 2956 | mdecorde | !define /ifndef ICC_PAGESCROLLER_CLASS 0x1000 ; CC4.71+ (IE4+) SysPager |
243 | 2956 | mdecorde | !define /ifndef ICC_NATIVEFNTCTL_CLASS 0x2000 ; CC4.71+ (IE4+) NativeFontCtl |
244 | 2956 | mdecorde | !define /ifndef ICC_STANDARD_CLASSES 0x4000 ; WinXP+ Button, Static, Edit, ListBox, ComboBox, ComboLBox, ScrollBar and ReaderModeCtl |
245 | 2956 | mdecorde | !define /ifndef ICC_LINK_CLASS 0x8000 ; WinXP+ SysLink |
246 | 2956 | mdecorde | |
247 | 2956 | mdecorde | |
248 | 728 | mdecorde | !define DEFAULT_STYLES ${WS_CHILD}|${WS_VISIBLE}|${WS_CLIPSIBLINGS} |
249 | 728 | mdecorde | |
250 | 728 | mdecorde | !define __NSD_HLine_CLASS STATIC |
251 | 728 | mdecorde | !define __NSD_HLine_STYLE ${DEFAULT_STYLES}|${SS_ETCHEDHORZ}|${SS_SUNKEN} |
252 | 728 | mdecorde | !define __NSD_HLine_EXSTYLE ${WS_EX_TRANSPARENT} |
253 | 728 | mdecorde | |
254 | 728 | mdecorde | !define __NSD_VLine_CLASS STATIC |
255 | 728 | mdecorde | !define __NSD_VLine_STYLE ${DEFAULT_STYLES}|${SS_ETCHEDVERT}|${SS_SUNKEN} |
256 | 728 | mdecorde | !define __NSD_VLine_EXSTYLE ${WS_EX_TRANSPARENT} |
257 | 728 | mdecorde | |
258 | 728 | mdecorde | !define __NSD_Label_CLASS STATIC |
259 | 728 | mdecorde | !define __NSD_Label_STYLE ${DEFAULT_STYLES}|${SS_NOTIFY} |
260 | 728 | mdecorde | !define __NSD_Label_EXSTYLE ${WS_EX_TRANSPARENT} |
261 | 728 | mdecorde | |
262 | 728 | mdecorde | !define __NSD_Icon_CLASS STATIC |
263 | 728 | mdecorde | !define __NSD_Icon_STYLE ${DEFAULT_STYLES}|${SS_ICON}|${SS_NOTIFY} |
264 | 728 | mdecorde | !define __NSD_Icon_EXSTYLE 0 |
265 | 728 | mdecorde | |
266 | 728 | mdecorde | !define __NSD_Bitmap_CLASS STATIC |
267 | 728 | mdecorde | !define __NSD_Bitmap_STYLE ${DEFAULT_STYLES}|${SS_BITMAP}|${SS_NOTIFY} |
268 | 728 | mdecorde | !define __NSD_Bitmap_EXSTYLE 0 |
269 | 728 | mdecorde | |
270 | 728 | mdecorde | !define __NSD_BrowseButton_CLASS BUTTON |
271 | 728 | mdecorde | !define __NSD_BrowseButton_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP} |
272 | 728 | mdecorde | !define __NSD_BrowseButton_EXSTYLE 0 |
273 | 728 | mdecorde | |
274 | 728 | mdecorde | !define __NSD_Link_CLASS LINK |
275 | 728 | mdecorde | !define __NSD_Link_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${BS_OWNERDRAW} |
276 | 728 | mdecorde | !define __NSD_Link_EXSTYLE 0 |
277 | 728 | mdecorde | |
278 | 728 | mdecorde | !define __NSD_Button_CLASS BUTTON |
279 | 728 | mdecorde | !define __NSD_Button_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP} |
280 | 728 | mdecorde | !define __NSD_Button_EXSTYLE 0 |
281 | 728 | mdecorde | |
282 | 728 | mdecorde | !define __NSD_GroupBox_CLASS BUTTON |
283 | 728 | mdecorde | !define __NSD_GroupBox_STYLE ${DEFAULT_STYLES}|${BS_GROUPBOX} |
284 | 728 | mdecorde | !define __NSD_GroupBox_EXSTYLE ${WS_EX_TRANSPARENT} |
285 | 728 | mdecorde | |
286 | 728 | mdecorde | !define __NSD_CheckBox_CLASS BUTTON |
287 | 728 | mdecorde | !define __NSD_CheckBox_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${BS_TEXT}|${BS_VCENTER}|${BS_AUTOCHECKBOX}|${BS_MULTILINE} |
288 | 728 | mdecorde | !define __NSD_CheckBox_EXSTYLE 0 |
289 | 728 | mdecorde | |
290 | 728 | mdecorde | !define __NSD_RadioButton_CLASS BUTTON |
291 | 728 | mdecorde | !define __NSD_RadioButton_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${BS_TEXT}|${BS_VCENTER}|${BS_AUTORADIOBUTTON}|${BS_MULTILINE} |
292 | 728 | mdecorde | !define __NSD_RadioButton_EXSTYLE 0 |
293 | 728 | mdecorde | |
294 | 728 | mdecorde | !define __NSD_Text_CLASS EDIT |
295 | 728 | mdecorde | !define __NSD_Text_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${ES_AUTOHSCROLL} |
296 | 728 | mdecorde | !define __NSD_Text_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE} |
297 | 728 | mdecorde | |
298 | 2956 | mdecorde | !define __NSD_MLText_CLASS EDIT |
299 | 2956 | mdecorde | !define __NSD_MLText_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${ES_AUTOHSCROLL}|${ES_AUTOVSCROLL}|${ES_MULTILINE}|${ES_WANTRETURN}|${WS_HSCROLL}|${WS_VSCROLL} |
300 | 2956 | mdecorde | !define __NSD_MLText_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE} |
301 | 2956 | mdecorde | |
302 | 728 | mdecorde | !define __NSD_Password_CLASS EDIT |
303 | 728 | mdecorde | !define __NSD_Password_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${ES_AUTOHSCROLL}|${ES_PASSWORD} |
304 | 728 | mdecorde | !define __NSD_Password_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE} |
305 | 728 | mdecorde | |
306 | 728 | mdecorde | !define __NSD_Number_CLASS EDIT |
307 | 728 | mdecorde | !define __NSD_Number_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${ES_AUTOHSCROLL}|${ES_NUMBER} |
308 | 728 | mdecorde | !define __NSD_Number_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE} |
309 | 728 | mdecorde | |
310 | 728 | mdecorde | !define __NSD_FileRequest_CLASS EDIT |
311 | 728 | mdecorde | !define __NSD_FileRequest_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${ES_AUTOHSCROLL} |
312 | 728 | mdecorde | !define __NSD_FileRequest_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE} |
313 | 728 | mdecorde | |
314 | 728 | mdecorde | !define __NSD_DirRequest_CLASS EDIT |
315 | 728 | mdecorde | !define __NSD_DirRequest_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${ES_AUTOHSCROLL} |
316 | 728 | mdecorde | !define __NSD_DirRequest_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE} |
317 | 728 | mdecorde | |
318 | 2956 | mdecorde | !define __NSD_RichEdit_CLASS_10 "RICHEDIT" ; 1.0 (Riched32.dll) Win95/NT4 |
319 | 2956 | mdecorde | !define __NSD_RichEdit_CLASS_20A "RICHEDIT20A" ; 2.0 (Riched20.dll) Win98/NT4 (NSIS makes sure this is registered even on Windows 95) |
320 | 2956 | mdecorde | !define __NSD_RichEdit_CLASS_20W "RICHEDIT20W" |
321 | 2956 | mdecorde | !define __NSD_RichEdit_CLASS_41W "RICHEDIT50W" ; 4.1 (MsftEdit.DLL) WinXP.SP1 |
322 | 2956 | mdecorde | !ifdef NSIS_UNICODE |
323 | 2956 | mdecorde | !define /ifndef __NSD_RichEdit_CLASS ${__NSD_RichEdit_CLASS_20W} |
324 | 2956 | mdecorde | !else |
325 | 2956 | mdecorde | !define /ifndef __NSD_RichEdit_CLASS ${__NSD_RichEdit_CLASS_20A} |
326 | 2956 | mdecorde | !endif |
327 | 2956 | mdecorde | !define __NSD_RichEdit_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${ES_AUTOHSCROLL}|${ES_AUTOVSCROLL}|${ES_MULTILINE}|${ES_WANTRETURN}|${ES_SAVESEL}|${WS_HSCROLL}|${WS_VSCROLL} |
328 | 2956 | mdecorde | !define __NSD_RichEdit_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE} |
329 | 2956 | mdecorde | |
330 | 728 | mdecorde | !define __NSD_ComboBox_CLASS COMBOBOX |
331 | 728 | mdecorde | !define __NSD_ComboBox_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${WS_VSCROLL}|${WS_CLIPCHILDREN}|${CBS_AUTOHSCROLL}|${CBS_HASSTRINGS}|${CBS_DROPDOWN} |
332 | 728 | mdecorde | !define __NSD_ComboBox_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE} |
333 | 728 | mdecorde | |
334 | 728 | mdecorde | !define __NSD_DropList_CLASS COMBOBOX |
335 | 728 | mdecorde | !define __NSD_DropList_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${WS_VSCROLL}|${WS_CLIPCHILDREN}|${CBS_AUTOHSCROLL}|${CBS_HASSTRINGS}|${CBS_DROPDOWNLIST} |
336 | 728 | mdecorde | !define __NSD_DropList_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE} |
337 | 728 | mdecorde | |
338 | 728 | mdecorde | !define __NSD_ListBox_CLASS LISTBOX |
339 | 728 | mdecorde | !define __NSD_ListBox_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${WS_VSCROLL}|${LBS_DISABLENOSCROLL}|${LBS_HASSTRINGS}|${LBS_NOINTEGRALHEIGHT}|${LBS_NOTIFY} |
340 | 728 | mdecorde | !define __NSD_ListBox_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE} |
341 | 728 | mdecorde | |
342 | 2956 | mdecorde | !define __NSD_SortedListBox_CLASS LISTBOX |
343 | 2956 | mdecorde | !define __NSD_SortedListBox_STYLE ${__NSD_ListBox_STYLE}|${LBS_SORT} |
344 | 2956 | mdecorde | !define __NSD_SortedListBox_EXSTYLE ${__NSD_ListBox_EXSTYLE} |
345 | 2956 | mdecorde | |
346 | 728 | mdecorde | !define __NSD_ProgressBar_CLASS msctls_progress32 |
347 | 728 | mdecorde | !define __NSD_ProgressBar_STYLE ${DEFAULT_STYLES} |
348 | 728 | mdecorde | !define __NSD_ProgressBar_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE} |
349 | 728 | mdecorde | |
350 | 2956 | mdecorde | !define __NSD_Animation_CLASS SysAnimate32 |
351 | 2956 | mdecorde | !define __NSD_Animation_STYLE ${DEFAULT_STYLES}|${ACS_TRANSPARENT}|${ACS_AUTOPLAY} |
352 | 2956 | mdecorde | !define __NSD_Animation_EXSTYLE 0 |
353 | 2956 | mdecorde | |
354 | 2956 | mdecorde | !define __NSD_HTrackBar_CLASS msctls_trackbar32 |
355 | 2956 | mdecorde | !define __NSD_HTrackBar_STYLE ${DEFAULT_STYLES}|${TBS_HORZ}|${TBS_AUTOTICKS}|${TBS_TOOLTIPS} |
356 | 2956 | mdecorde | !define __NSD_HTrackBar_EXSTYLE 0 |
357 | 2956 | mdecorde | |
358 | 2956 | mdecorde | !define __NSD_VTrackBar_CLASS msctls_trackbar32 |
359 | 2956 | mdecorde | !define __NSD_VTrackBar_STYLE ${DEFAULT_STYLES}|${TBS_VERT}|${TBS_AUTOTICKS}|${TBS_TOOLTIPS} |
360 | 2956 | mdecorde | !define __NSD_VTrackBar_EXSTYLE 0 |
361 | 2956 | mdecorde | |
362 | 2956 | mdecorde | !define __NSD_UpDown_CLASS msctls_updown32 |
363 | 2956 | mdecorde | !define __NSD_UpDown_STYLE ${DEFAULT_STYLES}|${UDS_SETBUDDYINT}|${UDS_ARROWKEYS}|${UDS_NOTHOUSANDS}|${UDS_ALIGNRIGHT} |
364 | 2956 | mdecorde | !define __NSD_UpDown_EXSTYLE 0 |
365 | 2956 | mdecorde | |
366 | 2956 | mdecorde | !define __NSD_AutoUpDown_CLASS msctls_updown32 |
367 | 2956 | mdecorde | !define __NSD_AutoUpDown_STYLE ${__NSD_UpDown_STYLE}|${UDS_AUTOBUDDY} |
368 | 2956 | mdecorde | !define __NSD_AutoUpDown_EXSTYLE ${__NSD_UpDown_EXSTYLE} |
369 | 2956 | mdecorde | |
370 | 2956 | mdecorde | !define __NSD_HotKey_CLASS msctls_hotkey32 |
371 | 2956 | mdecorde | !define __NSD_HotKey_STYLE ${DEFAULT_STYLES} |
372 | 2956 | mdecorde | !define __NSD_HotKey_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE} |
373 | 2956 | mdecorde | |
374 | 2956 | mdecorde | !define __NSD_Calendar_CLASS SysMonthCal32 |
375 | 2956 | mdecorde | !define __NSD_Calendar_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP} |
376 | 2956 | mdecorde | !define __NSD_Calendar_EXSTYLE 0 |
377 | 2956 | mdecorde | |
378 | 2956 | mdecorde | !define __NSD_DatePicker_CLASS SysDateTimePick32 |
379 | 2956 | mdecorde | !define __NSD_DatePicker_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP} |
380 | 2956 | mdecorde | !define __NSD_DatePicker_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE} |
381 | 2956 | mdecorde | |
382 | 2956 | mdecorde | !define __NSD_TimePicker_CLASS SysDateTimePick32 |
383 | 2956 | mdecorde | !define __NSD_TimePicker_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${DTS_TIMEFORMAT} |
384 | 2956 | mdecorde | !define __NSD_TimePicker_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE} |
385 | 2956 | mdecorde | |
386 | 2956 | mdecorde | !define __NSD_IPAddress_CLASS SysIPAddress32 ; IE4+/CC4.71+ |
387 | 2956 | mdecorde | !define __NSD_IPAddress_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP} |
388 | 2956 | mdecorde | !define __NSD_IPAddress_EXSTYLE 0 |
389 | 2956 | mdecorde | |
390 | 2956 | mdecorde | !define __NSD_NetAddress_CLASS msctls_netaddress ; Vista+ |
391 | 2956 | mdecorde | !define __NSD_NetAddress_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP} |
392 | 2956 | mdecorde | !define __NSD_NetAddress_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE} |
393 | 2956 | mdecorde | |
394 | 2956 | mdecorde | |
395 | 728 | mdecorde | !macro __NSD_DefineControl NAME |
396 | 728 | mdecorde | !define NSD_Create${NAME} "nsDialogs::CreateControl ${__NSD_${Name}_CLASS} ${__NSD_${Name}_STYLE} ${__NSD_${Name}_EXSTYLE}" |
397 | 728 | mdecorde | !macroend |
398 | 728 | mdecorde | !insertmacro __NSD_DefineControl HLine |
399 | 728 | mdecorde | !insertmacro __NSD_DefineControl VLine |
400 | 728 | mdecorde | !insertmacro __NSD_DefineControl Label |
401 | 728 | mdecorde | !insertmacro __NSD_DefineControl Icon |
402 | 728 | mdecorde | !insertmacro __NSD_DefineControl Bitmap |
403 | 728 | mdecorde | !insertmacro __NSD_DefineControl BrowseButton |
404 | 728 | mdecorde | !insertmacro __NSD_DefineControl Link |
405 | 728 | mdecorde | !insertmacro __NSD_DefineControl Button |
406 | 728 | mdecorde | !insertmacro __NSD_DefineControl GroupBox |
407 | 728 | mdecorde | !insertmacro __NSD_DefineControl CheckBox |
408 | 728 | mdecorde | !insertmacro __NSD_DefineControl RadioButton |
409 | 728 | mdecorde | !insertmacro __NSD_DefineControl Text |
410 | 2956 | mdecorde | !insertmacro __NSD_DefineControl MLText |
411 | 728 | mdecorde | !insertmacro __NSD_DefineControl Password |
412 | 728 | mdecorde | !insertmacro __NSD_DefineControl Number |
413 | 728 | mdecorde | !insertmacro __NSD_DefineControl FileRequest |
414 | 728 | mdecorde | !insertmacro __NSD_DefineControl DirRequest |
415 | 2956 | mdecorde | !insertmacro __NSD_DefineControl RichEdit |
416 | 728 | mdecorde | !insertmacro __NSD_DefineControl ComboBox |
417 | 728 | mdecorde | !insertmacro __NSD_DefineControl DropList |
418 | 728 | mdecorde | !insertmacro __NSD_DefineControl ListBox |
419 | 2956 | mdecorde | !insertmacro __NSD_DefineControl SortedListBox |
420 | 728 | mdecorde | !insertmacro __NSD_DefineControl ProgressBar |
421 | 2956 | mdecorde | !insertmacro __NSD_DefineControl Animation |
422 | 2956 | mdecorde | !insertmacro __NSD_DefineControl HTrackBar |
423 | 2956 | mdecorde | !insertmacro __NSD_DefineControl VTrackBar |
424 | 2956 | mdecorde | !insertmacro __NSD_DefineControl UpDown |
425 | 2956 | mdecorde | !insertmacro __NSD_DefineControl AutoUpDown |
426 | 2956 | mdecorde | !insertmacro __NSD_DefineControl HotKey |
427 | 2956 | mdecorde | !insertmacro __NSD_DefineControl Calendar |
428 | 2956 | mdecorde | !insertmacro __NSD_DefineControl DatePicker |
429 | 2956 | mdecorde | !insertmacro __NSD_DefineControl TimePicker |
430 | 2956 | mdecorde | !insertmacro __NSD_DefineControl IPAddress |
431 | 2956 | mdecorde | !insertmacro __NSD_DefineControl NetAddress |
432 | 728 | mdecorde | |
433 | 2956 | mdecorde | |
434 | 728 | mdecorde | !macro __NSD_OnControlEvent EVENT HWND FUNCTION |
435 | 728 | mdecorde | Push $0 |
436 | 728 | mdecorde | Push $1 |
437 | 728 | mdecorde | |
438 | 728 | mdecorde | StrCpy $1 "${HWND}" |
439 | 728 | mdecorde | |
440 | 728 | mdecorde | GetFunctionAddress $0 "${FUNCTION}" |
441 | 728 | mdecorde | nsDialogs::On${EVENT} $1 $0 |
442 | 728 | mdecorde | |
443 | 728 | mdecorde | Pop $1 |
444 | 728 | mdecorde | Pop $0 |
445 | 728 | mdecorde | !macroend |
446 | 728 | mdecorde | |
447 | 728 | mdecorde | !macro __NSD_DefineControlCallback EVENT |
448 | 2956 | mdecorde | !define NSD_On${EVENT} `!insertmacro __NSD_OnControlEvent ${EVENT} ` |
449 | 728 | mdecorde | !macroend |
450 | 728 | mdecorde | |
451 | 728 | mdecorde | !macro __NSD_OnDialogEvent EVENT FUNCTION |
452 | 728 | mdecorde | Push $0 |
453 | 728 | mdecorde | |
454 | 728 | mdecorde | GetFunctionAddress $0 "${FUNCTION}" |
455 | 728 | mdecorde | nsDialogs::On${EVENT} $0 |
456 | 728 | mdecorde | |
457 | 728 | mdecorde | Pop $0 |
458 | 728 | mdecorde | !macroend |
459 | 728 | mdecorde | |
460 | 728 | mdecorde | !macro __NSD_DefineDialogCallback EVENT |
461 | 2956 | mdecorde | !define NSD_On${EVENT} `!insertmacro __NSD_OnDialogEvent ${EVENT} ` |
462 | 728 | mdecorde | !macroend |
463 | 728 | mdecorde | !insertmacro __NSD_DefineControlCallback Click |
464 | 728 | mdecorde | !insertmacro __NSD_DefineControlCallback Change |
465 | 728 | mdecorde | !insertmacro __NSD_DefineControlCallback Notify |
466 | 728 | mdecorde | !insertmacro __NSD_DefineDialogCallback Back |
467 | 728 | mdecorde | |
468 | 2956 | mdecorde | !define NSD_Return "!insertmacro NSD_Return " |
469 | 2956 | mdecorde | !macro NSD_Return val |
470 | 2956 | mdecorde | StrCpy $_OUTDIR ${val} |
471 | 2956 | mdecorde | SetSilent silent |
472 | 2956 | mdecorde | Return |
473 | 2956 | mdecorde | !macroend |
474 | 2956 | mdecorde | |
475 | 2956 | mdecorde | |
476 | 2956 | mdecorde | !define __NSD_MkCtlCmd "!insertmacro __NSD_MkCtlCmd " |
477 | 2956 | mdecorde | !macro __NSD_MkCtlCmd msg wp lp hCtl |
478 | 2956 | mdecorde | SendMessage ${hCtl} ${${msg}} ${wp} ${lp} |
479 | 2956 | mdecorde | !macroend |
480 | 2956 | mdecorde | !define __NSD_MkCtlCmd_WP "!insertmacro __NSD_MkCtlCmd_WP " |
481 | 2956 | mdecorde | !macro __NSD_MkCtlCmd_WP msg lp hCtl wp |
482 | 2956 | mdecorde | SendMessage ${hCtl} ${${msg}} ${wp} ${lp} |
483 | 2956 | mdecorde | !macroend |
484 | 2956 | mdecorde | !define __NSD_MkCtlCmd_LP "!insertmacro __NSD_MkCtlCmd_LP " |
485 | 2956 | mdecorde | !macro __NSD_MkCtlCmd_LP msg wp hCtl lp |
486 | 2956 | mdecorde | SendMessage ${hCtl} ${${msg}} ${wp} ${lp} |
487 | 2956 | mdecorde | !macroend |
488 | 2956 | mdecorde | !define __NSD_MkCtlCmd_WPLP "!insertmacro __NSD_MkCtlCmd_WPLP " |
489 | 2956 | mdecorde | !macro __NSD_MkCtlCmd_WPLP msg hCtl wp lp |
490 | 2956 | mdecorde | SendMessage ${hCtl} ${${msg}} ${wp} ${lp} |
491 | 2956 | mdecorde | !macroend |
492 | 2956 | mdecorde | !define __NSD_MkCtlCmd_RV "!insertmacro __NSD_MkCtlCmd_RV " |
493 | 2956 | mdecorde | !macro __NSD_MkCtlCmd_RV msg wp lp hCtl VAR |
494 | 2956 | mdecorde | SendMessage ${hCtl} ${${msg}} ${wp} ${lp} ${VAR} |
495 | 2956 | mdecorde | !macroend |
496 | 2956 | mdecorde | |
497 | 2956 | mdecorde | |
498 | 2956 | mdecorde | !define NSD_InitCommonControlsEx "!insertmacro __NSD_InitCommonControlsEx " |
499 | 2956 | mdecorde | !macro __NSD_InitCommonControlsEx ICC |
500 | 2956 | mdecorde | !pragma warning push |
501 | 2956 | mdecorde | !pragma warning disable 7070 ; Invalid number |
502 | 2956 | mdecorde | !if ${ICC} <> 0 |
503 | 2956 | mdecorde | !define /ReDef /IntFmt NSD_InitCommonControlsEx_TEMP "0x%X" ${ICC} |
504 | 2956 | mdecorde | System::Call 'COMCTL32::InitCommonControlsEx(*l${NSD_InitCommonControlsEx_TEMP}00000008)' |
505 | 2956 | mdecorde | !undef NSD_InitCommonControlsEx_TEMP |
506 | 2956 | mdecorde | !else |
507 | 2956 | mdecorde | System::Int64Op ${ICC} << 32 |
508 | 2956 | mdecorde | System::Int64Op 8 | |
509 | 2956 | mdecorde | System::Call 'COMCTL32::InitCommonControlsEx(*ls)' ; INITCOMMONCONTROLSEX as UINT64 |
510 | 2956 | mdecorde | !endif |
511 | 2956 | mdecorde | !pragma warning pop |
512 | 2956 | mdecorde | !macroend |
513 | 2956 | mdecorde | !define NSD_InitCommonControl_IPAddress `${NSD_InitCommonControlsEx} ${ICC_INTERNET_CLASSES}` |
514 | 2956 | mdecorde | !define NSD_InitCommonControl_NetAddress `System::Call SHELL32::InitNetworkAddressControl()i` |
515 | 2956 | mdecorde | !define NSD_InitCommonControl_SysLink `${NSD_InitCommonControlsEx} ${ICC_LINK_CLASS}` |
516 | 2956 | mdecorde | |
517 | 2956 | mdecorde | |
518 | 2956 | mdecorde | !define NSD_CreateTimer `!insertmacro _NSD_CreateTimer ` |
519 | 728 | mdecorde | !macro _NSD_CreateTimer FUNCTION INTERVAL |
520 | 728 | mdecorde | Push $0 |
521 | 728 | mdecorde | |
522 | 728 | mdecorde | GetFunctionAddress $0 "${FUNCTION}" |
523 | 728 | mdecorde | nsDialogs::CreateTimer $0 "${INTERVAL}" |
524 | 728 | mdecorde | |
525 | 728 | mdecorde | Pop $0 |
526 | 728 | mdecorde | !macroend |
527 | 728 | mdecorde | |
528 | 728 | mdecorde | |
529 | 2956 | mdecorde | !define NSD_KillTimer `!insertmacro _NSD_KillTimer ` |
530 | 728 | mdecorde | !macro _NSD_KillTimer FUNCTION |
531 | 728 | mdecorde | Push $0 |
532 | 728 | mdecorde | |
533 | 728 | mdecorde | GetFunctionAddress $0 "${FUNCTION}" |
534 | 728 | mdecorde | nsDialogs::KillTimer $0 |
535 | 728 | mdecorde | |
536 | 728 | mdecorde | Pop $0 |
537 | 2956 | mdecorde | !macroend |
538 | 728 | mdecorde | |
539 | 2956 | mdecorde | |
540 | 2956 | mdecorde | !define NSD_AddStyle "!insertmacro _NSD_GWLAddFlags ${GWL_STYLE} " |
541 | 2956 | mdecorde | !define NSD_AddExStyle "!insertmacro _NSD_GWLAddFlags ${GWL_EXSTYLE} " |
542 | 2956 | mdecorde | !macro _NSD_GWLAddFlags GWL HWND DATA |
543 | 2956 | mdecorde | System::Call "user32::GetWindowLong(p${HWND},i${GWL})p.s" |
544 | 2956 | mdecorde | System::Int64Op "${DATA}" | |
545 | 2956 | mdecorde | System::Call "user32::SetWindowLong(p${HWND},p${GWL},ps)" |
546 | 728 | mdecorde | !macroend |
547 | 728 | mdecorde | |
548 | 2956 | mdecorde | !define NSD_RemoveStyle "!insertmacro _NSD_GWLRemoveFlags ${GWL_STYLE} " |
549 | 2956 | mdecorde | !define NSD_RemoveExStyle "!insertmacro _NSD_GWLRemoveFlags ${GWL_EXSTYLE} " |
550 | 2956 | mdecorde | !macro _NSD_GWLRemoveFlags GWL HWND DATA |
551 | 2956 | mdecorde | System::Call "user32::GetWindowLong(p${HWND},i${GWL})p.s" |
552 | 2956 | mdecorde | System::Int64Op "${DATA}" ~ & ; Perform ~ and prepare the stack for & |
553 | 2956 | mdecorde | System::Int64Op ; Perform & |
554 | 2956 | mdecorde | System::Call "user32::SetWindowLong(p${HWND},i${GWL},ps)" |
555 | 2956 | mdecorde | !macroend |
556 | 728 | mdecorde | |
557 | 2956 | mdecorde | !define NSD_GetStyle "!insertmacro _NSD_GWLGetFlags ${GWL_STYLE} " |
558 | 2956 | mdecorde | !define NSD_GetExStyle "!insertmacro _NSD_GWLGetFlags ${GWL_EXSTYLE} " |
559 | 2956 | mdecorde | !macro _NSD_GWLGetFlags GWL HWND RET |
560 | 2956 | mdecorde | System::Call "user32::GetWindowLong(p${HWND},i${GWL})p.s" |
561 | 2956 | mdecorde | Pop ${RET} |
562 | 2956 | mdecorde | !macroend |
563 | 728 | mdecorde | |
564 | 2956 | mdecorde | !macro __NSD_GetStyleBit GWL BIT HWND RET |
565 | 2956 | mdecorde | !insertmacro _NSD_GWLGetFlags ${GWL} ${HWND} ${RET} |
566 | 2956 | mdecorde | IntOp ${RET} ${RET} & ${BIT} |
567 | 2956 | mdecorde | !macroend |
568 | 728 | mdecorde | |
569 | 728 | mdecorde | |
570 | 2956 | mdecorde | !define NSD_SetFocus `!insertmacro __NSD_SetFocus ` |
571 | 2956 | mdecorde | !macro __NSD_SetFocus HWND |
572 | 2956 | mdecorde | System::Call "user32::SetFocus(p${HWND})" |
573 | 2956 | mdecorde | !macroend |
574 | 728 | mdecorde | |
575 | 2956 | mdecorde | |
576 | 2956 | mdecorde | !define NSD_GetText "!insertmacro __NSD_GetText " |
577 | 2956 | mdecorde | !macro __NSD_GetText CONTROL VAR |
578 | 2956 | mdecorde | System::Call user32::GetWindowText(p${CONTROL},t.s,i${NSIS_MAX_STRLEN}) |
579 | 2956 | mdecorde | Pop ${VAR} |
580 | 728 | mdecorde | !macroend |
581 | 728 | mdecorde | |
582 | 728 | mdecorde | |
583 | 2956 | mdecorde | !define NSD_SetText "!insertmacro __NSD_SetText " |
584 | 2956 | mdecorde | !macro __NSD_SetText CONTROL TEXT |
585 | 2956 | mdecorde | SendMessage ${CONTROL} ${WM_SETTEXT} 0 `STR:${TEXT}` |
586 | 2956 | mdecorde | !macroend |
587 | 728 | mdecorde | |
588 | 728 | mdecorde | |
589 | 2956 | mdecorde | ### Edit ### |
590 | 728 | mdecorde | |
591 | 2956 | mdecorde | !define NSD_Edit_GetTextLimit `${__NSD_MkCtlCmd_RV} EM_GETLIMITTEXT 0 0 ` |
592 | 2956 | mdecorde | !define NSD_Edit_SetTextLimit `${__NSD_MkCtlCmd_WP} EM_SETLIMITTEXT 0 ` |
593 | 2956 | mdecorde | !define NSD_Edit_SetPasswordChar `${__NSD_MkCtlCmd_WP} EM_SETPASSWORDCHAR 0 ` |
594 | 2956 | mdecorde | !define NSD_Edit_GetReadOnly `!insertmacro __NSD_GetStyleBit ${GWL_STYLE} ${ES_READONLY} ` ; Non-zero if read-only |
595 | 2956 | mdecorde | !define NSD_Edit_SetReadOnly `${__NSD_MkCtlCmd_WP} EM_SETREADONLY 0 ` ; Toggles the ES_READONLY style |
596 | 2956 | mdecorde | !define NSD_Edit_GetModify `${__NSD_MkCtlCmd_RV} EM_GETMODIFY 0 0 ` |
597 | 2956 | mdecorde | !define NSD_Edit_SetModify `${__NSD_MkCtlCmd_WP} EM_SETMODIFY 0 ` |
598 | 2956 | mdecorde | !define NSD_Edit_EmptyUndoBuffer `${__NSD_MkCtlCmd} EM_EMPTYUNDOBUFFER 0 0 ` |
599 | 2956 | mdecorde | !define NSD_Edit_CanUndo `${__NSD_MkCtlCmd_RV} EM_CANUNDO 0 0 ` |
600 | 2956 | mdecorde | !define NSD_Edit_ScrollCaret `${__NSD_MkCtlCmd} EM_SCROLLCARET 0 0 ` |
601 | 2956 | mdecorde | !define NSD_Edit_LineScroll `${__NSD_MkCtlCmd_WPLP} EM_LINESCROLL ` |
602 | 2956 | mdecorde | !define NSD_Edit_SetSel `${__NSD_MkCtlCmd_WPLP} EM_SETSEL ` ; WP:Start LP:End |
603 | 728 | mdecorde | |
604 | 2956 | mdecorde | !define NSD_Edit_SetCueBannerText "!insertmacro __NSD_Edit_SetCueBannerText " ; CC6+ |
605 | 2956 | mdecorde | !macro __NSD_Edit_SetCueBannerText CONTROL SHOWWHENFOCUSED TEXT |
606 | 2956 | mdecorde | !if ${NSIS_CHAR_SIZE} > 1 |
607 | 2956 | mdecorde | SendMessage ${CONTROL} ${EM_SETCUEBANNER} ${SHOWWHENFOCUSED} `STR:${TEXT}` |
608 | 2956 | mdecorde | !else |
609 | 2956 | mdecorde | System::Call 'USER32::SendMessage(p${CONTROL},i${EM_SETCUEBANNER},p${SHOWWHENFOCUSED},ws)' `${TEXT}` ; Must be PWSTR |
610 | 2956 | mdecorde | !endif |
611 | 728 | mdecorde | !macroend |
612 | 728 | mdecorde | |
613 | 2956 | mdecorde | !define NSD_Edit_GetLineCount `${__NSD_MkCtlCmd_RV} EM_GETLINECOUNT 0 0 ` |
614 | 2956 | mdecorde | !define NSD_Edit_GetLine "!insertmacro __NSD_Edit_GetLine " |
615 | 2956 | mdecorde | !macro __NSD_Edit_GetLine CONTROL LINEINDEX OUTPUT |
616 | 2956 | mdecorde | System::Call '*(&i2 ${NSIS_MAX_STRLEN},&t${NSIS_MAX_STRLEN})p.s' |
617 | 2956 | mdecorde | System::Call 'USER32::SendMessage(p${CONTROL},i${EM_GETLINE},p${LINEINDEX},pss)' |
618 | 2956 | mdecorde | System::Call 'KERNEL32::lstrcpyn(t.s,pss,i${NSIS_MAX_STRLEN})' |
619 | 2956 | mdecorde | Pop ${OUTPUT} |
620 | 2956 | mdecorde | System::Free |
621 | 2956 | mdecorde | !macroend |
622 | 728 | mdecorde | |
623 | 2956 | mdecorde | !define NSD_SetTextLimit `${NSD_Edit_SetTextLimit} ` ; Legacy alias |
624 | 728 | mdecorde | |
625 | 728 | mdecorde | |
626 | 2956 | mdecorde | ### RichEdit ### |
627 | 728 | mdecorde | |
628 | 2956 | mdecorde | !define NSD_RichEd_SetTextLimit `${__NSD_MkCtlCmd_LP} EM_EXLIMITTEXT 0 ` |
629 | 2956 | mdecorde | !define NSD_RichEd_GetEventMask `${__NSD_MkCtlCmd_RV} EM_GETEVENTMASK 0 0 ` |
630 | 2956 | mdecorde | !define NSD_RichEd_SetEventMask `${__NSD_MkCtlCmd_LP} EM_SETEVENTMASK 0 ` ; LP:ENM_* |
631 | 2956 | mdecorde | !define NSD_RichEd_SetSystemBackgroundColor `${__NSD_MkCtlCmd} EM_SETBKGNDCOLOR 1 0 ` ; COLOR_WINDOW |
632 | 2956 | mdecorde | !define NSD_RichEd_SetCustomBackgroundColor `${__NSD_MkCtlCmd_LP} EM_SETBKGNDCOLOR 0 ` ; LP:COLORREF |
633 | 2956 | mdecorde | !define NSD_RichEd_SetHideSelection `${__NSD_MkCtlCmd_WP} EM_HIDESELECTION 0 ` ; WP(BOOL):HideSelWithoutFocus (Toggles ES_NOHIDESEL & TXTBIT_HIDESELECTION) |
634 | 728 | mdecorde | |
635 | 728 | mdecorde | |
636 | 2956 | mdecorde | ### CheckBox ### |
637 | 728 | mdecorde | |
638 | 2956 | mdecorde | !define NSD_GetState `!insertmacro __NSD_GetState ` |
639 | 2956 | mdecorde | !macro __NSD_GetState CONTROL VAR |
640 | 2956 | mdecorde | SendMessage ${CONTROL} ${BM_GETCHECK} 0 0 ${VAR} |
641 | 728 | mdecorde | !macroend |
642 | 728 | mdecorde | |
643 | 728 | mdecorde | |
644 | 2956 | mdecorde | !define NSD_SetState `!insertmacro __NSD_SetState ` |
645 | 2956 | mdecorde | !macro __NSD_SetState CONTROL STATE |
646 | 2956 | mdecorde | SendMessage ${CONTROL} ${BM_SETCHECK} ${STATE} 0 |
647 | 2956 | mdecorde | !macroend |
648 | 728 | mdecorde | |
649 | 2956 | mdecorde | !define NSD_Check `!insertmacro __NSD_Check ` |
650 | 2956 | mdecorde | !macro __NSD_Check CONTROL |
651 | 2956 | mdecorde | ${NSD_SetState} ${CONTROL} ${BST_CHECKED} |
652 | 2956 | mdecorde | !macroend |
653 | 728 | mdecorde | |
654 | 2956 | mdecorde | |
655 | 2956 | mdecorde | !define NSD_Uncheck `!insertmacro __NSD_Uncheck ` |
656 | 2956 | mdecorde | !macro __NSD_Uncheck CONTROL |
657 | 2956 | mdecorde | ${NSD_SetState} ${CONTROL} ${BST_UNCHECKED} |
658 | 728 | mdecorde | !macroend |
659 | 728 | mdecorde | |
660 | 2956 | mdecorde | !define NSD_GetChecked `!insertmacro __NSD_GetState ` |
661 | 2956 | mdecorde | !define NSD_SetChecked `!insertmacro __NSD_SetState ` |
662 | 728 | mdecorde | |
663 | 728 | mdecorde | |
664 | 2956 | mdecorde | ### ComboBox ### |
665 | 728 | mdecorde | |
666 | 2956 | mdecorde | !define NSD_CB_AddString "!insertmacro _NSD_CB_AddString " |
667 | 2956 | mdecorde | !macro _NSD_CB_AddString CONTROL STRING |
668 | 2956 | mdecorde | SendMessage ${CONTROL} ${CB_ADDSTRING} 0 `STR:${STRING}` |
669 | 728 | mdecorde | !macroend |
670 | 728 | mdecorde | |
671 | 728 | mdecorde | |
672 | 2956 | mdecorde | !define NSD_CB_InsertString "!insertmacro _NSD_CB_InsertString " |
673 | 2956 | mdecorde | !macro _NSD_CB_InsertString CONTROL INDEX STRING |
674 | 2956 | mdecorde | SendMessage ${CONTROL} ${CB_INSERTSTRING} ${INDEX} `STR:${STRING}` |
675 | 2956 | mdecorde | !macroend |
676 | 728 | mdecorde | |
677 | 2956 | mdecorde | !define NSD_CB_PrependString "!insertmacro _NSD_CB_PrependString " |
678 | 2956 | mdecorde | !macro _NSD_CB_PrependString CONTROL STRING |
679 | 2956 | mdecorde | SendMessage ${CONTROL} ${CB_INSERTSTRING} 0 `STR:${STRING}` |
680 | 2956 | mdecorde | !macroend |
681 | 728 | mdecorde | |
682 | 2956 | mdecorde | !define NSD_CB_AppendString "!insertmacro _NSD_CB_AppendString " |
683 | 2956 | mdecorde | !macro _NSD_CB_AppendString CONTROL STRING |
684 | 2956 | mdecorde | SendMessage ${CONTROL} ${CB_INSERTSTRING} -1 `STR:${STRING}` |
685 | 728 | mdecorde | !macroend |
686 | 728 | mdecorde | |
687 | 728 | mdecorde | |
688 | 2956 | mdecorde | !define NSD_CB_SelectString "!insertmacro _NSD_CB_SelectString " |
689 | 2956 | mdecorde | !macro _NSD_CB_SelectString CONTROL STRING |
690 | 2956 | mdecorde | SendMessage ${CONTROL} ${CB_SELECTSTRING} -1 `STR:${STRING}` |
691 | 2956 | mdecorde | !macroend |
692 | 728 | mdecorde | |
693 | 728 | mdecorde | |
694 | 2956 | mdecorde | !define NSD_CB_GetSelectionIndex `!insertmacro __NSD_CB_GetSelectionIndex ` |
695 | 2956 | mdecorde | !macro __NSD_CB_GetSelectionIndex CONTROL VAR |
696 | 2956 | mdecorde | SendMessage ${CONTROL} ${CB_GETCURSEL} 0 0 ${VAR} |
697 | 728 | mdecorde | !macroend |
698 | 728 | mdecorde | |
699 | 728 | mdecorde | |
700 | 2956 | mdecorde | !define NSD_CB_SetSelectionIndex `!insertmacro __NSD_CB_SetSelectionIndex ` |
701 | 2956 | mdecorde | !macro __NSD_CB_SetSelectionIndex CONTROL INDEX |
702 | 2956 | mdecorde | SendMessage ${CONTROL} ${CB_SETCURSEL} ${INDEX} 0 |
703 | 2956 | mdecorde | !macroend |
704 | 728 | mdecorde | |
705 | 728 | mdecorde | |
706 | 2956 | mdecorde | !define NSD_CB_GetItemData `!insertmacro __NSD_CB_GetItemData ` |
707 | 2956 | mdecorde | !macro __NSD_CB_GetItemData CONTROL INDEX VAR |
708 | 2956 | mdecorde | SendMessage ${CONTROL} ${CB_GETITEMDATA} ${INDEX} 0 ${VAR} |
709 | 728 | mdecorde | !macroend |
710 | 2956 | mdecorde | !define NSD_CB_SetItemData `${__NSD_MkCtlCmd_WPLP} CB_SETITEMDATA ` ; Index Data |
711 | 728 | mdecorde | |
712 | 728 | mdecorde | |
713 | 2956 | mdecorde | !define NSD_CB_DelItem `${__NSD_MkCtlCmd_WP} CB_DELETESTRING 0 ` |
714 | 2956 | mdecorde | !define NSD_CB_LimitText `${__NSD_MkCtlCmd_WP} CB_LIMITTEXT 0 ` |
715 | 2956 | mdecorde | !define /IfNDef NSD_CB_Clear `${__NSD_MkCtlCmd} CB_RESETCONTENT 0 0 ` |
716 | 2956 | mdecorde | !define /IfNDef NSD_CB_GetCount `${__NSD_MkCtlCmd_RV} CB_GETCOUNT 0 0 ` |
717 | 2956 | mdecorde | !ifndef NSD_CB_DelString |
718 | 2956 | mdecorde | !define NSD_CB_DelString `!insertmacro __NSD_CB_DelString ` |
719 | 2956 | mdecorde | !macro __NSD_CB_DelString CONTROL STRING |
720 | 2956 | mdecorde | System::Call 'USER32::SendMessage(p${CONTROL},i${CB_FINDSTRINGEXACT},p-1,ts)p.s' `${STRING}` |
721 | 2956 | mdecorde | System::Call 'USER32::SendMessage(p${CONTROL},i${CB_DELETESTRING},ps,p0)' |
722 | 2956 | mdecorde | !macroend |
723 | 2956 | mdecorde | !endif |
724 | 2956 | mdecorde | ;define /IfNDef NSD_CB_GetSelection |
725 | 728 | mdecorde | |
726 | 2956 | mdecorde | |
727 | 2956 | mdecorde | ### ListBox ### |
728 | 2956 | mdecorde | |
729 | 2956 | mdecorde | !define NSD_LB_AddString "!insertmacro _NSD_LB_AddString " |
730 | 2956 | mdecorde | !macro _NSD_LB_AddString CONTROL STRING |
731 | 2956 | mdecorde | SendMessage ${CONTROL} ${LB_ADDSTRING} 0 `STR:${STRING}` |
732 | 728 | mdecorde | !macroend |
733 | 728 | mdecorde | |
734 | 728 | mdecorde | |
735 | 2956 | mdecorde | !define NSD_LB_InsertString "!insertmacro _NSD_LB_InsertString " |
736 | 2956 | mdecorde | !macro _NSD_LB_InsertString CONTROL INDEX STRING |
737 | 2956 | mdecorde | SendMessage ${CONTROL} ${LB_INSERTSTRING} ${INDEX} `STR:${STRING}` |
738 | 2956 | mdecorde | !macroend |
739 | 728 | mdecorde | |
740 | 2956 | mdecorde | !define NSD_LB_PrependString "!insertmacro _NSD_LB_PrependString " |
741 | 2956 | mdecorde | !macro _NSD_LB_PrependString CONTROL STRING |
742 | 2956 | mdecorde | SendMessage ${CONTROL} ${LB_INSERTSTRING} 0 `STR:${STRING}` |
743 | 2956 | mdecorde | !macroend |
744 | 728 | mdecorde | |
745 | 2956 | mdecorde | !define NSD_LB_AppendString "!insertmacro _NSD_LB_AppendString " |
746 | 2956 | mdecorde | !macro _NSD_LB_AppendString CONTROL STRING |
747 | 2956 | mdecorde | SendMessage ${CONTROL} ${LB_INSERTSTRING} -1 `STR:${STRING}` |
748 | 728 | mdecorde | !macroend |
749 | 728 | mdecorde | |
750 | 728 | mdecorde | |
751 | 2956 | mdecorde | !define NSD_LB_DelString `!insertmacro __NSD_LB_DelString ` |
752 | 2956 | mdecorde | !macro __NSD_LB_DelString CONTROL STRING |
753 | 2956 | mdecorde | System::Call 'USER32::SendMessage(p${CONTROL},i${LB_FINDSTRINGEXACT},p-1,ts)p.s' `${STRING}` |
754 | 2956 | mdecorde | System::Call 'USER32::SendMessage(p${CONTROL},i${LB_DELETESTRING},ps,p0)' |
755 | 2956 | mdecorde | !macroend |
756 | 728 | mdecorde | |
757 | 728 | mdecorde | |
758 | 2956 | mdecorde | !define NSD_LB_DelItem "!insertmacro __NSD_LB_DelItem " |
759 | 2956 | mdecorde | !macro __NSD_LB_DelItem CONTROL INDEX |
760 | 2956 | mdecorde | SendMessage ${CONTROL} ${LB_DELETESTRING} ${INDEX} 0 |
761 | 728 | mdecorde | !macroend |
762 | 728 | mdecorde | |
763 | 728 | mdecorde | |
764 | 2956 | mdecorde | !define NSD_LB_Clear `${__NSD_MkCtlCmd} LB_RESETCONTENT 0 0 ` |
765 | 728 | mdecorde | |
766 | 728 | mdecorde | |
767 | 2956 | mdecorde | !define NSD_LB_GetCount `!insertmacro __NSD_LB_GetCount ` |
768 | 2956 | mdecorde | !macro __NSD_LB_GetCount CONTROL VAR |
769 | 2956 | mdecorde | SendMessage ${CONTROL} ${LB_GETCOUNT} 0 0 ${VAR} |
770 | 728 | mdecorde | !macroend |
771 | 728 | mdecorde | |
772 | 728 | mdecorde | |
773 | 2956 | mdecorde | !define NSD_LB_SelectString "!insertmacro _NSD_LB_SelectString " |
774 | 2956 | mdecorde | !macro _NSD_LB_SelectString CONTROL STRING |
775 | 2956 | mdecorde | SendMessage ${CONTROL} ${LB_SELECTSTRING} -1 `STR:${STRING}` |
776 | 2956 | mdecorde | !macroend |
777 | 728 | mdecorde | |
778 | 728 | mdecorde | |
779 | 2956 | mdecorde | !define NSD_LB_GetSelection `!insertmacro __NSD_LB_GetSelection ` |
780 | 2956 | mdecorde | !macro __NSD_LB_GetSelection CONTROL VAR |
781 | 2956 | mdecorde | SendMessage ${CONTROL} ${LB_GETCURSEL} 0 0 ${VAR} |
782 | 2956 | mdecorde | System::Call 'user32::SendMessage(p ${CONTROL}, i ${LB_GETTEXT}, p ${VAR}, t .s)' |
783 | 2956 | mdecorde | Pop ${VAR} |
784 | 728 | mdecorde | !macroend |
785 | 728 | mdecorde | |
786 | 728 | mdecorde | |
787 | 2956 | mdecorde | !define NSD_LB_GetSelectionIndex `!insertmacro __NSD_LB_GetSelectionIndex ` |
788 | 2956 | mdecorde | !macro __NSD_LB_GetSelectionIndex CONTROL VAR |
789 | 2956 | mdecorde | SendMessage ${CONTROL} ${LB_GETCURSEL} 0 0 ${VAR} |
790 | 2956 | mdecorde | !macroend |
791 | 728 | mdecorde | |
792 | 728 | mdecorde | |
793 | 2956 | mdecorde | !define NSD_LB_SetSelectionIndex `!insertmacro __NSD_LB_SetSelectionIndex ` |
794 | 2956 | mdecorde | !macro __NSD_LB_SetSelectionIndex CONTROL INDEX |
795 | 2956 | mdecorde | SendMessage ${CONTROL} ${LB_SETCURSEL} ${INDEX} 0 |
796 | 728 | mdecorde | !macroend |
797 | 728 | mdecorde | |
798 | 728 | mdecorde | |
799 | 2956 | mdecorde | !define NSD_LB_GetSelectionCount `!insertmacro __NSD_LB_GetSelectionCount ` |
800 | 2956 | mdecorde | !macro __NSD_LB_GetSelectionCount CONTROL VAR |
801 | 2956 | mdecorde | SendMessage ${CONTROL} ${LB_GETSELCOUNT} 0 0 ${VAR} |
802 | 2956 | mdecorde | !macroend |
803 | 728 | mdecorde | |
804 | 728 | mdecorde | |
805 | 2956 | mdecorde | !define NSD_LB_GetItemText `!insertmacro __NSD_LB_GetItemText ` |
806 | 2956 | mdecorde | !macro __NSD_LB_GetItemText CONTROL INDEX VAR |
807 | 2956 | mdecorde | System::Call 'user32::SendMessage(p${CONTROL}, i${LB_GETTEXT}, p${INDEX}, t.s)' |
808 | 2956 | mdecorde | Pop ${VAR} |
809 | 728 | mdecorde | !macroend |
810 | 728 | mdecorde | |
811 | 728 | mdecorde | |
812 | 2956 | mdecorde | !define NSD_LB_GetItemData `!insertmacro __NSD_LB_GetItemData ` |
813 | 2956 | mdecorde | !macro __NSD_LB_GetItemData CONTROL INDEX VAR |
814 | 2956 | mdecorde | SendMessage ${CONTROL} ${LB_GETITEMDATA} ${INDEX} 0 ${VAR} |
815 | 2956 | mdecorde | !macroend |
816 | 2956 | mdecorde | !define NSD_LB_SetItemData `${__NSD_MkCtlCmd_WPLP} LB_SETITEMDATA ` ; Index Data |
817 | 728 | mdecorde | |
818 | 728 | mdecorde | |
819 | 2956 | mdecorde | !define NSD_LB_FindStringPrefix `!insertmacro __NSD_LB_FindStringPrefix ` |
820 | 2956 | mdecorde | !macro __NSD_LB_FindStringPrefix CONTROL STRING VAR |
821 | 2956 | mdecorde | SendMessage ${CONTROL} ${LB_FINDSTRING} -1 `STR:${STRING}` ${VAR} |
822 | 728 | mdecorde | !macroend |
823 | 728 | mdecorde | |
824 | 728 | mdecorde | |
825 | 2956 | mdecorde | !define NSD_LB_FindStringExact `!insertmacro __NSD_LB_FindStringExact ` |
826 | 2956 | mdecorde | !macro __NSD_LB_FindStringExact CONTROL STRING VAR |
827 | 2956 | mdecorde | SendMessage ${CONTROL} ${LB_FINDSTRINGEXACT} -1 `STR:${STRING}` ${VAR} |
828 | 2956 | mdecorde | !macroend |
829 | 728 | mdecorde | |
830 | 728 | mdecorde | |
831 | 2956 | mdecorde | ### ProgressBar ### |
832 | 2956 | mdecorde | |
833 | 2956 | mdecorde | !define NSD_ProgressBar_SetPos `${__NSD_MkCtlCmd_WP} PBM_SETPOS 0 ` |
834 | 2956 | mdecorde | !define NSD_ProgressBar_SetStep `${__NSD_MkCtlCmd_WP} PBM_SETSTEP 0 ` |
835 | 2956 | mdecorde | !define NSD_ProgressBar_StepIt `${__NSD_MkCtlCmd} PBM_STEPIT 0 0 ` |
836 | 2956 | mdecorde | !define NSD_ProgressBar_AdvanceBy `${__NSD_MkCtlCmd_WP} PBM_DELTAPOS 0 ` |
837 | 2956 | mdecorde | !define NSD_ProgressBar_SetPackedRange `${__NSD_MkCtlCmd_LP} PBM_SETRANGE 0 ` ; LP(DWORD):MAKELONG(min,max) |
838 | 2956 | mdecorde | !define NSD_ProgressBar_SetRange32 `${__NSD_MkCtlCmd_WPLP} PBM_SETRANGE32 ` ; [IE3+] WP:min LP:max |
839 | 2956 | mdecorde | !define NSD_ProgressBar_GetPos `${__NSD_MkCtlCmd_RV} PBM_GETPOS 0 0 ` ; [IE3+] |
840 | 2956 | mdecorde | |
841 | 2956 | mdecorde | |
842 | 2956 | mdecorde | ### Animation ### |
843 | 2956 | mdecorde | |
844 | 2956 | mdecorde | !define NSD_Anim_Close `${__NSD_MkCtlCmd} ACM_OPEN 0 0 ` |
845 | 2956 | mdecorde | !define NSD_Anim_Play `${__NSD_MkCtlCmd} ACM_PLAY -1 0xFFFF0000 ` |
846 | 2956 | mdecorde | !define NSD_Anim_PlayLoops `${__NSD_MkCtlCmd_WP} ACM_PLAY 0xFFFF0000 ` ; WP(UINT16):LoopCount |
847 | 2956 | mdecorde | !define NSD_Anim_Stop `${__NSD_MkCtlCmd} ACM_STOP 0 0 ` |
848 | 2956 | mdecorde | !define NSD_Anim_IsPlaying `${__NSD_MkCtlCmd_RV} ACM_ISPLAYING 0 0 ` |
849 | 2956 | mdecorde | |
850 | 2956 | mdecorde | !define NSD_Anim_OpenFile `!insertmacro __NSD_Anim_OpenFile ` |
851 | 2956 | mdecorde | !macro __NSD_Anim_OpenFile CONTROL PATH |
852 | 2956 | mdecorde | SendMessage ${CONTROL} ${ACM_OPEN} 0 "STR:${PATH}" |
853 | 728 | mdecorde | !macroend |
854 | 728 | mdecorde | |
855 | 2956 | mdecorde | !define NSD_Anim_OpenResource `!insertmacro __NSD_Anim_OpenResource ` |
856 | 2956 | mdecorde | !macro __NSD_Anim_OpenResource CONTROL HINSTANCE_CC471 RESID |
857 | 2956 | mdecorde | SendMessage ${CONTROL} ${ACM_OPEN} "${HINSTANCE_CC471}" "${RESID}" |
858 | 2956 | mdecorde | !macroend |
859 | 728 | mdecorde | |
860 | 728 | mdecorde | |
861 | 2956 | mdecorde | ### TrackBar ### |
862 | 728 | mdecorde | |
863 | 2956 | mdecorde | !define NSD_TrackBar_GetPos `${__NSD_MkCtlCmd_RV} TBM_GETPOS 0 0 ` |
864 | 2956 | mdecorde | !define NSD_TrackBar_SetPos `${__NSD_MkCtlCmd_LP} TBM_SETPOS 1 ` |
865 | 2956 | mdecorde | !define NSD_TrackBar_SetRangeMin `${__NSD_MkCtlCmd_LP} TBM_SETRANGEMIN 1 ` |
866 | 2956 | mdecorde | !define NSD_TrackBar_SetRangeMax `${__NSD_MkCtlCmd_LP} TBM_SETRANGEMAX 1 ` |
867 | 2956 | mdecorde | !define NSD_TrackBar_GetLineSize `${__NSD_MkCtlCmd_RV} TBM_GETLINESIZE 0 0 ` |
868 | 2956 | mdecorde | !define NSD_TrackBar_SetLineSize `${__NSD_MkCtlCmd_LP} TBM_SETLINESIZE 0 ` |
869 | 2956 | mdecorde | !define NSD_TrackBar_GetPageSize `${__NSD_MkCtlCmd_RV} TBM_GETPAGESIZE 0 0 ` |
870 | 2956 | mdecorde | !define NSD_TrackBar_SetPageSize `${__NSD_MkCtlCmd_LP} TBM_SETPAGESIZE 0 ` |
871 | 2956 | mdecorde | !define NSD_TrackBar_ClearTics `${__NSD_MkCtlCmd} TBM_CLEARTICS 0 0 ` |
872 | 2956 | mdecorde | !define NSD_TrackBar_GetNumTics `${__NSD_MkCtlCmd_RV} TBM_GETNUMTICS 0 0 ` |
873 | 2956 | mdecorde | !define NSD_TrackBar_SetTic `${__NSD_MkCtlCmd_LP} TBM_SETTIC 0 ` |
874 | 2956 | mdecorde | !define NSD_TrackBar_SetTicFreq `${__NSD_MkCtlCmd_WP} TBM_SETTICFREQ 0 ` |
875 | 2956 | mdecorde | !define NSD_TrackBar_GetThumbLength `${__NSD_MkCtlCmd_RV} TBM_GETTHUMBLENGTH 0 0 ` |
876 | 2956 | mdecorde | !define NSD_TrackBar_SetBuddy `${__NSD_MkCtlCmd_WPLP} TBM_SETBUDDY ` ; WP(BOOL):Left/Right LP:HWND |
877 | 728 | mdecorde | |
878 | 728 | mdecorde | |
879 | 2956 | mdecorde | ### UpDown ### |
880 | 728 | mdecorde | |
881 | 2956 | mdecorde | !define NSD_UD_SetBuddy `${__NSD_MkCtlCmd_WP} UDM_SETBUDDY 0 ` |
882 | 2956 | mdecorde | !define NSD_UD_GetPos `${__NSD_MkCtlCmd_RV} UDM_GETPOS 0 0 ` |
883 | 2956 | mdecorde | !define NSD_UD_SetPos `${__NSD_MkCtlCmd_LP} UDM_SETPOS 0 ` |
884 | 2956 | mdecorde | !define NSD_UD_GetPackedRange `${__NSD_MkCtlCmd_RV} UDM_GETRANGE 0 0 ` |
885 | 2956 | mdecorde | !define NSD_UD_SetPackedRange `${__NSD_MkCtlCmd_LP} UDM_SETRANGE 0 ` ; LP(DWORD):MAKELONG(min,max) |
886 | 2956 | mdecorde | !define NSD_UD_GetPos32 `${__NSD_MkCtlCmd_RV} UDM_GETPOS32 0 0 ` |
887 | 2956 | mdecorde | !define NSD_UD_SetPos32 `${__NSD_MkCtlCmd_LP} UDM_SETPOS32 0 ` |
888 | 2956 | mdecorde | !define NSD_UD_SetRange32 `${__NSD_MkCtlCmd_WPLP} UDM_SETRANGE32 ` ; WP(INT32):min LP(INT32):max |
889 | 728 | mdecorde | |
890 | 2956 | mdecorde | !define NSD_UD_GetRange32 `!insertmacro __NSD_UD_GetRange32 ` |
891 | 2956 | mdecorde | !macro __NSD_UD_GetRange32 CONTROL OUTLO OUTHI |
892 | 2956 | mdecorde | System::Call 'USER32::SendMessage(p${CONTROL},i${UDM_GETRANGE32},*i.s,*i.s)' |
893 | 2956 | mdecorde | Pop ${OUTLO} |
894 | 2956 | mdecorde | Pop ${OUTHI} |
895 | 728 | mdecorde | !macroend |
896 | 728 | mdecorde | |
897 | 2956 | mdecorde | !define NSD_UD_SetStaticRange `!insertmacro __NSD_UD_SetStaticRange ` |
898 | 2956 | mdecorde | !macro __NSD_UD_SetStaticRange CONTROL MI MA |
899 | 2956 | mdecorde | !define /redef /math MI ${MI} << 16 |
900 | 2956 | mdecorde | !define /redef /math MA ${MA} & 0xffff |
901 | 2956 | mdecorde | !define /redef /math MA ${MI} | ${MA} |
902 | 2956 | mdecorde | SendMessage ${CONTROL} ${UDM_SETRANGE} 0 ${MA} |
903 | 728 | mdecorde | !macroend |
904 | 728 | mdecorde | |
905 | 728 | mdecorde | |
906 | 2956 | mdecorde | ### HotKey ### |
907 | 728 | mdecorde | |
908 | 2956 | mdecorde | !define NSD_HK_GetHotKey `${__NSD_MkCtlCmd_RV} HKM_GETHOTKEY 0 0 ` ; RV(WORD):MAKEWORD(VK,HOTKEYF) |
909 | 2956 | mdecorde | !define NSD_HK_SetHotKey `${__NSD_MkCtlCmd_WP} HKM_SETHOTKEY 0 ` |
910 | 2956 | mdecorde | !define NSD_HK_SetRules `${__NSD_MkCtlCmd_WPLP} HKM_SETRULES ` |
911 | 728 | mdecorde | |
912 | 728 | mdecorde | |
913 | 2956 | mdecorde | ### IP Address ### |
914 | 728 | mdecorde | |
915 | 2956 | mdecorde | !define NSD_IPAddress_Clear `${__NSD_MkCtlCmd} IPM_CLEARADDRESS 0 0 ` |
916 | 2956 | mdecorde | !define NSD_IPAddress_SetPackedIPv4 `${__NSD_MkCtlCmd_LP} IPM_SETADDRESS 0 ` |
917 | 2956 | mdecorde | !define NSD_IPAddress_IsBlank `${__NSD_MkCtlCmd_RV} IPM_ISBLANK 0 0 ` |
918 | 728 | mdecorde | |
919 | 2956 | mdecorde | !define NSD_IPAddress_GetPackedIPv4 `!insertmacro __NSD_IPAddress_GetPackedIPv4 ` |
920 | 2956 | mdecorde | !macro __NSD_IPAddress_GetPackedIPv4 CONTROL VAR |
921 | 2956 | mdecorde | System::Call 'USER32::SendMessage(p${CONTROL},i${IPM_GETADDRESS},p0,*i0s)' |
922 | 2956 | mdecorde | Pop ${VAR} |
923 | 2956 | mdecorde | !macroend |
924 | 728 | mdecorde | |
925 | 728 | mdecorde | |
926 | 2956 | mdecorde | ### Date ### |
927 | 2956 | mdecorde | !define NSD_Date_GetDateFields `!insertmacro __NSD_Date_GetDateFields ` |
928 | 2956 | mdecorde | !macro __NSD_Date_GetDateFields CONTROL |
929 | 2956 | mdecorde | Push $0 |
930 | 2956 | mdecorde | System::Call 'USER32::SendMessage(p${CONTROL},i${DTM_GETSYSTEMTIME},p0,@r0)' |
931 | 2956 | mdecorde | System::Call '*$0(&i2.s,&i2.s,&i2,&i2.s)' |
932 | 2956 | mdecorde | Exch 3 |
933 | 2956 | mdecorde | Pop $0 |
934 | 2956 | mdecorde | !macroend |
935 | 728 | mdecorde | |
936 | 2956 | mdecorde | !define NSD_Time_GetTimeFields `!insertmacro __NSD_Time_GetTimeFields ` |
937 | 2956 | mdecorde | !macro __NSD_Time_GetTimeFields CONTROL |
938 | 2956 | mdecorde | Push $0 |
939 | 2956 | mdecorde | System::Call 'USER32::SendMessage(p${CONTROL},i${DTM_GETSYSTEMTIME},p0,@r0)' |
940 | 2956 | mdecorde | System::Call '*$0(&i2,&i2,&i2,&i2,&i2.s,&i2.s,&i2.s)' |
941 | 2956 | mdecorde | Exch 3 |
942 | 2956 | mdecorde | Pop $0 |
943 | 2956 | mdecorde | Exch |
944 | 2956 | mdecorde | !macroend |
945 | 728 | mdecorde | |
946 | 728 | mdecorde | |
947 | 2956 | mdecorde | ### Static ### |
948 | 728 | mdecorde | |
949 | 2956 | mdecorde | !macro __NSD_LoadAndSetImage _LIHINSTMODE _IMGTYPE _LIHINSTSRC _LIFLAGS CONTROL IMAGE HANDLE |
950 | 2956 | mdecorde | !if "${_LIHINSTMODE}" == "exeresource" |
951 | 2956 | mdecorde | LoadAndSetImage /EXERESOURCE /STRINGID "${CONTROL}" ${_IMGTYPE} ${_LIFLAGS} "${IMAGE}" ${HANDLE} |
952 | 2956 | mdecorde | !else #if "${_LIHINSTMODE}" == "file" |
953 | 2956 | mdecorde | LoadAndSetImage /STRINGID "${CONTROL}" ${_IMGTYPE} ${_LIFLAGS} "${IMAGE}" ${HANDLE} |
954 | 2956 | mdecorde | !endif |
955 | 2956 | mdecorde | !macroend |
956 | 728 | mdecorde | |
957 | 2956 | mdecorde | !macro __NSD_SetIconFromExeResource CONTROL IMAGE HANDLE |
958 | 2956 | mdecorde | LoadAndSetImage /EXERESOURCE /STRINGID "${CONTROL}" ${IMAGE_ICON} ${LR_DEFAULTSIZE} "${IMAGE}" ${HANDLE} |
959 | 728 | mdecorde | !macroend |
960 | 728 | mdecorde | |
961 | 2956 | mdecorde | !macro __NSD_SetIconFromInstaller CONTROL HANDLE |
962 | 2956 | mdecorde | LoadAndSetImage /EXERESOURCE "${CONTROL}" ${IMAGE_ICON} ${LR_DEFAULTSIZE} 103 ${HANDLE} |
963 | 2956 | mdecorde | !macroend |
964 | 728 | mdecorde | |
965 | 2956 | mdecorde | !define NSD_SetImage `!insertmacro __NSD_LoadAndSetImage file ${IMAGE_BITMAP} 0 "${LR_LOADFROMFILE}" ` |
966 | 2956 | mdecorde | !define NSD_SetBitmap `${NSD_SetImage} ` |
967 | 728 | mdecorde | |
968 | 2956 | mdecorde | !define NSD_SetIcon `!insertmacro __NSD_LoadAndSetImage file ${IMAGE_ICON} 0 "${LR_LOADFROMFILE}|${LR_DEFAULTSIZE}" ` |
969 | 2956 | mdecorde | !define NSD_SetIconFromExeResource `!insertmacro __NSD_SetIconFromExeResource ` |
970 | 2956 | mdecorde | !define NSD_SetIconFromInstaller `!insertmacro __NSD_SetIconFromInstaller ` |
971 | 728 | mdecorde | |
972 | 728 | mdecorde | |
973 | 2956 | mdecorde | !define NSD_SetStretchedImage `!insertmacro __NSD_SetStretchedImage ` |
974 | 2956 | mdecorde | !define NSD_SetStretchedBitmap `!insertmacro __NSD_SetStretchedImage ` |
975 | 2956 | mdecorde | !macro __NSD_SetStretchedImage CONTROL IMAGE HANDLE |
976 | 2956 | mdecorde | LoadAndSetImage /STRINGID /RESIZETOFIT "${CONTROL}" ${IMAGE_BITMAP} ${LR_LOADFROMFILE} "${IMAGE}" ${HANDLE} |
977 | 2956 | mdecorde | !macroend |
978 | 2956 | mdecorde | |
979 | 2956 | mdecorde | |
980 | 2956 | mdecorde | !define NSD_FreeImage `!insertmacro __NSD_FreeImage ` |
981 | 2956 | mdecorde | !define NSD_FreeBitmap `${NSD_FreeImage} ` |
982 | 2956 | mdecorde | !macro __NSD_FreeImage IMAGE |
983 | 2956 | mdecorde | ${If} ${IMAGE} P<> 0 |
984 | 2956 | mdecorde | System::Call gdi32::DeleteObject(ps) ${IMAGE} |
985 | 728 | mdecorde | ${EndIf} |
986 | 728 | mdecorde | !macroend |
987 | 728 | mdecorde | |
988 | 728 | mdecorde | |
989 | 2956 | mdecorde | !define NSD_FreeIcon `!insertmacro __NSD_FreeIcon ` |
990 | 728 | mdecorde | !macro __NSD_FreeIcon IMAGE |
991 | 2956 | mdecorde | System::Call user32::DestroyIcon(ps) ${IMAGE} |
992 | 728 | mdecorde | !macroend |
993 | 728 | mdecorde | |
994 | 728 | mdecorde | |
995 | 2956 | mdecorde | !define NSD_ClearImage `!insertmacro __NSD_ClearImage ${IMAGE_BITMAP} ` |
996 | 2956 | mdecorde | !define NSD_ClearBitmap `${NSD_ClearImage} ` |
997 | 2956 | mdecorde | !define NSD_ClearIcon `!insertmacro __NSD_ClearImage ${IMAGE_ICON } ` |
998 | 728 | mdecorde | !macro __NSD_ClearImage _IMGTYPE CONTROL |
999 | 728 | mdecorde | SendMessage ${CONTROL} ${STM_SETIMAGE} ${_IMGTYPE} 0 |
1000 | 728 | mdecorde | !macroend |
1001 | 728 | mdecorde | |
1002 | 728 | mdecorde | |
1003 | 2956 | mdecorde | ### INI ### |
1004 | 728 | mdecorde | |
1005 | 2956 | mdecorde | !define /IfNDef NSD_Debug `System::Call kernel32::OutputDebugString(ts)` |
1006 | 728 | mdecorde | |
1007 | 728 | mdecorde | !macro __NSD_ControlCase TYPE |
1008 | 728 | mdecorde | ${Case} ${TYPE} |
1009 | 728 | mdecorde | ${NSD_Create${TYPE}} $R3u $R4u $R5u $R6u $R7 |
1010 | 728 | mdecorde | Pop $R9 |
1011 | 728 | mdecorde | ${Break} |
1012 | 728 | mdecorde | !macroend |
1013 | 728 | mdecorde | |
1014 | 728 | mdecorde | !macro __NSD_ControlCaseEx TYPE |
1015 | 728 | mdecorde | ${Case} ${TYPE} |
1016 | 728 | mdecorde | Call ${TYPE} |
1017 | 728 | mdecorde | ${Break} |
1018 | 728 | mdecorde | !macroend |
1019 | 728 | mdecorde | |
1020 | 728 | mdecorde | !macro NSD_FUNCTION_INIFILE |
1021 | 728 | mdecorde | !insertmacro NSD_INIFILE "" |
1022 | 728 | mdecorde | !macroend |
1023 | 728 | mdecorde | |
1024 | 728 | mdecorde | !macro NSD_UNFUNCTION_INIFILE |
1025 | 728 | mdecorde | !insertmacro NSD_INIFILE un. |
1026 | 728 | mdecorde | !macroend |
1027 | 728 | mdecorde | |
1028 | 728 | mdecorde | !macro NSD_INIFILE UNINSTALLER_FUNCPREFIX |
1029 | 728 | mdecorde | |
1030 | 728 | mdecorde | ;Functions to create dialogs based on old InstallOptions INI files |
1031 | 728 | mdecorde | |
1032 | 728 | mdecorde | Function ${UNINSTALLER_FUNCPREFIX}CreateDialogFromINI |
1033 | 728 | mdecorde | |
1034 | 728 | mdecorde | # $0 = ini |
1035 | 728 | mdecorde | |
1036 | 728 | mdecorde | ReadINIStr $R0 $0 Settings RECT |
1037 | 728 | mdecorde | ${If} $R0 == "" |
1038 | 728 | mdecorde | StrCpy $R0 1018 |
1039 | 728 | mdecorde | ${EndIf} |
1040 | 728 | mdecorde | |
1041 | 728 | mdecorde | nsDialogs::Create $R0 |
1042 | 728 | mdecorde | Pop $R9 |
1043 | 728 | mdecorde | |
1044 | 728 | mdecorde | ReadINIStr $R0 $0 Settings RTL |
1045 | 728 | mdecorde | nsDialogs::SetRTL $R0 |
1046 | 728 | mdecorde | |
1047 | 728 | mdecorde | ReadINIStr $R0 $0 Settings NumFields |
1048 | 728 | mdecorde | |
1049 | 2956 | mdecorde | ${NSD_Debug} "NumFields = $R0" |
1050 | 728 | mdecorde | |
1051 | 728 | mdecorde | ${For} $R1 1 $R0 |
1052 | 2956 | mdecorde | ${NSD_Debug} "Creating field $R1" |
1053 | 728 | mdecorde | ReadINIStr $R2 $0 "Field $R1" Type |
1054 | 2956 | mdecorde | ${NSD_Debug} " Type = $R2" |
1055 | 728 | mdecorde | ReadINIStr $R3 $0 "Field $R1" Left |
1056 | 2956 | mdecorde | ${NSD_Debug} " Left = $R3" |
1057 | 728 | mdecorde | ReadINIStr $R4 $0 "Field $R1" Top |
1058 | 2956 | mdecorde | ${NSD_Debug} " Top = $R4" |
1059 | 728 | mdecorde | ReadINIStr $R5 $0 "Field $R1" Right |
1060 | 2956 | mdecorde | ${NSD_Debug} " Right = $R5" |
1061 | 728 | mdecorde | ReadINIStr $R6 $0 "Field $R1" Bottom |
1062 | 2956 | mdecorde | ${NSD_Debug} " Bottom = $R6" |
1063 | 728 | mdecorde | IntOp $R5 $R5 - $R3 |
1064 | 2956 | mdecorde | ${NSD_Debug} " Width = $R5" |
1065 | 728 | mdecorde | IntOp $R6 $R6 - $R4 |
1066 | 2956 | mdecorde | ${NSD_Debug} " Height = $R6" |
1067 | 728 | mdecorde | ReadINIStr $R7 $0 "Field $R1" Text |
1068 | 2956 | mdecorde | ${NSD_Debug} " Text = $R7" |
1069 | 728 | mdecorde | ${Switch} $R2 |
1070 | 728 | mdecorde | !insertmacro __NSD_ControlCase HLine |
1071 | 728 | mdecorde | !insertmacro __NSD_ControlCase VLine |
1072 | 728 | mdecorde | !insertmacro __NSD_ControlCase Label |
1073 | 728 | mdecorde | !insertmacro __NSD_ControlCase Icon |
1074 | 728 | mdecorde | !insertmacro __NSD_ControlCase Bitmap |
1075 | 728 | mdecorde | !insertmacro __NSD_ControlCaseEx Link |
1076 | 728 | mdecorde | !insertmacro __NSD_ControlCase Button |
1077 | 728 | mdecorde | !insertmacro __NSD_ControlCase GroupBox |
1078 | 728 | mdecorde | !insertmacro __NSD_ControlCase CheckBox |
1079 | 728 | mdecorde | !insertmacro __NSD_ControlCase RadioButton |
1080 | 728 | mdecorde | !insertmacro __NSD_ControlCase Text |
1081 | 728 | mdecorde | !insertmacro __NSD_ControlCase Password |
1082 | 728 | mdecorde | !insertmacro __NSD_ControlCaseEx FileRequest |
1083 | 728 | mdecorde | !insertmacro __NSD_ControlCaseEx DirRequest |
1084 | 728 | mdecorde | !insertmacro __NSD_ControlCase ComboBox |
1085 | 728 | mdecorde | !insertmacro __NSD_ControlCase DropList |
1086 | 728 | mdecorde | !insertmacro __NSD_ControlCase ListBox |
1087 | 728 | mdecorde | ${EndSwitch} |
1088 | 728 | mdecorde | |
1089 | 728 | mdecorde | WriteINIStr $0 "Field $R1" HWND $R9 |
1090 | 728 | mdecorde | ${Next} |
1091 | 728 | mdecorde | |
1092 | 728 | mdecorde | nsDialogs::Show |
1093 | 728 | mdecorde | |
1094 | 728 | mdecorde | FunctionEnd |
1095 | 728 | mdecorde | |
1096 | 728 | mdecorde | Function ${UNINSTALLER_FUNCPREFIX}UpdateINIState |
1097 | 728 | mdecorde | |
1098 | 2956 | mdecorde | ${NSD_Debug} "Updating INI state" |
1099 | 728 | mdecorde | |
1100 | 728 | mdecorde | ReadINIStr $R0 $0 Settings NumFields |
1101 | 728 | mdecorde | |
1102 | 2956 | mdecorde | ${NSD_Debug} "NumField = $R0" |
1103 | 728 | mdecorde | |
1104 | 728 | mdecorde | ${For} $R1 1 $R0 |
1105 | 728 | mdecorde | ReadINIStr $R2 $0 "Field $R1" HWND |
1106 | 728 | mdecorde | ReadINIStr $R3 $0 "Field $R1" "Type" |
1107 | 728 | mdecorde | ${Switch} $R3 |
1108 | 728 | mdecorde | ${Case} "CheckBox" |
1109 | 728 | mdecorde | ${Case} "RadioButton" |
1110 | 2956 | mdecorde | ${NSD_Debug} " HWND = $R2" |
1111 | 728 | mdecorde | ${NSD_GetState} $R2 $R2 |
1112 | 2956 | mdecorde | ${NSD_Debug} " Window selection = $R2" |
1113 | 728 | mdecorde | ${Break} |
1114 | 728 | mdecorde | ${CaseElse} |
1115 | 2956 | mdecorde | ${NSD_Debug} " HWND = $R2" |
1116 | 728 | mdecorde | ${NSD_GetText} $R2 $R2 |
1117 | 2956 | mdecorde | ${NSD_Debug} " Window text = $R2" |
1118 | 728 | mdecorde | ${Break} |
1119 | 728 | mdecorde | ${EndSwitch} |
1120 | 728 | mdecorde | WriteINIStr $0 "Field $R1" STATE $R2 |
1121 | 728 | mdecorde | ${Next} |
1122 | 728 | mdecorde | |
1123 | 728 | mdecorde | FunctionEnd |
1124 | 728 | mdecorde | |
1125 | 728 | mdecorde | Function ${UNINSTALLER_FUNCPREFIX}FileRequest |
1126 | 728 | mdecorde | |
1127 | 728 | mdecorde | IntOp $R5 $R5 - 15 |
1128 | 728 | mdecorde | IntOp $R8 $R3 + $R5 |
1129 | 728 | mdecorde | |
1130 | 728 | mdecorde | ${NSD_CreateBrowseButton} $R8u $R4u 15u $R6u ... |
1131 | 728 | mdecorde | Pop $R8 |
1132 | 728 | mdecorde | |
1133 | 728 | mdecorde | nsDialogs::SetUserData $R8 $R1 # remember field id |
1134 | 728 | mdecorde | |
1135 | 728 | mdecorde | WriteINIStr $0 "Field $R1" HWND2 $R8 |
1136 | 728 | mdecorde | |
1137 | 728 | mdecorde | ${NSD_OnClick} $R8 ${UNINSTALLER_FUNCPREFIX}OnFileBrowseButton |
1138 | 728 | mdecorde | |
1139 | 728 | mdecorde | ReadINIStr $R9 $0 "Field $R1" State |
1140 | 728 | mdecorde | |
1141 | 728 | mdecorde | ${NSD_CreateFileRequest} $R3u $R4u $R5u $R6u $R9 |
1142 | 728 | mdecorde | Pop $R9 |
1143 | 728 | mdecorde | |
1144 | 728 | mdecorde | FunctionEnd |
1145 | 728 | mdecorde | |
1146 | 728 | mdecorde | Function ${UNINSTALLER_FUNCPREFIX}DirRequest |
1147 | 728 | mdecorde | |
1148 | 728 | mdecorde | IntOp $R5 $R5 - 15 |
1149 | 728 | mdecorde | IntOp $R8 $R3 + $R5 |
1150 | 728 | mdecorde | |
1151 | 728 | mdecorde | ${NSD_CreateBrowseButton} $R8u $R4u 15u $R6u ... |
1152 | 728 | mdecorde | Pop $R8 |
1153 | 728 | mdecorde | |
1154 | 728 | mdecorde | nsDialogs::SetUserData $R8 $R1 # remember field id |
1155 | 728 | mdecorde | |
1156 | 728 | mdecorde | WriteINIStr $0 "Field $R1" HWND2 $R8 |
1157 | 728 | mdecorde | |
1158 | 728 | mdecorde | ${NSD_OnClick} $R8 ${UNINSTALLER_FUNCPREFIX}OnDirBrowseButton |
1159 | 728 | mdecorde | |
1160 | 728 | mdecorde | ReadINIStr $R9 $0 "Field $R1" State |
1161 | 728 | mdecorde | |
1162 | 728 | mdecorde | ${NSD_CreateFileRequest} $R3u $R4u $R5u $R6u $R9 |
1163 | 728 | mdecorde | Pop $R9 |
1164 | 728 | mdecorde | |
1165 | 728 | mdecorde | FunctionEnd |
1166 | 728 | mdecorde | |
1167 | 728 | mdecorde | Function ${UNINSTALLER_FUNCPREFIX}OnFileBrowseButton |
1168 | 728 | mdecorde | |
1169 | 728 | mdecorde | Pop $R0 |
1170 | 728 | mdecorde | |
1171 | 728 | mdecorde | nsDialogs::GetUserData $R0 |
1172 | 728 | mdecorde | Pop $R1 |
1173 | 728 | mdecorde | |
1174 | 728 | mdecorde | ReadINIStr $R2 $0 "Field $R1" HWND |
1175 | 728 | mdecorde | ReadINIStr $R4 $0 "Field $R1" Filter |
1176 | 728 | mdecorde | |
1177 | 728 | mdecorde | ${NSD_GetText} $R2 $R3 |
1178 | 728 | mdecorde | |
1179 | 728 | mdecorde | nsDialogs::SelectFileDialog save $R3 $R4 |
1180 | 728 | mdecorde | Pop $R3 |
1181 | 728 | mdecorde | |
1182 | 728 | mdecorde | ${If} $R3 != "" |
1183 | 728 | mdecorde | SendMessage $R2 ${WM_SETTEXT} 0 STR:$R3 |
1184 | 728 | mdecorde | ${EndIf} |
1185 | 728 | mdecorde | |
1186 | 728 | mdecorde | FunctionEnd |
1187 | 728 | mdecorde | |
1188 | 728 | mdecorde | Function ${UNINSTALLER_FUNCPREFIX}OnDirBrowseButton |
1189 | 728 | mdecorde | |
1190 | 728 | mdecorde | Pop $R0 |
1191 | 728 | mdecorde | |
1192 | 728 | mdecorde | nsDialogs::GetUserData $R0 |
1193 | 728 | mdecorde | Pop $R1 |
1194 | 728 | mdecorde | |
1195 | 728 | mdecorde | ReadINIStr $R2 $0 "Field $R1" HWND |
1196 | 728 | mdecorde | ReadINIStr $R3 $0 "Field $R1" Text |
1197 | 728 | mdecorde | |
1198 | 728 | mdecorde | ${NSD_GetText} $R2 $R4 |
1199 | 728 | mdecorde | |
1200 | 728 | mdecorde | nsDialogs::SelectFolderDialog $R3 $R4 |
1201 | 728 | mdecorde | Pop $R3 |
1202 | 728 | mdecorde | |
1203 | 728 | mdecorde | ${If} $R3 != error |
1204 | 728 | mdecorde | SendMessage $R2 ${WM_SETTEXT} 0 STR:$R3 |
1205 | 728 | mdecorde | ${EndIf} |
1206 | 728 | mdecorde | |
1207 | 728 | mdecorde | FunctionEnd |
1208 | 728 | mdecorde | |
1209 | 728 | mdecorde | Function ${UNINSTALLER_FUNCPREFIX}Link |
1210 | 728 | mdecorde | |
1211 | 728 | mdecorde | ${NSD_CreateLink} $R3u $R4u $R5u $R6u $R7 |
1212 | 728 | mdecorde | Pop $R9 |
1213 | 728 | mdecorde | |
1214 | 728 | mdecorde | nsDialogs::SetUserData $R9 $R1 # remember field id |
1215 | 728 | mdecorde | |
1216 | 728 | mdecorde | ${NSD_OnClick} $R9 ${UNINSTALLER_FUNCPREFIX}OnLink |
1217 | 728 | mdecorde | |
1218 | 728 | mdecorde | FunctionEnd |
1219 | 728 | mdecorde | |
1220 | 728 | mdecorde | Function ${UNINSTALLER_FUNCPREFIX}OnLink |
1221 | 728 | mdecorde | |
1222 | 728 | mdecorde | Pop $R0 |
1223 | 728 | mdecorde | |
1224 | 728 | mdecorde | nsDialogs::GetUserData $R0 |
1225 | 728 | mdecorde | Pop $R1 |
1226 | 728 | mdecorde | |
1227 | 728 | mdecorde | ReadINIStr $R1 $0 "Field $R1" STATE |
1228 | 728 | mdecorde | |
1229 | 728 | mdecorde | ExecShell "" $R1 |
1230 | 728 | mdecorde | |
1231 | 728 | mdecorde | FunctionEnd |
1232 | 728 | mdecorde | |
1233 | 728 | mdecorde | !macroend |
1234 | 728 | mdecorde | |
1235 | 728 | mdecorde | !verbose pop |
1236 | 728 | mdecorde | !endif |