<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: DllCall SetPixel]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=15907&amp;type=atom" />
	<updated>2020-12-10T14:57:02Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=15907</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DllCall SetPixel]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=144074#p144074" />
			<content type="html"><![CDATA[<p>Хэндлы — это все переменные, которые в вашем (точнее, наверно, где-то скопированном) коде начинаются на h.<br /></p><div class="quotebox"><cite>basstech пишет:</cite><blockquote><p>Как её запустить?</p></blockquote></div><p>Как-то особо запускать DllCall() не надо, достаточно просто написать её в коде, желательно с правильными параметрами. Чтобы разобраться с ними, придётся почитать описание к api-функции, которую пытаетесь вызвать, в данном случае <a href="https://docs.microsoft.com/ru-ru/windows/win32/api/wingdi/nf-wingdi-setpixel">SetPixel</a>. У вас в последнем параметре непонятно что, тип данных Ptr, а сам параметр строка в кавычках, такого не может быть. В описании видим, что там должна быть структура COLORREF. Это просто число вида 0x00bbggrr, где bb, gg и rr — значения blue, green и red, например, синий цвет будет 0x00FF0000. Тип данных DWORD, соответственно должен быть UInt.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-12-10T14:57:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=144074#p144074</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DllCall SetPixel]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=144073#p144073" />
			<content type="html"><![CDATA[<p><strong>ypppu</strong><br />Поправил. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p><p><strong>teadrinker</strong><br />По поводу хэндлов, речь идёт о этой строке? Как её запустить?<br /></p><div class="codebox"><pre><code>DllCall(&quot;SetPixel&quot;, &quot;Ptr&quot;, hDC, &quot;Int&quot;, 50, &quot;int&quot;, 60, &quot;Ptr&quot;, &quot;CD5C5C&quot;)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[basstech]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41121</uri>
			</author>
			<updated>2020-12-10T14:30:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=144073#p144073</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DllCall SetPixel]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=144071#p144071" />
			<content type="html"><![CDATA[<p><span style="color: green"><strong>basstech</strong>, предложения должны начинаться с заглавной буквы и заканчиваться знаками препинания. Смайлик точку не заменяет.<br />Не следует цитировать предыдущее сообщение целиком. Тем более своё.</span><br /><a href="http://forum.script-coding.com/viewtopic.php?pid=144069#p144069">http://forum.script-coding.com/viewtopi … 69#p144069</a><br /><a href="http://forum.script-coding.com/viewtopic.php?pid=144068#p144068">http://forum.script-coding.com/viewtopi … 68#p144068</a><br /><a href="http://forum.script-coding.com/viewtopic.php?pid=144066#p144066">http://forum.script-coding.com/viewtopi … 66#p144066</a><br /><a href="http://forum.script-coding.com/viewtopic.php?pid=143929#p143929">http://forum.script-coding.com/viewtopi … 29#p143929</a><br /><a href="http://forum.script-coding.com/viewtopic.php?pid=142522#p142522">http://forum.script-coding.com/viewtopi … 22#p142522</a><br /><span style="color: green">Исправьте!</span></p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2020-12-10T13:38:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=144071#p144071</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DllCall SetPixel]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=144070#p144070" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>basstech пишет:</cite><blockquote><p>Вот что ещё хотел спросить, как заставить точку не исчезать при передвижении окна?</p></blockquote></div><p>Передвижение окна тут не при чём, дело в перерисовке окна. Когда окно перерисовывается, ваша точка пропадает. В коде все хэндлы должны быть Ptr, для цифр кавычки не нужны.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-12-10T11:39:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=144070#p144070</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DllCall SetPixel]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=144068#p144068" />
			<content type="html"><![CDATA[<p>Привязка к окну, как оказалось, не работает. <img src="//forum.script-coding.com/img/smilies/sad.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[basstech]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41121</uri>
			</author>
			<updated>2020-12-10T11:03:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=144068#p144068</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DllCall SetPixel]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=144066#p144066" />
			<content type="html"><![CDATA[<p>Постараюсь найти что-то, что поможет не только рисовать, но и писать текст.<br />Вот что ещё хотел спросить, как заставить точку не исчезать при передвижении окна?</p>]]></content>
			<author>
				<name><![CDATA[basstech]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41121</uri>
			</author>
			<updated>2020-12-10T10:22:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=144066#p144066</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DllCall SetPixel]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=144065#p144065" />
			<content type="html"><![CDATA[<p>Нашел решение и переделал под нужный лад:</p><div class="codebox"><pre><code>
SetPixel(&quot;Безымянный&quot;, &quot;0x000000&quot;, &quot;500&quot;, &quot;500&quot;, &quot;510&quot;, &quot;510&quot;)

SetPixel(Title, Color, x1, y1, x2, y2)	{
	hWnd := WinExist(Title)
	hBr  := DllCall( &quot;CreateSolidBrush&quot;, UInt, Color )
	hDC := DllCall(&quot;GetDC&quot;, Ptr, hWnd, Ptr)
	hRgn := DllCall( &quot;CreateEllipticRgn&quot;, Int,x1, Int,y1, Int,x2, Int,y2 )
	DllCall( &quot;FillRgn&quot;, UInt,hDC, UInt,hRgn, UInt,hBr ) 
	DllCall(&quot;ReleaseDC&quot;, &quot;uint&quot;, 0, &quot;uint&quot;, hDC)
}
</code></pre></div><p>Постараюсь найти что-то, что поможет не только рисовать, но и писать текст.</p>]]></content>
			<author>
				<name><![CDATA[basstech]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41121</uri>
			</author>
			<updated>2020-12-10T10:19:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=144065#p144065</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: DllCall SetPixel]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=144063#p144063" />
			<content type="html"><![CDATA[<p>Здравствуйте, учусь работать с WinAPI.<br />Хочу создать точку в блокноте, но что-то идёт не так. В чём дело?)</p><div class="codebox"><pre><code>
	hWnd := WinExist(&quot;Безымянный&quot;)
	hDC := DllCall(&quot;GetDC&quot;, Ptr, hWnd, Ptr)
	DllCall(&quot;SetPixel&quot;, &quot;Ptr&quot;, hDC, &quot;Int&quot;, 50, &quot;int&quot;, 60, &quot;Ptr&quot;, &quot;CD5C5C&quot;)
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[basstech]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41121</uri>
			</author>
			<updated>2020-12-10T09:18:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=144063#p144063</id>
		</entry>
</feed>
