<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Ограничение размеров tooltip]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=16969</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=16969&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Ограничение размеров tooltip».]]></description>
		<lastBuildDate>Tue, 15 Feb 2022 15:05:01 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Ограничение размеров tooltip]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=152213#p152213</link>
			<description><![CDATA[<p><strong>teadrinker</strong>, огромное спасибо.</p>]]></description>
			<author><![CDATA[null@example.com (Morux2112)]]></author>
			<pubDate>Tue, 15 Feb 2022 15:05:01 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=152213#p152213</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Ограничение размеров tooltip]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=152203#p152203</link>
			<description><![CDATA[<p>Ну, если по-умному, то так:<br /></p><div class="codebox"><pre><code>#Persistent
Hook := new WindowsHook(WH_CALLWNDPROC := 4, &quot;CallWndProc&quot;, maxWidth := 200, false)
ToolTip % &quot;Здравствуйте. Можно ли как-то ограничить размеры ToolTip, например, по ширине? Чтобы длинный текст писался в столбик, а не одной большой строчкой.&quot;
Return

CallWndProc(nCode, wParam, lParam) {
   static TTM_TRACKPOSITION := 0x0412, TTM_SETMAXTIPWIDTH := 0x0418
   msg := NumGet(lParam + A_PtrSize*2, &quot;UInt&quot;)
   hwnd := NumGet(lParam + A_PtrSize*3)
   if (msg = TTM_TRACKPOSITION)
      DllCall(&quot;SendMessage&quot;, &quot;Ptr&quot;, hwnd, &quot;UInt&quot;, TTM_SETMAXTIPWIDTH, &quot;Int&quot;, 0, &quot;Int&quot;, A_EventInfo)
   DllCall(&quot;CallNextHookEx&quot;, &quot;Ptr&quot;, 0, &quot;int&quot;, nCode, &quot;Ptr&quot;, wParam, &quot;Ptr&quot;, lParam, &quot;Ptr&quot;)
}

class WindowsHook {
   __New(type, callback, eventInfo := &quot;&quot;, isGlobal := true) {
      this.pCallback := RegisterCallback(callback, &quot;Fast&quot;, 3, eventInfo)
      this.hHook := DllCall(&quot;SetWindowsHookEx&quot;, &quot;Int&quot;, type, &quot;Ptr&quot;, this.pCallback
                                              , &quot;Ptr&quot;, !isGlobal ? 0 : DllCall(&quot;GetModuleHandle&quot;, &quot;UInt&quot;, 0, &quot;Ptr&quot;)
                                              , &quot;UInt&quot;, isGlobal ? 0 : DllCall(&quot;GetCurrentThreadId&quot;), &quot;Ptr&quot;)
   }
   __Delete() {
      DllCall(&quot;UnhookWindowsHookEx&quot;, &quot;Ptr&quot;, this.hHook)
      DllCall(&quot;GlobalFree&quot;, &quot;Ptr&quot;, this.pCallback, &quot;Ptr&quot;)
   }
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Tue, 15 Feb 2022 09:03:47 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=152203#p152203</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Ограничение размеров tooltip]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=152200#p152200</link>
			<description><![CDATA[<p>Ну, по идее ничего не мешает разбивать все тексты на куски по десть (или сколько надо) слов и встраивать знак переноса в конце каждой группы.</p>]]></description>
			<author><![CDATA[null@example.com (Foma)]]></author>
			<pubDate>Tue, 15 Feb 2022 08:37:55 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=152200#p152200</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Ограничение размеров tooltip]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=152195#p152195</link>
			<description><![CDATA[<p><strong>teadrinker</strong>, текст в ToolTip идет через множество переменных, и количество слов в них заранее не известно. Поэтому &#039;n проходит мимо. Хотя может и можно как-то реализовать, но идей нет.</p>]]></description>
			<author><![CDATA[null@example.com (Morux2112)]]></author>
			<pubDate>Tue, 15 Feb 2022 05:30:40 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=152195#p152195</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Ограничение размеров tooltip]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=152194#p152194</link>
			<description><![CDATA[<p>Есть такой символ: <span style="color: red">`n</span>, попробуйте использовать его.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Tue, 15 Feb 2022 00:35:54 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=152194#p152194</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Ограничение размеров tooltip]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=152193#p152193</link>
			<description><![CDATA[<p>Здравствуйте. Можно ли как-то ограничить размеры ToolTip, например, по ширине? Чтобы длинный текст писался в столбик, а не одной большой строчкой.</p>]]></description>
			<author><![CDATA[null@example.com (Morux2112)]]></author>
			<pubDate>Tue, 15 Feb 2022 00:17:52 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=152193#p152193</guid>
		</item>
	</channel>
</rss>
