<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.autoitscript.com/w/index.php?action=history&amp;feed=atom&amp;title=Tutorial_GUIRegisterMsg</id>
	<title>Tutorial GUIRegisterMsg - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.autoitscript.com/w/index.php?action=history&amp;feed=atom&amp;title=Tutorial_GUIRegisterMsg"/>
	<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=Tutorial_GUIRegisterMsg&amp;action=history"/>
	<updated>2026-04-28T03:12:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=Tutorial_GUIRegisterMsg&amp;diff=13146&amp;oldid=prev</id>
		<title>Rt01: $iParam seems to be a typo. It uses $lParam for the rest of the tutorial.</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=Tutorial_GUIRegisterMsg&amp;diff=13146&amp;oldid=prev"/>
		<updated>2015-07-11T11:06:01Z</updated>

		<summary type="html">&lt;p&gt;$iParam seems to be a typo. It uses $lParam for the rest of the tutorial.&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 11:06, 11 July 2015&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-l9&quot;&gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&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;*&amp;#039;&amp;#039;$hWnd&amp;#039;&amp;#039; - the GUI which sent the message&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;*&amp;#039;&amp;#039;$hWnd&amp;#039;&amp;#039; - the GUI which sent the message&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;*&amp;#039;&amp;#039;$iMsg&amp;#039;&amp;#039; - the code for the message sent&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;*&amp;#039;&amp;#039;$iMsg&amp;#039;&amp;#039; - the code for the message sent&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;*&#039;&#039;$wParam, $&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;iParam&lt;/del&gt;&#039;&#039; - details of what exactly the message is about. This varies according to the message and details can be found in MSDN but often these parameters will hold the identity of control that has been used and the exact version of the message that has been sent.&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;*&#039;&#039;$wParam, $&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;lParam&lt;/ins&gt;&#039;&#039; - details of what exactly the message is about. This varies according to the message and details can be found in MSDN but often these parameters will hold the identity of control that has been used and the exact version of the message that has been sent.&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;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;Let us look at some examples:&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;Let us look at some examples:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Rt01</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=Tutorial_GUIRegisterMsg&amp;diff=12636&amp;oldid=prev</id>
		<title>Mlipok at 22:19, 13 September 2014</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=Tutorial_GUIRegisterMsg&amp;diff=12636&amp;oldid=prev"/>
		<updated>2014-09-13T22:19:54Z</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 22:19, 13 September 2014&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-l76&quot;&gt;Line 76:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 76:&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;&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&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;&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;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;  #include &amp;lt;GUIConstantsEx.au3&amp;gt;&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;  #include &amp;lt;GUIConstantsEx.au3&amp;gt;&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;  #include&amp;lt;WindowsConstants.au3&amp;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;  #include &amp;lt;WindowsConstants.au3&amp;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;   &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;   &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;  ; Whichever method we use, we need to declare the dummy control or the flag as a Global variable&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;  ; Whichever method we use, we need to declare the dummy control or the flag as a Global variable&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mlipok</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=Tutorial_GUIRegisterMsg&amp;diff=11834&amp;oldid=prev</id>
		<title>Jaberwocky6669: Jaberwocky6669 moved page GUIRegisterMsg to Tutorial GUIRegisterMsg: Moved to make way for a possible help file page.</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=Tutorial_GUIRegisterMsg&amp;diff=11834&amp;oldid=prev"/>
		<updated>2013-08-15T18:27:28Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669 moved page &lt;a href=&quot;/wiki/GUIRegisterMsg&quot; title=&quot;GUIRegisterMsg&quot;&gt;GUIRegisterMsg&lt;/a&gt; to &lt;a href=&quot;/wiki/Tutorial_GUIRegisterMsg&quot; title=&quot;Tutorial GUIRegisterMsg&quot;&gt;Tutorial GUIRegisterMsg&lt;/a&gt;: Moved to make way for a possible help file page.&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:27, 15 August 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=Tutorial_GUIRegisterMsg&amp;diff=11703&amp;oldid=prev</id>
		<title>Jaberwocky6669: Category:GUI</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=Tutorial_GUIRegisterMsg&amp;diff=11703&amp;oldid=prev"/>
		<updated>2013-08-01T03:27:55Z</updated>

		<summary type="html">&lt;p&gt;Category:GUI&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 03:27, 1 August 2013&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-l125&quot;&gt;Line 125:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 125:&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;[[Category:Tutorials]]&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;[[Category:Tutorials]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;[[Category:GUI]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=Tutorial_GUIRegisterMsg&amp;diff=11695&amp;oldid=prev</id>
		<title>Jaberwocky6669: Category:Tutorials</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=Tutorial_GUIRegisterMsg&amp;diff=11695&amp;oldid=prev"/>
		<updated>2013-08-01T03:10:28Z</updated>

		<summary type="html">&lt;p&gt;Category:Tutorials&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 03:10, 1 August 2013&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-l123&quot;&gt;Line 123:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 123:&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;-----------------------------------&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;-----------------------------------&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;I hope this short tutorial has made &amp;#039;&amp;#039;GUIRegisterMsg&amp;#039;&amp;#039; a little less complicated.  Now I suggest you go and look at the many examples on the forum to see how they work and how each differs slightly depending on exactly the author is trying to do.&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;I hope this short tutorial has made &amp;#039;&amp;#039;GUIRegisterMsg&amp;#039;&amp;#039; a little less complicated.  Now I suggest you go and look at the many examples on the forum to see how they work and how each differs slightly depending on exactly the author is trying to do.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;[[Category:Tutorials]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=Tutorial_GUIRegisterMsg&amp;diff=10480&amp;oldid=prev</id>
		<title>Melba23 at 15:28, 28 April 2012</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=Tutorial_GUIRegisterMsg&amp;diff=10480&amp;oldid=prev"/>
		<updated>2012-04-28T15:28:25Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Here is a short tutorial on &amp;#039;&amp;#039;GUIRegisterMsg&amp;#039;&amp;#039; - one of the more mysterious functions within AutoIt for newcomers.  Purists might quibble over details here, but it is good enough for hobbyists like me!  &lt;br /&gt;
&lt;br /&gt;
Windows works by sending messages to everything on the system, so that everything knows what is going on. By messages, I mean things like the &amp;#039;&amp;#039;$GUI_EVENT_CLOSE&amp;#039;&amp;#039; we look for when we exit a GUI - but the possible range is much, much wider; change of focus, change of state, mouseclicks, mousemoves, key presses, etc, etc, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;GUIRegisterMsg&amp;#039;&amp;#039; allows us to intercept certain of these messages as they are sent by the GUIs we have created, so we can see who sent what. So when you see a &amp;#039;&amp;#039;GUIRegisterMsg($WM_COMMAND, &amp;quot;MY_WM_COMMAND&amp;quot;)&amp;#039;&amp;#039; line in a script, this translates as &amp;quot;&amp;#039;&amp;#039;Whenever a WM_COMMAND message is sent by my GUI, please intercept it and pass it through the MY_WM_COMMAND function in this script&amp;#039;&amp;#039;&amp;quot;. The actual message title is denoted by the constant &amp;#039;&amp;#039;$WM_COMMAND&amp;#039;&amp;#039; which is stored in &amp;#039;&amp;#039;WindowsConstant.au3&amp;#039;&amp;#039; include file.  Of course, you can use other message types as well (such as &amp;#039;&amp;#039;$WM_NOTIFY&amp;#039;&amp;#039;) - and call your function whatever you wish!&lt;br /&gt;
&lt;br /&gt;
The function that you use &amp;#039;&amp;#039;GUIRegisterMsg&amp;#039;&amp;#039; to call &amp;#039;&amp;#039;&amp;#039;MUST&amp;#039;&amp;#039;&amp;#039; have these 4 parameters - &amp;#039;&amp;#039;$hWnd, $iMsg, $wParam, $lParam&amp;#039;&amp;#039; - because that is what Windows uses itself to pass the messages around.  In the majority of cases, these parameters relate to the following:&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;$hWnd&amp;#039;&amp;#039; - the GUI which sent the message&lt;br /&gt;
*&amp;#039;&amp;#039;$iMsg&amp;#039;&amp;#039; - the code for the message sent&lt;br /&gt;
*&amp;#039;&amp;#039;$wParam, $iParam&amp;#039;&amp;#039; - details of what exactly the message is about. This varies according to the message and details can be found in MSDN but often these parameters will hold the identity of control that has been used and the exact version of the message that has been sent.&lt;br /&gt;
&lt;br /&gt;
Let us look at some examples:&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
 GUIRegisterMsg($WM_COMMAND, &amp;quot;MY_WM_COMMAND&amp;quot;)&lt;br /&gt;
 ;&lt;br /&gt;
 Func MY_WM_COMMAND($hWnd, $iMsg, $wParam, $lParam)&lt;br /&gt;
 ;&lt;br /&gt;
     Local $iIDFrom = BitAND($wParam, 0xFFFF) ; LoWord - this gives the control which sent the message&lt;br /&gt;
     Local $iCode = BitShift($wParam, 16)     ; HiWord - this gives the message that was sent&lt;br /&gt;
     If $iCode = $EN_CHANGE Then ; If we have the correct message&lt;br /&gt;
         Switch $iIDFrom ; See if it comes from one of the inputs&lt;br /&gt;
             Case $hInput1&lt;br /&gt;
                 ; Do something&lt;br /&gt;
             Case $hInput2&lt;br /&gt;
                 ; Do something else&lt;br /&gt;
         EndSwitch&lt;br /&gt;
     EndIf&lt;br /&gt;
 ;&lt;br /&gt;
 EndFunc ;==&amp;gt;MY_WM_COMMAND&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
-----------------------------------&lt;br /&gt;
Here we are looking to see if the contents of two Input controls have been altered.  We first intercept the &amp;#039;&amp;#039;$WM_COMMAND&amp;#039;&amp;#039; messages from our GUI using &amp;#039;&amp;#039;GUIRegisterMsg&amp;#039;&amp;#039;.  We can ignore the GUI and the main message in this case - &amp;#039;&amp;#039;$WM_COMMAND&amp;#039;&amp;#039; is a huge set and as we are interested in the control we need not worry about the GUI - if we correctly identify the control, it can only come from our GUI!  But in other cases, this is vital information, as you can imagine.&lt;br /&gt;
&lt;br /&gt;
To see if an Input has been altered, we need to look for the &amp;#039;&amp;#039;$EN_CHANGE&amp;#039;&amp;#039; submessage and as you can see we need to investigate the contents of &amp;#039;&amp;#039;$wParam&amp;#039;&amp;#039; to determine this - and then determine the identity of the Input control which is also obtained from&amp;#039;&amp;#039; $wParam&amp;#039;&amp;#039; (MSDN is the bible here). The &amp;#039;&amp;#039;Bit*&amp;#039;&amp;#039; operators allow us to extract these values:&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
 Local $iIDFrom = BitAND($wParam, 0xFFFF) ; LoWord - this gives the ControlID of the control which sent the message &lt;br /&gt;
 Local $iCode = BitShift($wParam, 16)     ; HiWord - this gives the submessage that was sent&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
-----------------------------------&lt;br /&gt;
We now know which control sent the message and what the sub-message was - so we check if it matches what we are looking for and if it does then we do whatever we need to do:&lt;br /&gt;
&lt;br /&gt;
Another example:&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
 GUIRegisterMsg($WM_NOTIFY, &amp;quot;MY_WM_NOTIFY&amp;quot;)&lt;br /&gt;
 ;&lt;br /&gt;
 Func MY_WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam)&lt;br /&gt;
 ;&lt;br /&gt;
 	Local $tNMHDR = DllStructCreate(&amp;quot;int;int;int&amp;quot;, $lParam)&lt;br /&gt;
 	If @error Then Return&lt;br /&gt;
 	If DllStructGetData($tNMHDR, 1) = $hLV_Handle Then ; Is it our ListView&lt;br /&gt;
 		If DllStructGetData($tNMHDR, 3) = $NM_DBLCLK Then $fDblClk = True ; Was it a double click&lt;br /&gt;
 	EndIf&lt;br /&gt;
 	$tNMHDR = 0 ; This not strictly necessary but does not hurt!&lt;br /&gt;
 ;&lt;br /&gt;
 	Return $GUI_RUNDEFMSG ; This tells AutoIt to process the message itself&lt;br /&gt;
 ;&lt;br /&gt;
 EndFunc   ;==&amp;gt;MY_WM_NOTIFY&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
-----------------------------------&lt;br /&gt;
This time we are trapping the &amp;#039;&amp;#039;$WM_NOTIFY&amp;#039;&amp;#039; message which lets us know about events like mouse clicks.  In particular we are looking for a double click on a ListView within our GUI.  As above we use &amp;#039;&amp;#039;GUIRegisterMsg&amp;#039;&amp;#039; to intercept the message.  Again we can ignore the GUI and main message and just look for the control and submessage.  In this case we need to do a bit more work on the &amp;#039;&amp;#039;$lParam&amp;#039;&amp;#039; parameter which is actually a &amp;#039;&amp;#039;Struct&amp;#039;&amp;#039;.  However, AutoIt again makes it easy to obtain the handle of the control and the actual submessage - if these are the correct ones, we set a flag to &amp;#039;&amp;#039;True&amp;#039;&amp;#039;.  Why, well keep reading and you will find out!&lt;br /&gt;
&lt;br /&gt;
When we have finished dealing with the message we have intercepted, it gets passed along the chain of all the other message handlers so all the other applications in the system can see if they are interested too.   But in some cases you might actually want to stop the message going further - I wrote a UDF to prevent the system adding the dotted lines around the control when it has focus and passing the message on was exactly what I was trying to prevent!  So in the UDF I added a &amp;#039;&amp;#039;Return&amp;#039;&amp;#039; line to the function to stop it dead - just as here.  Returning the &amp;#039;&amp;#039;$GUI_RUNDEFMSG&amp;#039;&amp;#039; constant tells AutoIt to run its own internal message handler. &lt;br /&gt;
&lt;br /&gt;
Now, what about the use of a flag in the second example?  Well, if you read the Help file for &amp;#039;&amp;#039;GUIRegisterMsg&amp;#039;&amp;#039; you will see the following:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;&amp;#039;&amp;#039;Warning: blocking of running user functions which execute Windows messages with commands such as &amp;quot;Msgbox()&amp;quot; can lead to unexpected behavior, the return to the system should be as fast as possible !!!&amp;#039;&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Basically, if you spend too long in your message handling function, the rest of the system gets behind and becomes unstable.  So you should get out of it as quickly as you can - and certainly never create anything that waits for user input.&lt;br /&gt;
&lt;br /&gt;
There are 2 ways we can still run something long and complicated but still leave the handler quickly: either set a flag or action a dummy control.  If we set a flag inside the handler, we can then look for it within our idle loop and run our blocking code from here without affecting the handler at all.  If we action a dummy control then we do not even have to look for the flag!  Here is an example of both methods to show you how to apply them.&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
 #include &amp;lt;GUIConstantsEx.au3&amp;gt;&lt;br /&gt;
 #include&amp;lt;WindowsConstants.au3&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 ; Whichever method we use, we need to declare the dummy control or the flag as a Global variable&lt;br /&gt;
 Global $hLeftClick, $fRightClick = False&lt;br /&gt;
 &lt;br /&gt;
 GUICreate(&amp;quot;Click me!&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 ; Create a dummy control for the handler to action&lt;br /&gt;
 $hLeftClick = GUICtrlCreateDummy()&lt;br /&gt;
 &lt;br /&gt;
 GUISetState()&lt;br /&gt;
 &lt;br /&gt;
 ; Register our messages&lt;br /&gt;
 GUIRegisterMsg($WM_LBUTTONUP, &amp;quot;_WM_LBUTTONUP&amp;quot;)&lt;br /&gt;
 GUIRegisterMsg($WM_RBUTTONUP, &amp;quot;_WM_RBUTTONUP&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 While 1&lt;br /&gt;
     Switch GUIGetMsg()&lt;br /&gt;
         Case $GUI_EVENT_CLOSE&lt;br /&gt;
             ExitLoop&lt;br /&gt;
         Case $hLeftClick&lt;br /&gt;
             ; Our dummy control was actioned so run the required code&lt;br /&gt;
             MsgBox(0, &amp;quot;Click&amp;quot;, &amp;quot;LEFT CLICK!&amp;quot;)&lt;br /&gt;
     EndSwitch&lt;br /&gt;
 &lt;br /&gt;
     ; Look for the flag&lt;br /&gt;
     If $fRightClick = True Then&lt;br /&gt;
         ; Run the code&lt;br /&gt;
         MsgBox(0, &amp;quot;Click&amp;quot;, &amp;quot;RIGHT CLICK!&amp;quot;)&lt;br /&gt;
         ; Do not forget to reset the flag!&lt;br /&gt;
         $fRightClick = False&lt;br /&gt;
     EndIf&lt;br /&gt;
 &lt;br /&gt;
 WEnd&lt;br /&gt;
 &lt;br /&gt;
 Func _WM_LBUTTONUP($hWnd, $iMsg, $wParam, $lParam)&lt;br /&gt;
     ; Action the dummy control&lt;br /&gt;
     GUICtrlSendToDummy($hLeftClick)&lt;br /&gt;
 EndFunc&lt;br /&gt;
 &lt;br /&gt;
 Func _WM_RBUTTONUP($hWnd, $iMsg, $wParam, $lParam)&lt;br /&gt;
     ; Set the flag&lt;br /&gt;
     $fRightClick = True&lt;br /&gt;
 EndFunc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
-----------------------------------&lt;br /&gt;
I hope this short tutorial has made &amp;#039;&amp;#039;GUIRegisterMsg&amp;#039;&amp;#039; a little less complicated.  Now I suggest you go and look at the many examples on the forum to see how they work and how each differs slightly depending on exactly the author is trying to do.&lt;/div&gt;</summary>
		<author><name>Melba23</name></author>
	</entry>
</feed>