<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Owned Windows]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14698&amp;type=atom" />
	<updated>2023-05-02T10:57:41Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=14698</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Owned Windows]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=157995#p157995" />
			<content type="html"><![CDATA[<p>Заметил с программой такую штуку, если у неё показано модальное окно, то GWLP_HWNDPARENT отлично работает, если программа не отображает своё модальное окно, то появляется задержка активации моего окна. Инжект эту ситуацию никак не меняет. Стили окна программы не меняются. Чтобы это могло быть...</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2023-05-02T10:57:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=157995#p157995</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Owned Windows]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=157994#p157994" />
			<content type="html"><![CDATA[<p>А, понял, его же нет в списке значений.</p><p>В общем если где то не работает, то ничего не поделаешь.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2023-05-02T07:01:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=157994#p157994</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Owned Windows]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=157993#p157993" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>А как ты понял что неофициальное?</p></blockquote></div><p>Потому что оно недокументировано.<br />А в исходниках автохотки сноска имеется:<br /></p><div class="quotebox"><blockquote><p>// Although MSDN doesn&#039;t explicitly document any way to change the owner of an existing<br />				// window, the following method was mentioned in a PDC talk by Raymond Chen.&nbsp; MSDN does<br />				// say it shouldn&#039;t be used to change the parent of a child window, but maybe what it<br />				// actually means is that &quot;HWNDPARENT&quot; is a misnomer; it should&#039;ve been &quot;HWNDOWNER&quot;.<br />				// On the other hand, this method ACTUALLY DOES CHANGE THE PARENT WINDOW if mHwnd is a<br />				// child window and the check above is disabled (at least it did during testing).</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2023-05-02T06:54:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=157993#p157993</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Owned Windows]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=157992#p157992" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Не вызывайте SetWindowLongPtr с индексом GWLP_HWNDPARENT , чтобы изменить родительский элемент дочернего окна. Вместо этого используйте функцию SetParent .</p></blockquote></div><p>Это написано просто чтобы была ясность, и не путали с SetParent.<br />Gui +Owner делает тоже самое.</p><div class="quotebox"><cite>Malcev пишет:</cite><blockquote><p>неофициальное апи.</p></blockquote></div><p>А как ты понял что неофициальное?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2023-05-02T06:37:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=157992#p157992</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Owned Windows]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=157991#p157991" />
			<content type="html"><![CDATA[<p>Только вот SetParent другое делает.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2023-05-02T06:30:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=157991#p157991</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Owned Windows]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=157990#p157990" />
			<content type="html"><![CDATA[<p>А чего странного - неофициальное апи.<br /></p><div class="quotebox"><blockquote><p>Do not call SetWindowLongPtr with the GWLP_HWNDPARENT index to change the parent of a child window. Instead, use the SetParent function.</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2023-05-02T06:24:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=157990#p157990</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Owned Windows]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=157988#p157988" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>DllCall(&quot;SetWindowLong&quot; . (A_PtrSize = 8 ? &quot;Ptr&quot; : &quot;&quot;), Ptr, hOwned, Int, GWLP_HWNDPARENT := -8, Ptr, hParent)</p></blockquote></div><p>Странная вещь, на некоторых сторонних окнах в качестве hParent, Gui думает секунду прежде чем активироваться, теоретически почему так может быть?<br />Сравнил проблемное окно и окно блокнота с которым нет проблем, по стилям одинаково.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2023-05-02T02:45:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=157988#p157988</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Owned Windows]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=133421#p133421" />
			<content type="html"><![CDATA[<p>Такая же есть и в SetWindowLongPtrA/W.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2019-04-07T16:32:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=133421#p133421</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Owned Windows]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=133419#p133419" />
			<content type="html"><![CDATA[<p>Я тебя немного запутал, ремарка отсюда <a href="https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-setwindowlonga">https://docs.microsoft.com/en-us/window … indowlonga</a>.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2019-04-07T16:25:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=133419#p133419</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Owned Windows]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=133417#p133417" />
			<content type="html"><![CDATA[<p>А, ну да, правильно. Не адрес получить, а название заменить.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2019-04-07T16:24:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=133417#p133417</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Owned Windows]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=133416#p133416" />
			<content type="html"><![CDATA[<p>?<br />У тебя SetWindowLongPtr. На х32 надо SetWindowLong.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2019-04-07T16:21:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=133416#p133416</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Owned Windows]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=133415#p133415" />
			<content type="html"><![CDATA[<p>Так у меня же она и используется?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2019-04-07T16:20:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=133415#p133415</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Owned Windows]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=133414#p133414" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>А, на 32 нужно получать адрес этой функции, напрямую вызывать нельзя.</p></blockquote></div><p>Не понял?<br /></p><div class="codebox"><pre><code>DllCall(&quot;SetWindowLong&quot; . (A_PtrSize = 8 ? &quot;Ptr&quot; : &quot;&quot;), Ptr, hOwned, Int, GWLP_HWNDPARENT := -8, Ptr, hParent)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2019-04-07T16:19:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=133414#p133414</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Owned Windows]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=133413#p133413" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Note&nbsp; This function has been superseded by the SetWindowLongPtr function. To write code that is compatible with both 32-bit and 64-bit versions of Windows, use the SetWindowLongPtr function.</p></blockquote></div><p>Туплю, понял. Спасибо за помощь!</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2019-04-07T16:18:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=133413#p133413</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Owned Windows]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=133412#p133412" />
			<content type="html"><![CDATA[<p>А, на 32 нужно получать адрес этой функции, напрямую вызывать нельзя. </p><div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>а вот в обратную сторону только со своими</p></blockquote></div><p>Ну может это как раз тот самый оговорённый выше случай.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2019-04-07T16:17:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=133412#p133412</id>
		</entry>
</feed>
