<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Добавить окну эффект тени]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=12310&amp;type=atom" />
	<updated>2017-01-14T10:29:29Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=12310</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Добавить окну эффект тени]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=111032#p111032" />
			<content type="html"><![CDATA[<p>Разобрался. <br />Чтобы в своем гуи работало, надо в настройках &quot;perfomance options&quot; поставить &quot;show shadows under windows&quot;. <br />Но в чужом у меня не получается - пишет access denied.<br />Тут либо надо dll в процесс вставлять, либо хук какой-то делать.<br />Надо ждать помощи от тех, кто в теме - <strong>teadrinker</strong>, <strong>YMP</strong>...<br /></p><div class="codebox"><pre><code>hwnd := WinExist(&quot;ahk_class MozillaWindowClass&quot;)
GetClassLong := DllCall(&quot;GetClassLong&quot; (A_PtrSize=8 ? &quot;Ptr&quot;:&quot;&quot;), &quot;Ptr&quot;, hwnd, &quot;int&quot;, -26)
if A_LastError != 0
   msgbox % &quot;GetClassLong error:`n&quot; GetErrorString(A_LastError)
DllCall(&quot;SetClassLong&quot; (A_PtrSize=8 ? &quot;Ptr&quot;:&quot;&quot;), &quot;Ptr&quot;, hwnd, &quot;int&quot;, -26, &quot;Ptr&quot;, GetClassLong | 0x20000)
if A_LastError != 0
   msgbox % &quot;SetClassLong error:`n&quot; GetErrorString(A_LastError)
return



GetErrorString(Errornumber)
{
	VarSetCapacity(ErrorString, 1024)		;String to hold the error-message.
	
	DllCall(&quot;FormatMessage&quot;
			, UINT, 0x00001000			;FORMAT_MESSAGE_FROM_SYSTEM: The function should search the system message-table resource(s) for the requested message.
			, UINT, NULL					;A handle to the module that contains the message table to search.
			, UINT, Errornumber
			, UINT, 0							;Language-ID is automatically retreived
			, Str, ErrorString
			, UINT, 1024					;Buffer-Length
			, str, &quot;&quot;)					;An array of values that are used as insert values in the formatted message. (not used)
	
	StringReplace, ErrorString, ErrorString, `r`n, %A_Space%, All		;Replaces newlines by A_Space for inline-output
	
	return %ErrorString%
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-01-14T10:29:29Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=111032#p111032</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Добавить окну эффект тени]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=111022#p111022" />
			<content type="html"><![CDATA[<p><strong>ypppu</strong>, у меня этот код не работает (тень к гуи не добавляет), хотя по справке с майкрософт должен.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-01-13T23:38:15Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=111022#p111022</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Добавить окну эффект тени]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=111019#p111019" />
			<content type="html"><![CDATA[<p><strong>ypppu</strong>, да уже видел, попробовал, у меня тень как-то &quot;задвоилась&quot; + не получилось добавить стиль не AHK GUI.</p><p>Вот еще нашел:<br /><a href="https://marcin.floryan.pl/blog/2010/08/wpf-drop-shadow-with-windows-dwm-api">https://marcin.floryan.pl/blog/2010/08/ … ws-dwm-api</a><br />Насколько я понимаю C#, вроде то, что нужно, только как тоже самое записать на AHK.</p>]]></content>
			<author>
				<name><![CDATA[upsi_daezium]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34120</uri>
			</author>
			<updated>2017-01-13T21:27:57Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=111019#p111019</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Добавить окну эффект тени]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=111010#p111010" />
			<content type="html"><![CDATA[<p>На оф. форуме как-то к GUI приспособили: <a href="https://autohotkey.com/board/topic/24934-shadow/">https://autohotkey.com/board/topic/24934-shadow/</a>.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2017-01-13T19:06:20Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=111010#p111010</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Добавить окну эффект тени]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=111009#p111009" />
			<content type="html"><![CDATA[<p>Путем поисков нарыл:<br /><a href="https://www.autoitscript.com/forum/topic/90917-add-a-drop-shadow-to-native-autoit-gui-forms-and-dialogs/">https://www.autoitscript.com/forum/topi … d-dialogs/</a><br />Вроде то, что нужно, только для autoit, теперь думаю, для для&nbsp; AHK переделать.</p>]]></content>
			<author>
				<name><![CDATA[upsi_daezium]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34120</uri>
			</author>
			<updated>2017-01-13T17:27:58Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=111009#p111009</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Добавить окну эффект тени]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=110989#p110989" />
			<content type="html"><![CDATA[<p>День добрый.<br />Запускаю внешнюю программку из скрипта, а там так неудобно сделано, все окно белое и другие элементы в светлых тонах, плохо видно. Причем никакой границы у окна нет и тени тоже нет.<br />Я добавил окну&nbsp; Style +0x800000&nbsp; WS_BORDER, стало получше, а добавить тень так и не получилось.<br />Пробовал другие стили, которые нашел на форуме, но, пока не помогло.<br />Так же читал документацию на сайте Майкрософт об CS_DROPSHADOW и SPI_SETDROPSHADOW, но, как там это все сделать пока знаний недостаточно.<br />Может быть кто-нибудь решал подобную задачу?</p>]]></content>
			<author>
				<name><![CDATA[upsi_daezium]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34120</uri>
			</author>
			<updated>2017-01-13T11:29:59Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=110989#p110989</id>
		</entry>
</feed>
