<?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=5685&amp;type=atom" />
	<updated>2011-04-01T19:31:25Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=5685</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменение текущего курсора]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=47284#p47284" />
			<content type="html"><![CDATA[<p>Спасибо!</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2011-04-01T19:31:25Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=47284#p47284</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменение текущего курсора]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=47282#p47282" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>   OnExit, Exit

   OCR_NORMAL := 32512    ; обычный курсор в виде стрелки
   OCR_HAND := 32649    ; курсор в виде руки

   NORMAL_CursorHandle := DllCall( &quot;LoadCursor&quot;, Uint,0, Int, OCR_NORMAL) ; загрузить системный OCR_NORMAL-курсор
   HAND_CursorHandle   := DllCall( &quot;LoadCursor&quot;, Uint,0, Int, OCR_HAND)   ; загрузить системный OCR_HAND-курсор
   Return

Exit:   ; восстановление курсора:
   DllCall(&quot;SystemParametersInfo&quot;, UInt, SPI_SETCURSORS:=0x57, UInt, 0, UInt, 0, UInt, 0)
   Return

9::
   if !hand
      DllCall(&quot;SetSystemCursor&quot;, UInt, HAND_CursorHandle, Int, OCR_NORMAL), hand := 1
   Return
   
; восстановление курсора:
0:: DllCall(&quot;SystemParametersInfo&quot;, UInt, SPI_SETCURSORS:=0x57, UInt, 0, UInt, 0, UInt, 0), hand := &quot;&quot;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2011-04-01T19:15:00Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=47282#p47282</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Изменение текущего курсора]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=47280#p47280" />
			<content type="html"><![CDATA[<p>Прошу помочь. Нужно по нажатию [9] превратить курсор в руку,&nbsp; а по нажатию [0] превратить курсор в стрелку.<br /></p><div class="codebox"><pre><code>OCR_NORMAL := 32512    ; обычный курсор в виде стрелки
OCR_HAND := 32649    ; курсор в виде руки

NORMAL_CursorHandle := DllCall( &quot;LoadCursor&quot;, Uint,0, Int, OCR_NORMAL) ; загрузить системный OCR_NORMAL-курсор
HAND_CursorHandle   := DllCall( &quot;LoadCursor&quot;, Uint,0, Int, OCR_HAND)   ; загрузить системный OCR_HAND-курсор

9:: DllCall(&quot;SetSystemCursor&quot;, UInt, HAND_CursorHandle,    Int, OCR_NORMAL) ; заменить текущий OCR_NORMAL-курсор на системный OCR_HAND-курсор

0:: DllCall(&quot;SetSystemCursor&quot;, UInt, NORMAL_CursorHandle,    Int, OCR_NORMAL) ; заменить текущий OCR_NORMAL-курсор на системный OCR_NORMAL-курсор</code></pre></div><p>Проблемы: Если нажать [9] дважды, курсор возвращается в противоположное состояние. То же и при нажатии [0].</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2011-04-01T19:01:02Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=47280#p47280</id>
		</entry>
</feed>
