Added NSD NetAddress control and Date macros
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7177 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
b3044b36c1
commit
3d93d9c010
3 changed files with 80 additions and 35 deletions
|
@ -6,7 +6,7 @@
|
|||
<style type="text/css">
|
||||
body { color: #000000; background-color: #ffffff; }
|
||||
b { color: red; }
|
||||
code { margin-left: 1.2em; padding: 0.5em; background-color: #f0f0f0; display:inline-block; }
|
||||
code { margin-left: 1.2em; padding: 0.5em; background-color: #f0f0f0; display:inline-block; font-size:95%; }
|
||||
span.inlcod i { padding: 0px 0.2em; color: #222222; font-family: monospace; font-style: normal; }
|
||||
blockquote pre { background-color: #fcfcfc; font-family: monospace; }
|
||||
abbr { font-variant: none; cursor: help; }
|
||||
|
@ -115,11 +115,14 @@ NSD_CB_Clear,
|
|||
<li>HotKey:
|
||||
<a href="#mref-hkgethk">NSD_HK_GetHotKey</a>, <a href="#mref-hksethk">NSD_HK_SetHotKey</a>
|
||||
</li>
|
||||
<li>DatePicker:
|
||||
<a href="#mref-dategetdatefields">NSD_Date_GetDateFields</a>
|
||||
</li>
|
||||
<li>Bitmap:
|
||||
<a href="#mref-setimage">NSD_SetImage</a>,
|
||||
<a href="#mref-setsimage">NSD_SetStretchedImage</a>,
|
||||
<a href="#mref-clearimage">NSD_ClearImage</a>,
|
||||
<a href="#mref-freeimage">NSD_FreeImage</a>
|
||||
<a href="#mref-setbitmap">NSD_SetBitmap</a>,
|
||||
<a href="#mref-setsbitmap">NSD_SetStretchedBitmap</a>,
|
||||
<a href="#mref-clearbitmap">NSD_ClearBitmap</a>,
|
||||
<a href="#mref-freebitmap">NSD_FreeBitmap</a>
|
||||
</li>
|
||||
<li>Icon:
|
||||
<a href="#mref-seticon">NSD_SetIcon</a>,
|
||||
|
@ -252,9 +255,10 @@ Animation,
|
|||
HTrackBar,
|
||||
VTrackBar,
|
||||
UpDown,
|
||||
HotKey,
|
||||
DatePicker,
|
||||
IPAddress.
|
||||
HotKey,
|
||||
DatePicker,
|
||||
IPAddress,
|
||||
NetAddress.
|
||||
</p>
|
||||
|
||||
<h3><a name="step-state"></a>Control State</h3>
|
||||
|
@ -563,8 +567,9 @@ StrCmp $0 "" ...
|
|||
<li>${NSD_CreateVTrackBar}</li>
|
||||
<li>${NSD_CreateUpDown}</li>
|
||||
<li>${NSD_CreateHotKey}</li>
|
||||
<li>${NSD_CreateDatePicker} <small>(Requires <abbr title="Internet Explorer">IE</abbr> 3.1)</small></li>
|
||||
<li>${NSD_CreateIPAddress} <small>(Requires <abbr title="Internet Explorer">IE</abbr> 4)</small></li>
|
||||
<li>${NSD_CreateDatePicker} <small>(Requires <abbr title="Internet Explorer">IE</abbr> 3.1 and <span class="inlcod"><i>${NSD_InitCommonControlsEx}</i></span>)</small></li>
|
||||
<li>${NSD_CreateIPAddress} <small>(Requires <abbr title="Internet Explorer">IE</abbr> 4 and <span class="inlcod"><i>${NSD_InitCommonControl_IPAddress}</i></span>)</small></li>
|
||||
<li>${NSD_CreateNetAddress} <small>(Requires Vista and <span class="inlcod"><i>${NSD_InitCommonControl_NetAddress}</i></span>)</small></li>
|
||||
</ul>
|
||||
<p>Returns the new control's HWND on the stack or <i>error</i></p>
|
||||
|
||||
|
@ -768,9 +773,13 @@ StrCmp $0 "" ...
|
|||
<h3><a name="mref-hksethk">NSD_HK_SetHotKey</a></h3>
|
||||
<p><code>${NSD_HK_SetHotKey} <i>hk_HWND</i> <i>packedhotkey</i></code></p>
|
||||
|
||||
<h3><a name="mref-setimage"></a>NSD_SetImage</h3>
|
||||
<p><code>${NSD_SetImage} <i>control_HWND</i> <i>image_path</i> <i>$output_variable</i></code></p>
|
||||
<p>Loads a bitmap from <i>image_path</i> and displays it on <i>control_HWND</i> created by <a href="#mref-create">${NSD_CreateBitmap}</a>. The image handle is stored in <i>output_variable</i> and should be freed using <a href="#mref-freeimage">${NSD_FreeImage}</a> once no longer necessary.</p>
|
||||
<h3><a name="mref-dategetdatefields">NSD_Date_GetDateFields</a></h3>
|
||||
<p><code>${NSD_Date_GetDateFields} <i>HWND</i></code></p>
|
||||
<p>Returns the month, day and year on the stack.</p>
|
||||
|
||||
<h3><a name="mref-setbitmap"></a><a name="mref-setimage"></a>NSD_SetBitmap</h3>
|
||||
<p><code>${NSD_SetBitmap} <i>control_HWND</i> <i>image_path</i> <i>$output_variable</i></code></p>
|
||||
<p>Loads a bitmap from <i>image_path</i> and displays it on <i>control_HWND</i> created by <a href="#mref-create">${NSD_CreateBitmap}</a>. The image handle is stored in <i>output_variable</i> and should be freed using <a href="#mref-freebitmap">${NSD_FreeBitmap}</a> once no longer necessary.</p>
|
||||
<p>The image must be extracted to the user's computer prior to calling this macro. A good place to extract images is $PLUGINSDIR.</p>
|
||||
<blockquote><pre>!include nsDialogs.nsh
|
||||
|
||||
|
@ -781,8 +790,8 @@ Page custom nsDialogsImage
|
|||
Page instfiles
|
||||
|
||||
Var Dialog
|
||||
Var Image
|
||||
Var ImageHandle
|
||||
Var ImageCtrl
|
||||
Var BmpHandle
|
||||
|
||||
Function .onInit
|
||||
InitPluginsDir
|
||||
|
@ -798,28 +807,28 @@ Function nsDialogsImage
|
|||
${EndIf}
|
||||
|
||||
${NSD_CreateBitmap} 0 0 100% 100% ""
|
||||
Pop $Image
|
||||
${NSD_SetImage} $Image $PLUGINSDIR\image.bmp $ImageHandle
|
||||
Pop $ImageCtrl
|
||||
${NSD_SetBitmap} $ImageCtrl $PLUGINSDIR\image.bmp $BmpHandle
|
||||
|
||||
nsDialogs::Show
|
||||
|
||||
${NSD_FreeImage} $ImageHandle
|
||||
${NSD_FreeBitmap} $BmpHandle
|
||||
FunctionEnd
|
||||
|
||||
Section
|
||||
SectionEnd</pre></blockquote>
|
||||
|
||||
<h3><a name="mref-setsimage"></a>NSD_SetStretchedImage</h3>
|
||||
<p><code>${NSD_SetStretchedImage} <i>control_HWND</i> <i>image_path</i> <i>$output_variable</i></code></p>
|
||||
<p>Loads and displays a bitmap just like <a href="#mref-setimage">${NSD_SetImage}</a>, but stretched the image to fit the control.</p>
|
||||
<h3><a name="mref-setsbitmap"></a><a name="mref-setsimage"></a>NSD_SetStretchedBitmap</h3>
|
||||
<p><code>${NSD_SetStretchedBitmap} <i>control_HWND</i> <i>image_path</i> <i>$output_variable</i></code></p>
|
||||
<p>Loads and displays a bitmap just like <a href="#mref-setbitmap">${NSD_SetImage}</a> but stretches the image to fit the control.</p>
|
||||
|
||||
<h3><a name="mref-clearimage"></a>NSD_ClearImage</h3>
|
||||
<p><code>${NSD_ClearImage} <i>control_HWND</i></code></p>
|
||||
<p>Clears an image from a control.</p>
|
||||
<h3><a name="mref-clearbitmap"></a><a name="mref-clearimage"></a>NSD_ClearBitmap</h3>
|
||||
<p><code>${NSD_ClearBitmap} <i>control_HWND</i></code></p>
|
||||
<p>Clears a bitmap from a image control.</p>
|
||||
|
||||
<h3><a name="mref-freeimage"></a>NSD_FreeImage</h3>
|
||||
<h3><a name="mref-freebitmap"></a><a name="mref-freeimage"></a>NSD_FreeBitmap</h3>
|
||||
<p><code>${NSD_FreeImage} <i>image_handle</i></code></p>
|
||||
<p>Frees an image handle previously loaded with <a href="#mref-setimage">${NSD_SetImage}</a> or <a href="#mref-setsimage">${NSD_SetStretchedImage}</a>.</p>
|
||||
<p>Frees an image handle previously loaded with <a href="#mref-setbitmap">${NSD_SetImage}</a> or <a href="#mref-setsbitmap">${NSD_SetStretchedBitmap}</a>.</p>
|
||||
|
||||
<h3><a name="mref-seticon"></a>NSD_SetIcon</h3>
|
||||
<p><code>${NSD_SetIcon} <i>control_HWND</i> <i>image_path</i> <i>$output_variable</i></code></p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue