<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Альтернатива WinSet]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=11996</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=11996&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Альтернатива WinSet».]]></description>
		<lastBuildDate>Sat, 10 Sep 2016 18:19:28 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Альтернатива WinSet]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=107469#p107469</link>
			<description><![CDATA[<p>Проверил Вашим кодом и немного модифицированным (чтобы все через dllcall) - ничего не меняется.<br /></p><div class="codebox"><pre><code>LWIN &amp; RButton::
hWnd := WinExist(&quot;ahk_exe myGame.exe&quot;)
DeleteBorder(hWnd)
Return

DeleteBorder(hwnd)  {
   static GWL_STYLE := -16, GWL_EXSTYLE := -20, WS_CAPTION := 0xC00000, WS_THICKFRAME := 0x40000
        , WS_MINIMIZE := 0x20000000, WS_MAXIMIZE := 0x1000000, WS_SYSMENU := 0x80000
        , WS_EX_DLGMODALFRAME := 0x1, WS_EX_CLIENTEDGE := 0x200, WS_EX_STATICEDGE := 0x20000
        , SWP_FRAMECHANGED := 0x0020, SWP_NOMOVE := 0x0002, SWP_NOSIZE := 0x0001
        , SWP_NOZORDER := 0x0004, SWP_NOOWNERZORDER := 0x0200
   
   lStyle := DllCall(&quot;GetWindowLongPtr&quot;, Ptr, hwnd, Int, GWL_STYLE, Ptr)
   lExStyle := DllCall(&quot;GetWindowLongPtr&quot;, Ptr, hwnd, Int, GWL_EXSTYLE, Ptr)
   
   lStyle &amp;= ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZE | WS_MAXIMIZE | WS_SYSMENU)
   lExStyle &amp;= ~(WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE)
   
   DllCall(&quot;SetWindowLongPtr&quot;, Ptr, hwnd, Int, GWL_STYLE, Ptr, lStyle)
   DllCall(&quot;SetWindowLongPtr&quot;, Ptr, hwnd, Int, GWL_EXSTYLE, Ptr, lExStyle)
   
   DllCall(&quot;SetWindowPos&quot;, Ptr, hwnd, Int, 0, Int, 0, Int, 0, Int, 0, Int, 0, Ptr, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER)
}</code></pre></div><p>А вот к примеру в этой же игре WinMove в сравнении с DllCall(&quot;SetWindowPos&quot;, &quot;UInt&quot;, hWnd, &quot;UInt&quot;, 0, &quot;Int&quot;, 0, &quot;Int&quot;, 0, &quot;Int&quot;, w/2, &quot;Int&quot;, h, &quot;UInt&quot;, 0x400) не срабатывает нормально, а второй вариант отрабатывает правильно.</p>]]></description>
			<author><![CDATA[null@example.com (kharlashkin)]]></author>
			<pubDate>Sat, 10 Sep 2016 18:19:28 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=107469#p107469</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Альтернатива WinSet]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=107466#p107466</link>
			<description><![CDATA[<div class="codebox"><pre><code>Gui, +hwndhGui
Gui, Show, w300 h300

Sleep 1000

DeleteBorder(hGui)
Return

DeleteBorder(hwnd)  {
   static GWL_STYLE := -16, GWL_EXSTYLE := -20, WS_CAPTION := 0xC00000, WS_THICKFRAME := 0x40000
        , WS_MINIMIZE := 0x20000000, WS_MAXIMIZE := 0x1000000, WS_SYSMENU := 0x80000
        , WS_EX_DLGMODALFRAME := 0x1, WS_EX_CLIENTEDGE := 0x200, WS_EX_STATICEDGE := 0x20000
   
   lStyle := DllCall(&quot;GetWindowLongPtr&quot;, Ptr, hwnd, Int, GWL_STYLE, Ptr)
   lExStyle := DllCall(&quot;GetWindowLongPtr&quot;, Ptr, hwnd, Int, GWL_EXSTYLE, Ptr)
   
   lStyle &amp;= ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZE | WS_MAXIMIZE | WS_SYSMENU)
   lExStyle &amp;= ~(WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE)
   
   DllCall(&quot;SetWindowLongPtr&quot;, Ptr, hwnd, Int, GWL_STYLE, Ptr, lStyle)
   DllCall(&quot;SetWindowLongPtr&quot;, Ptr, hwnd, Int, GWL_EXSTYLE, Ptr, lExStyle)
   
   WinSet, Redraw,, ahk_id %hwnd%
}</code></pre></div><p>Но на самом деле никакой альтернативы WinSet нет, она использует тот же механизм, все эти стили можно было бы и с помощью WinSet изменить.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sat, 10 Sep 2016 15:51:26 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=107466#p107466</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Альтернатива WinSet]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=107465#p107465</link>
			<description><![CDATA[<p><strong>teadrinker</strong>, пробовал - не помогает. И по названию и по процессу и по ahk_class.</p>]]></description>
			<author><![CDATA[null@example.com (kharlashkin)]]></author>
			<pubDate>Sat, 10 Sep 2016 13:41:23 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=107465#p107465</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Альтернатива WinSet]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=107464#p107464</link>
			<description><![CDATA[<p><strong>kharlashkin</strong>, <a href="http://forum.script-coding.com/viewtopic.php?id=9590">не нужно</a> цитировать предыдущий пост. Для начала стоит попробовать обращаться к окну не по ahk_exe, а по названию и/или ahk_class.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sat, 10 Sep 2016 13:37:48 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=107464#p107464</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Альтернатива WinSet]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=107459#p107459</link>
			<description><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Игры используют нестандартные окна, рамки могут быть просто нарисованными.</p></blockquote></div><p>Да нет, вроде стандартное Windows окно, дело в том что в зависимости от &quot;фазы луны&quot; срабатывает и приведенный код. Вот ищу способ попробовать через DllCall, нашел пример на <a href="http://stackoverflow.com/questions/2398746/removing-window-border">C/C++</a>. Может кто подскажет как его применить в AHK</p>]]></description>
			<author><![CDATA[null@example.com (kharlashkin)]]></author>
			<pubDate>Sat, 10 Sep 2016 05:20:19 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=107459#p107459</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Альтернатива WinSet]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=107458#p107458</link>
			<description><![CDATA[<p>Игры используют нестандартные окна, рамки могут быть просто нарисованными.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sat, 10 Sep 2016 05:02:13 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=107458#p107458</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Альтернатива WinSet]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=107456#p107456</link>
			<description><![CDATA[<p>Добрый день!</p><p>Интересует альтернативное убирание рамок окна, при использовании:<br /></p><div class="codebox"><pre><code>WinSet, Style, -0xC40000, ahk_exe myGame.exe</code></pre></div><p>Рамки не убираются. Ткните в пример через DllCall.</p>]]></description>
			<author><![CDATA[null@example.com (kharlashkin)]]></author>
			<pubDate>Sat, 10 Sep 2016 04:41:41 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=107456#p107456</guid>
		</item>
	</channel>
</rss>
