Added NSD_Remove[Ex]Style and NCM_* messages

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7086 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2019-02-15 20:19:27 +00:00
parent 7a6c9e52b0
commit 217f250466
6 changed files with 28 additions and 3 deletions

View file

@ -57,7 +57,7 @@ abbr { font-variant: none; cursor: help; }
<li><a href="#mref-onback">NSD_OnBack</a>, <a href="#mref-onchange">NSD_OnChange</a>, <a href="#mref-onclick">NSD_OnClick</a>, <a href="#mref-onnotify">NSD_OnNotify</a></li>
<li><a href="#mref-setfocus">NSD_SetFocus</a></li>
<li><a href="#mref-createtimer">NSD_CreateTimer</a>, <a href="#mref-killtimer">NSD_KillTimer</a></li>
<li><a href="#mref-addstyle">NSD_AddStyle</a>, <a href="#mref-addexstyle">NSD_AddExStyle</a></li>
<li><a href="#mref-addstyle">NSD_AddStyle</a>, <a href="#mref-addexstyle">NSD_AddExStyle</a>, <a href="#mref-removestyle">NSD_RemoveStyle</a>, <a href="#mref-removeexstyle">NSD_RemoveExStyle</a></li>
<li><a href="#mref-gettext">NSD_GetText</a>, <a href="#mref-settext">NSD_SetText</a></li>
<li>Text, Password &amp; Number:
<a href="#mref-settextlimit">NSD_Edit_SetTextLimit</a>,
@ -598,6 +598,14 @@ SectionEnd</pre></blockquote>
<p>Adds one or more extended window styles to a control. Multiple styles should be separated with pipes `|'.</p>
<p>See <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ff700543">MSDN</a> for style descriptions.</p>
<h3><a name="mref-removestyle"></a>NSD_RemoveStyle</h3>
<p><code>${NSD_RemoveStyle} <i>control_HWND</i> <i>style</i></code></p>
<p>Removes one or more window styles from a control.</p>
<h3><a name="mref-removeexstyle"></a>NSD_RemoveExStyle</h3>
<p><code>${NSD_RemoveExStyle} <i>control_HWND</i> <i>style</i></code></p>
<p>Removes one or more extended window styles from a control.</p>
<h3><a name="mref-gettext"></a>NSD_GetText</h3>
<p><code>${NSD_GetText} <i>control_HWND</i> <i>$output_variable</i></code></p>
<p>Retrieves the text of a control and stores it into <i>output_variable</i>. Especially useful for textual controls.</p>

View file

@ -481,6 +481,15 @@ System::Call 'COMCTL32::InitCommonControlsEx(*ls)' ; INITCOMMONCONTROLSEX as UIN
System::Call "user32::SetWindowLong(p${HWND},p${GWL},ps)"
!macroend
!define NSD_RemoveStyle "!insertmacro _NSD_GWLRemoveFlags ${GWL_STYLE} "
!define NSD_RemoveExStyle "!insertmacro _NSD_GWLRemoveFlags ${GWL_EXSTYLE} "
!macro _NSD_GWLRemoveFlags GWL HWND DATA
System::Call "user32::GetWindowLong(p${HWND},i${GWL})p.s"
System::Int64Op "${DATA}" ~ & ; Perform ~ and prepare the stack for &
System::Int64Op ; Perform &
System::Call "user32::SetWindowLong(p${HWND},i${GWL},ps)"
!macroend
!define NSD_GetStyle "!insertmacro _NSD_GWLGetFlags ${GWL_STYLE} "
!define NSD_GetExStyle "!insertmacro _NSD_GWLGetFlags ${GWL_EXSTYLE} "
!macro _NSD_GWLGetFlags GWL HWND RET