<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nsis.sourceforge.io/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Component_descriptions_with_rtf_formatting</id>
	<title>Component descriptions with rtf formatting - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://nsis.sourceforge.io/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Component_descriptions_with_rtf_formatting"/>
	<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Component_descriptions_with_rtf_formatting&amp;action=history"/>
	<updated>2026-06-07T09:43:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Component_descriptions_with_rtf_formatting&amp;diff=17868&amp;oldid=prev</id>
		<title>62.219.134.84 at 08:40, 16 November 2009</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Component_descriptions_with_rtf_formatting&amp;diff=17868&amp;oldid=prev"/>
		<updated>2009-11-16T08:40:20Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;â† Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:40, 16 November 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l29&quot;&gt;Line 29:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 29:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Function cmpnt_Show&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Function cmpnt_Show&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;!&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;if 0 ;if license page support is not COMPILED in (It is by default), change 0 to 1&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;!&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ifndef NSIS_CONFIG_LICENSEPAGE&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	System::Call &amp;#039;kernel32::LoadLibrary(t &amp;quot;RichEd20&amp;quot;)&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	System::Call &amp;#039;kernel32::LoadLibrary(t &amp;quot;RichEd20&amp;quot;)&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	System::Call &amp;#039;kernel32::LoadLibrary(t &amp;quot;RichEd32&amp;quot;)&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	System::Call &amp;#039;kernel32::LoadLibrary(t &amp;quot;RichEd32&amp;quot;)&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key n22049_wiki-wiki_:diff::1.12:old-17866:rev-17868 --&gt;
&lt;/table&gt;</summary>
		<author><name>62.219.134.84</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Component_descriptions_with_rtf_formatting&amp;diff=17866&amp;oldid=prev</id>
		<title>Anders: moved Component descriptions with rtf formating to Component descriptions with rtf formatting:&amp;#32;fixed spelling</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Component_descriptions_with_rtf_formatting&amp;diff=17866&amp;oldid=prev"/>
		<updated>2009-11-15T18:14:33Z</updated>

		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/Component_descriptions_with_rtf_formating&quot; class=&quot;mw-redirect&quot; title=&quot;Component descriptions with rtf formating&quot;&gt;Component descriptions with rtf formating&lt;/a&gt; to &lt;a href=&quot;/Component_descriptions_with_rtf_formatting&quot; title=&quot;Component descriptions with rtf formatting&quot;&gt;Component descriptions with rtf formatting&lt;/a&gt;: fixed spelling&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;â† Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:14, 15 November 2009&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key n22049_wiki-wiki_:diff::1.12:old-17865:rev-17866 --&gt;
&lt;/table&gt;</summary>
		<author><name>Anders</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Component_descriptions_with_rtf_formatting&amp;diff=17865&amp;oldid=prev</id>
		<title>Anders: Created page with &#039;{{PageAuthor|Anders}}  == Code Info == * &#039;&#039;&#039;Version:&#039;&#039;&#039; 20091115 * &#039;&#039;&#039;Type:&#039;&#039;&#039; Code example * &#039;&#039;&#039;Character encoding:&#039;&#039;&#039; Ansi &amp; Unicode * &#039;&#039;&#039;Minimum OS:&#039;&#039;&#039; Win95/NT4? * &#039;&#039;&#039;Minimum…&#039;</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Component_descriptions_with_rtf_formatting&amp;diff=17865&amp;oldid=prev"/>
		<updated>2009-11-15T18:12:34Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;{{PageAuthor|Anders}}  == Code Info == * &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 20091115 * &amp;#039;&amp;#039;&amp;#039;Type:&amp;#039;&amp;#039;&amp;#039; Code example * &amp;#039;&amp;#039;&amp;#039;Character encoding:&amp;#039;&amp;#039;&amp;#039; Ansi &amp;amp; Unicode * &amp;#039;&amp;#039;&amp;#039;Minimum OS:&amp;#039;&amp;#039;&amp;#039; Win95/NT4? * &amp;#039;&amp;#039;&amp;#039;Minimum…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{PageAuthor|Anders}}&lt;br /&gt;
&lt;br /&gt;
== Code Info ==&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 20091115&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Type:&amp;#039;&amp;#039;&amp;#039; Code example&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Character encoding:&amp;#039;&amp;#039;&amp;#039; Ansi &amp;amp; Unicode&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Minimum OS:&amp;#039;&amp;#039;&amp;#039; Win95/NT4?&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Minimum NSIS Version:&amp;#039;&amp;#039;&amp;#039; 2.0?&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;License:&amp;#039;&amp;#039;&amp;#039; zlib/libpng&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cmpntdescrtf.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Code ==&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;&lt;br /&gt;
!include MUI2.nsh&lt;br /&gt;
!define APPNAME &amp;quot;COMPONENTS; RTF Desc&amp;quot;&lt;br /&gt;
name &amp;quot;${APPNAME}&amp;quot;&lt;br /&gt;
caption &amp;quot;$(^Name)&amp;quot;&lt;br /&gt;
outfile &amp;quot;$%temp%\${APPNAME}.exe&amp;quot;&lt;br /&gt;
ShowInstDetails show&lt;br /&gt;
RequestExecutionLevel user&lt;br /&gt;
installdir &amp;quot;$Temp&amp;quot;&lt;br /&gt;
!include WinMessages.nsh&lt;br /&gt;
!include nsDialogs.nsh&lt;br /&gt;
&lt;br /&gt;
var RichDesc&lt;br /&gt;
&lt;br /&gt;
Function cmpnt_Show&lt;br /&gt;
!if 0 ;if license page support is not COMPILED in (It is by default), change 0 to 1&lt;br /&gt;
	System::Call &amp;#039;kernel32::LoadLibrary(t &amp;quot;RichEd20&amp;quot;)&amp;#039;&lt;br /&gt;
	System::Call &amp;#039;kernel32::LoadLibrary(t &amp;quot;RichEd32&amp;quot;)&amp;#039;&lt;br /&gt;
!endif&lt;br /&gt;
&lt;br /&gt;
FindWindow $0 &amp;quot;#32770&amp;quot; &amp;quot;&amp;quot; $HWNDPARENT&lt;br /&gt;
GetDlgItem $2 $0 1043&lt;br /&gt;
ShowWindow $2 0 ;hide the &amp;quot;real&amp;quot; description label (we still use it to get the text)&lt;br /&gt;
System::Call *(&amp;amp;i4,&amp;amp;i4,&amp;amp;i4,&amp;amp;i4).ir1&lt;br /&gt;
System::Call &amp;#039;user32::GetWindowRect(ir2,ir1)&amp;#039;&lt;br /&gt;
IntOp $3 $1 + 8 &lt;br /&gt;
System::Call &amp;#039;user32::MapWindowPoints(i0,i$2,i$3,i1)&amp;#039;&lt;br /&gt;
System::Call &amp;#039;*$1(&amp;amp;i4i,&amp;amp;i4i,&amp;amp;i4i.r5,&amp;amp;i4i.r6)&amp;#039; ;w&amp;amp;h&lt;br /&gt;
System::Call &amp;#039;user32::MapWindowPoints(i0,i$0,i$1,i1)&amp;#039;&lt;br /&gt;
System::Call &amp;#039;*$1(&amp;amp;i4i.r3,&amp;amp;i4i.r4)&amp;#039; ;l&amp;amp;t&lt;br /&gt;
System::Free $1&lt;br /&gt;
&lt;br /&gt;
;Try both richedit classes&lt;br /&gt;
StrCpy $1 &amp;quot;RichEdit20A&amp;quot;&lt;br /&gt;
createRich:&lt;br /&gt;
System::Call &amp;#039;user32::CreateWindowEx(i ${WS_EX_TRANSPARENT},tr1,i0,\&lt;br /&gt;
	i ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${ES_READONLY}|${ES_MULTILINE}|${ES_WANTRETURN},\&lt;br /&gt;
	i $3,i $4,i $5,i $6,i $0,i0,i0,i0)i.s&amp;#039;&lt;br /&gt;
pop $RichDesc&lt;br /&gt;
${If} $RichDesc = 0&lt;br /&gt;
${AndIf} $1 == &amp;quot;RichEdit20A&amp;quot;&lt;br /&gt;
	StrCpy $1 &amp;quot;RichEdit&amp;quot;&lt;br /&gt;
	goto createRich&lt;br /&gt;
${EndIf}&lt;br /&gt;
&lt;br /&gt;
SendMessage $2 ${WM_GETFONT} 0 0 $1&lt;br /&gt;
SendMessage $RichDesc ${WM_SETFONT} $1 1&lt;br /&gt;
System::Call user32::BringWindowToTop(i$RichDesc) ;stupid window seems to be stuck behind the groupbox&lt;br /&gt;
call cmpnt_onmouseover ;fake a update to set the initial text&lt;br /&gt;
FunctionEnd&lt;br /&gt;
&lt;br /&gt;
!define MUI_CUSTOMFUNCTION_ONMOUSEOVERSECTION cmpnt_onmouseover&lt;br /&gt;
!define MUI_PAGE_CUSTOMFUNCTION_SHOW cmpnt_Show&lt;br /&gt;
&lt;br /&gt;
!insertmacro MUI_PAGE_COMPONENTS&lt;br /&gt;
!insertmacro MUI_PAGE_INSTFILES&lt;br /&gt;
!insertmacro MUI_PAGE_FINISH&lt;br /&gt;
!insertmacro MUI_LANGUAGE &amp;quot;English&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Section aaa s1 &lt;br /&gt;
SectionEnd&lt;br /&gt;
Section /o bbb s2&lt;br /&gt;
SectionEnd&lt;br /&gt;
Section ccc s3&lt;br /&gt;
SectionEnd&lt;br /&gt;
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN&lt;br /&gt;
  !insertmacro MUI_DESCRIPTION_TEXT ${s1} &amp;quot;aaaaaaa&amp;quot;&lt;br /&gt;
  !insertmacro MUI_DESCRIPTION_TEXT ${s2} &amp;quot;{\rtf1{{\colortbl ;\red255\green0\blue0;}foo \cf1\b bar \cf0\b0 baz!}&amp;quot;&lt;br /&gt;
  !insertmacro MUI_DESCRIPTION_TEXT ${s3} &amp;quot;{\rtf1{cc \b cccccc \b0 ccc}&amp;quot; &lt;br /&gt;
!insertmacro MUI_FUNCTION_DESCRIPTION_END&lt;br /&gt;
&lt;br /&gt;
Function cmpnt_onmouseover&lt;br /&gt;
FindWindow $1 &amp;quot;#32770&amp;quot; &amp;quot;&amp;quot; $HWNDPARENT&lt;br /&gt;
GetDlgItem $1 $1 1043&lt;br /&gt;
System::Call &amp;#039;user32::SendMessage(i$1,i${WM_GETTEXT},i${NSIS_MAX_STRLEN},t.r2)&amp;#039;&lt;br /&gt;
SendMessage $RichDesc ${WM_SETTEXT} 0 STR:$2&lt;br /&gt;
System::Call &amp;quot;user32::GetWindowLong(i$1,i${GWL_STYLE})i.r1&amp;quot;&lt;br /&gt;
IntOp $1 $1 &amp;amp; ${WS_DISABLED}&lt;br /&gt;
EnableWindow $RichDesc $1 ;always force a state toggle, this is our &amp;quot;InvalidateRect&amp;quot; (since we have WS_EX_TRANSPARENT)&lt;br /&gt;
IntOp $1 $1 !&lt;br /&gt;
EnableWindow $RichDesc $1&lt;br /&gt;
!if 0&lt;br /&gt;
/*&lt;br /&gt;
Using EnableWindow to toggle the disabled state seems to do all the refreshing we need,&lt;br /&gt;
but just in case there is a problem, use this code to do proper InvalidateRect...&lt;br /&gt;
*/&lt;br /&gt;
System::Call &amp;#039;*(&amp;amp;i4,&amp;amp;i4,&amp;amp;i4,&amp;amp;i4).ir1&amp;#039;&lt;br /&gt;
FindWindow $0 &amp;quot;#32770&amp;quot; &amp;quot;&amp;quot; $HWNDPARENT&lt;br /&gt;
System::Call &amp;#039;user32::GetWindowRect(i$RichDesc,ir1)&amp;#039;&lt;br /&gt;
System::Call &amp;#039;user32::MapWindowPoints(i0,i$0,i$1,i2)&amp;#039;&lt;br /&gt;
System::Call &amp;#039;user32::InvalidateRect(i$0,i$1,i1)&amp;#039;&lt;br /&gt;
System::Free $1&lt;br /&gt;
!endif&lt;br /&gt;
FunctionEnd&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Written by Anders (For fun and profit?)&lt;br /&gt;
&lt;br /&gt;
[[Category:Code Examples]]&lt;/div&gt;</summary>
		<author><name>Anders</name></author>
	</entry>
</feed>