<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Дефолтный шрифт в Gui?]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=8561&amp;type=atom" />
	<updated>2013-08-12T18:03:15Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=8561</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Дефолтный шрифт в Gui?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=74458#p74458" />
			<content type="html"><![CDATA[<p>Попробовал всё из этой компании : <br />http://sawarogu.3neko.ru/articles/spisok-bezorasnykh-shriftov-web-safe-fonts/<br />&nbsp; И ни один не оказался тем дефолтным, под который я всё настроил. Мистика какая-то. Ладно буду ставить везде Arial.</p>]]></content>
			<author>
				<name><![CDATA[Pokerist]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24990</uri>
			</author>
			<updated>2013-08-12T18:03:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=74458#p74458</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Дефолтный шрифт в Gui?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=74457#p74457" />
			<content type="html"><![CDATA[<p>А нет такой сравнительной таблички, которая сравниваются системы от XP и выше?</p>]]></content>
			<author>
				<name><![CDATA[Pokerist]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24990</uri>
			</author>
			<updated>2013-08-12T17:53:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=74457#p74457</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Дефолтный шрифт в Gui?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=74451#p74451" />
			<content type="html"><![CDATA[<p>Дефолтный в системе и дефолтный в GUI — одно и то же. Почему не может быть? Среди этих жёлтых только те, которые есть во всех перечисленных системах, поэтому и использовать их безопасно. <em>MS Shell Dlg</em> к их числу не относится.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2013-08-12T14:01:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=74451#p74451</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Дефолтный шрифт в Gui?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=74450#p74450" />
			<content type="html"><![CDATA[<p>Странно как-то. Дефолтный шрифт в системе, который подставляется в Gui, если нет дефолтного для самого Gui, не имеется&nbsp; в этих &quot;жёлтых&quot;.&nbsp; Разве может такое быть?</p>]]></content>
			<author>
				<name><![CDATA[Pokerist]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24990</uri>
			</author>
			<updated>2013-08-12T13:54:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=74450#p74450</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Дефолтный шрифт в Gui?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=74449#p74449" />
			<content type="html"><![CDATA[<p>Лучше использовать какой-то из шрифтов, которые <a href="http://l.autohotkey.net/docs/misc/FontsStandard.htm">здесь</a> помечены жёлтым.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2013-08-12T13:17:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=74449#p74449</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Дефолтный шрифт в Gui?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=74448#p74448" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>А я не знаю, у всех ли он есть, может, в XP нету.</p></blockquote></div><p>&nbsp; Я даже у себя в папке Fonts его не нашёл. </p><br /><div class="quotebox"><blockquote><p>используется дефолтный</p></blockquote></div><p> Да и у меня совпало, но как узнать что это за дефолтный шрифт, чтобы его прописать жёстко?</p>]]></content>
			<author>
				<name><![CDATA[Pokerist]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24990</uri>
			</author>
			<updated>2013-08-12T12:53:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=74448#p74448</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Дефолтный шрифт в Gui?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=74447#p74447" />
			<content type="html"><![CDATA[<p>А я не знаю, у всех ли он есть, может, в XP нету. В случае, если шрифт не найден, используется дефолтный, во всяком случае, у меня так получается:<br /></p><div class="codebox"><pre><code>Gui, Font, s12, белиберда
Gui, Add, Text, hwndhText, test
Gui, Show, w300

MsgBox, % Control_GetFont(hText)
ExitApp

Control_GetFont( hwnd ) { ; www.autohotkey.com/forum/viewtopic.php?p=465438#465438 By SKAN
 SendMessage 0x31, 0, 0, , ahk_id %hwnd% ; WM_GETFONT                 Created: 27-Apr-2011
 IfEqual,ErrorLevel,FAIL, Return
 hFont := Errorlevel, VarSetCapacity( LF, szLF := 60*( A_IsUnicode ? 2:1 ) )
 DllCall(&quot;GetObject&quot;, UInt,hFont, Int,szLF, UInt,&amp;LF )
 hDC := DllCall( &quot;GetDC&quot;, UInt,hwnd ), DPI := DllCall( &quot;GetDeviceCaps&quot;, UInt,hDC, Int,90 )
 DllCall( &quot;ReleaseDC&quot;, Int,0, UInt,hDC ), S := Round( ( -NumGet( LF,0,&quot;Int&quot; )*72 ) / DPI )
Return DllCall( &quot;MulDiv&quot;,Int,&amp;LF+28, Int,1,Int,1, Str ), DllCall( &quot;SetLastError&quot;, UInt,S )
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2013-08-12T12:42:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=74447#p74447</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Дефолтный шрифт в Gui?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=74446#p74446" />
			<content type="html"><![CDATA[<p>Получил &quot;MS Shell Dlg 8&quot;. По идее это системный шрифт и если его прописать в начале Gui, то у всех окна должны отображаться одинаково?</p>]]></content>
			<author>
				<name><![CDATA[Pokerist]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24990</uri>
			</author>
			<updated>2013-08-12T12:35:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=74446#p74446</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Дефолтный шрифт в Gui?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=74443#p74443" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>GuiDefaultFont() {        ; By SKAN www.autohotkey.com/forum/viewtopic.php?p=465438#465438
 hFont := DllCall( &quot;GetStockObject&quot;, UInt,17 ) ; DEFAULT_GUI_FONT
 VarSetCapacity( LF, szLF := 60*( A_IsUnicode ? 2:1 ) )
 DllCall(&quot;GetObject&quot;, UInt,hFont, Int,szLF, UInt,&amp;LF )
 hDC := DllCall( &quot;GetDC&quot;, UInt,hwnd ), DPI := DllCall( &quot;GetDeviceCaps&quot;, UInt,hDC, Int,90 )
 DllCall( &quot;ReleaseDC&quot;, Int,0, UInt,hDC ), S := Round( ( -NumGet( LF,0,&quot;Int&quot; )*72 ) / DPI )
Return DllCall( &quot;MulDiv&quot;,Int,&amp;LF+28, Int,1,Int,1, Str ), DllCall( &quot;SetLastError&quot;, UInt,S )
}

A_GuiFont     := GuiDefaultFont()
A_GuiFontSize := A_LastError

MsgBox, %A_GuiFont%`t%A_GuiFontSize%</code></pre></div><p>Или ещё так (нужно передать hwnd контрола):<br /></p><div class="codebox"><pre><code>Gui, Add, Text, hwndhText, test
MsgBox, % Control_GetFont(hText)
ExitApp

Control_GetFont( hwnd ) { ; www.autohotkey.com/forum/viewtopic.php?p=465438#465438 By SKAN
 SendMessage 0x31, 0, 0, , ahk_id %hwnd% ; WM_GETFONT                 Created: 27-Apr-2011
 IfEqual,ErrorLevel,FAIL, Return
 hFont := Errorlevel, VarSetCapacity( LF, szLF := 60*( A_IsUnicode ? 2:1 ) )
 DllCall(&quot;GetObject&quot;, UInt,hFont, Int,szLF, UInt,&amp;LF )
 hDC := DllCall( &quot;GetDC&quot;, UInt,hwnd ), DPI := DllCall( &quot;GetDeviceCaps&quot;, UInt,hDC, Int,90 )
 DllCall( &quot;ReleaseDC&quot;, Int,0, UInt,hDC ), S := Round( ( -NumGet( LF,0,&quot;Int&quot; )*72 ) / DPI )
Return DllCall( &quot;MulDiv&quot;,Int,&amp;LF+28, Int,1,Int,1, Str ), DllCall( &quot;SetLastError&quot;, UInt,S )
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2013-08-12T12:13:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=74443#p74443</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Дефолтный шрифт в Gui?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=74442#p74442" />
			<content type="html"><![CDATA[<p>Я тупанул и забыл прописать сразу, а теперь когда штук 80 элементов подстроено под дефолтный шрифт, хочется как-то спасти работу. Как узнать что за шрифт сейчас используется в GUI, чтобы прописать именно его?</p>]]></content>
			<author>
				<name><![CDATA[Pokerist]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24990</uri>
			</author>
			<updated>2013-08-12T12:03:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=74442#p74442</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Дефолтный шрифт в Gui?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=74440#p74440" />
			<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>2013-08-12T12:00:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=74440#p74440</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Дефолтный шрифт в Gui?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=74425#p74425" />
			<content type="html"><![CDATA[<p>Хочу узнать будет ли использован тот же шрифт у пользователя, если он менял настройки в&nbsp; системе.</p>]]></content>
			<author>
				<name><![CDATA[Pokerist]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24990</uri>
			</author>
			<updated>2013-08-12T10:15:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=74425#p74425</id>
		</entry>
</feed>
