<?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="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10628&amp;type=atom" />
	<updated>2015-05-07T14:53:45Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10628</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=93861#p93861" />
			<content type="html"><![CDATA[<p>Информация о названиях курсоров <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms648391%28v=vs.85%29.aspx#IDC_APPSTARTING">здесь</a>.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-05-07T14:53:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=93861#p93861</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=93857#p93857" />
			<content type="html"><![CDATA[<p><strong>Foma</strong>, Например у меня на последней версии винды(win10 10074) загружается кастумная иконка нормально. А насчет вин xp,2000 и тд не знаю, но скорей всего тоже должно нормально отобразится.</p>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2015-05-07T12:56:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=93857#p93857</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=93854#p93854" />
			<content type="html"><![CDATA[<p>Ещё хотел бы спросить. Перечисленные курсоры есть и одинаковые(однотипные) во всех виндовс? Или где-то может загрузиться принципиально другая картинка, или вообще курсор у пользователя пропадёт?</p>]]></content>
			<author>
				<name><![CDATA[Foma]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31521</uri>
			</author>
			<updated>2015-05-07T11:51:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=93854#p93854</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=93850#p93850" />
			<content type="html"><![CDATA[<p>Отредактировал немного. Правильно</p><div class="codebox"><pre><code>hCopy := DllCall(&quot;CopyImage&quot;, Ptr, hCursor, UInt, IMAGE_CURSOR, Int, 0, Int, 0, UInt, 0, Ptr)</code></pre></div><p>вместо</p><div class="codebox"><pre><code>hCopy := DllCall(&quot;CopyImage&quot;, Ptr, hCursor, UInt, IMAGE_CURSOR, Int, 0, Int, 0, UInt, 0)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-05-06T22:04:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=93850#p93850</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=93849#p93849" />
			<content type="html"><![CDATA[<p>Всё, нашёл. Менять нужно первую строку.</p>]]></content>
			<author>
				<name><![CDATA[Foma]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31521</uri>
			</author>
			<updated>2015-05-06T21:50:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=93849#p93849</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=93848#p93848" />
			<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>2015-05-06T21:46:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=93848#p93848</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=93846#p93846" />
			<content type="html"><![CDATA[<p>Спасибо! Что-то похожее я встречал и не смог приспособить.</p>]]></content>
			<author>
				<name><![CDATA[Foma]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31521</uri>
			</author>
			<updated>2015-05-06T21:44:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=93846#p93846</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=93844#p93844" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>ReplaceSystemCursors(&quot;IDC_NO&quot;)
OnExit, Exit
Return

Esc:: ExitApp
Exit:
   ReplaceSystemCursors()
   ExitApp

ReplaceSystemCursors(IDC = &quot;&quot;)
{
   static IMAGE_CURSOR := 2, SPI_SETCURSORS := 0x57
        , SysCursors := { IDC_APPSTARTING: 32650
                        , IDC_ARROW: 32512
                        , IDC_CROSS: 32515
                        , IDC_HAND: 32649
                        , IDC_HELP: 32651
                        , IDC_IBEAM: 32513
                        , IDC_NO: 32648
                        , IDC_SIZEALL: 32646
                        , IDC_SIZENESW: 32643
                        , IDC_SIZENWSE: 32642
                        , IDC_SIZEWE: 32644
                        , IDC_SIZENS: 32645 
                        , IDC_UPARROW: 32516
                        , IDC_WAIT: 32514 }
   if !IDC
      DllCall(&quot;SystemParametersInfo&quot;, UInt, SPI_SETCURSORS, UInt, 0, UInt, 0, UInt, 0)
   else  {
      hCursor := DllCall(&quot;LoadCursor&quot;, Ptr, 0, UInt, SysCursors[IDC], Ptr)
      for k, v in SysCursors  {
         hCopy := DllCall(&quot;CopyImage&quot;, Ptr, hCursor, UInt, IMAGE_CURSOR, Int, 0, Int, 0, UInt, 0, Ptr)
         DllCall(&quot;SetSystemCursor&quot;, Ptr, hCopy, UInt, v)
      }
   }
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-05-06T20:25:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=93844#p93844</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=93838#p93838" />
			<content type="html"><![CDATA[<p>Всё равно, если он над блокнотом или над текстом в броузере, он меняется на стандартный, если тянешь окно за бок - тоже.</p>]]></content>
			<author>
				<name><![CDATA[Foma]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31521</uri>
			</author>
			<updated>2015-05-06T17:28:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=93838#p93838</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=93836#p93836" />
			<content type="html"><![CDATA[<p>Вот так пользуюсь: (надо посмотреть как загрузить из файла, не помню уже)<br /></p><div class="codebox"><pre><code>IDC_APPSTARTING := DllCall(&quot;User32.dll\LoadCursor&quot;, &quot;Ptr&quot;, NULL, &quot;Int&quot;, 32650, &quot;UPtr&quot;)
IDC_ARROW := DllCall(&quot;User32.dll\LoadCursor&quot;, &quot;Ptr&quot;, NULL, &quot;Int&quot;, 32512, &quot;UPtr&quot;)
IDC_CROSS := DllCall(&quot;User32.dll\LoadCursor&quot;, &quot;Ptr&quot;, NULL, &quot;Int&quot;, 32515, &quot;UPtr&quot;)
IDC_HAND := DllCall(&quot;User32.dll\LoadCursor&quot;, &quot;Ptr&quot;, NULL, &quot;Int&quot;, 32649, &quot;UPtr&quot;)
IDC_HELP := DllCall(&quot;User32.dll\LoadCursor&quot;, &quot;Ptr&quot;, NULL, &quot;Int&quot;, 32651, &quot;UPtr&quot;)
IDC_IBEAM := DllCall(&quot;User32.dll\LoadCursor&quot;, &quot;Ptr&quot;, NULL, &quot;Int&quot;, 32513, &quot;UPtr&quot;)
IDC_ICON := DllCall(&quot;User32.dll\LoadCursor&quot;, &quot;Ptr&quot;, NULL, &quot;Int&quot;, 32641, &quot;UPtr&quot;)
IDC_NO := DllCall(&quot;User32.dll\LoadCursor&quot;, &quot;Ptr&quot;, NULL, &quot;Int&quot;, 32648, &quot;UPtr&quot;)
IDC_SIZE := DllCall(&quot;User32.dll\LoadCursor&quot;, &quot;Ptr&quot;, NULL, &quot;Int&quot;, 32640, &quot;UPtr&quot;)
IDC_SIZEALL := DllCall(&quot;User32.dll\LoadCursor&quot;, &quot;Ptr&quot;, NULL, &quot;Int&quot;, 32646, &quot;UPtr&quot;)
IDC_SIZENESW := DllCall(&quot;User32.dll\LoadCursor&quot;, &quot;Ptr&quot;, NULL, &quot;Int&quot;, 32643, &quot;UPtr&quot;)
IDC_SIZENS := DllCall(&quot;User32.dll\LoadCursor&quot;, &quot;Ptr&quot;, NULL, &quot;Int&quot;, 32645, &quot;UPtr&quot;)
IDC_SIZENWSE := DllCall(&quot;User32.dll\LoadCursor&quot;, &quot;Ptr&quot;, NULL, &quot;Int&quot;, 32642, &quot;UPtr&quot;)
IDC_SIZEWE := DllCall(&quot;User32.dll\LoadCursor&quot;, &quot;Ptr&quot;, NULL, &quot;Int&quot;, 32644, &quot;UPtr&quot;)
IDC_UPARROW := DllCall(&quot;User32.dll\LoadCursor&quot;, &quot;Ptr&quot;, NULL, &quot;Int&quot;, 32516, &quot;UPtr&quot;)
IDC_WAIT := DllCall(&quot;User32.dll\LoadCursor&quot;, &quot;Ptr&quot;, NULL, &quot;Int&quot;, 32514, &quot;UPtr&quot;)


  DllCall(&quot;SetSystemCursor&quot;,Ptr,IDC_SIZEALL,Int,32512) ; установить курсор на загруженный в переменную &quot;IDC_SIZEALL&quot;

  DllCall(&quot;SystemParametersInfo&quot;,UInt,0x57,UInt,0,UInt,0,UInt,0) ; вернуть по умолчанию.
</code></pre></div><p>Вот с DLL&#039;ки (<a href="http://www.autohotkey.com/board/topic/97994-load-cursor-from-dll/">источник</a>):<br /></p><div class="codebox"><pre><code>hModule := DllCall(&quot;LoadLibrary&quot;, str, &quot;dllName.dll&quot;) ; load dll into memory
DllCall(&quot;User32.dll\LoadCursor&quot;, UPtr, hModule, Str, &quot;CursorName&quot;) ; call loadcursor passing the result from DllMain.. </code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2015-05-06T17:04:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=93836#p93836</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=93834#p93834" />
			<content type="html"><![CDATA[<p>Как сменить курсор на другой системный так, чтобы он не менялся в зависимости от действия и местоположения?&nbsp; Всё что нашёл на эту тему либо не работает, либо меняет курсор непредсказуемо. То при перетаскивании вдруг меняется, то над полем Edit, то ещё как-то.<br />&nbsp; Помогите назначить на нужный курсор(любой, но неизменный), а потом вернуть всё к стандарту.</p>]]></content>
			<author>
				<name><![CDATA[Foma]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31521</uri>
			</author>
			<updated>2015-05-06T16:37:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=93834#p93834</id>
		</entry>
</feed>
