<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Поддержка скинов (Dll-метод + Файл конфигурации)]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=2729&amp;type=atom" />
	<updated>2011-02-27T22:57:07Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=2729</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поддержка скинов (Dll-метод + Файл конфигурации)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=45612#p45612" />
			<content type="html"><![CDATA[<p>Можно так:<br /></p><div class="codebox"><pre><code>DllFileName = resource.dll    ; указать путь к dll c ресурсами
Index = 6000   ; первый bmp-файл — 6000, второй — 6001 и т. д.
W = 0
H = 0   ; размеры, если ноли — как есть

hModule := DllCall(&quot;LoadLibrary&quot;, Str, DllFileName)
hBitmap := DllCall(&quot;LoadImage&quot;, UInt, hModule
                              , UInt, Index
                              , UInt, IMAGE_BITMAP := 0
                              , Int, W, Int, H  
                              , Uint, LR_SHARED := 0x8000)
DllCall(&quot;FreeLibrary&quot;, UInt, hModule)

Gui, Add, Pic, x0 y0 hwndhPic +0xE   ; SS_BITMAP = 0xE
SendMessage, STM_SETIMAGE:=0x172, IMAGE_BITMAP:=0, hBitmap,, ahk_id %hPic%
ControlGetPos,,, W, H,, ahk_id %hPic%
Gui, Show, w%W% h%H%
DllCall(&quot;DeleteObject&quot;, UInt, hBitmap)
Return

GuiClose:
   ExitApp</code></pre></div><p>Тема на форуме: <a href="http://www.autohotkey.com/forum/viewtopic.php?t=30228">http://www.autohotkey.com/forum/viewtopic.php?t=30228</a></p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2011-02-27T22:57:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=45612#p45612</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поддержка скинов (Dll-метод + Файл конфигурации)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=45611#p45611" />
			<content type="html"><![CDATA[<p>Выше описанным способом мне удалось добавить файлы .ico в resource.dll. Затем я смог вот так загрузить иконку.<br /></p><div class="codebox"><pre><code>Menu, Tray, Icon, Resource.dll, 1</code></pre></div><p>С изображением не получается. Добавил файлы .bmp в resource.dll. Как теперь их использовать?<br />Как сделать тоже самое, но загрузить изображение не из директории скрипта, а из resource.dll, созданной выше описанным способом?<br /></p><div class="codebox"><pre><code>Gui, add, picture, x0 y0, Image.bmp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[InFlames]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24849</uri>
			</author>
			<updated>2011-02-27T22:29:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=45611#p45611</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поддержка скинов (Dll-метод + Файл конфигурации)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=45609#p45609" />
			<content type="html"><![CDATA[<p>Куда загрузить, в dll, или в окно? И в каком размере, первоначальном, или изменённом?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2011-02-27T20:56:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=45609#p45609</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поддержка скинов (Dll-метод + Файл конфигурации)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=45601#p45601" />
			<content type="html"><![CDATA[<p>Приведите пример добавления картинки в формате BMP в окно GUI из resource.dll.<br />Как загрузить эту самую .BMP?</p>]]></content>
			<author>
				<name><![CDATA[InFlames]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24849</uri>
			</author>
			<updated>2011-02-27T16:52:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=45601#p45601</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поддержка скинов (Dll-метод + Файл конфигурации)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=18912#p18912" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>LEXYS, а нельзя туда *.ini вкладывать? (в библиотеку),</p></blockquote></div><p>А смысл? ini предназначен для хранения <em>изменяемой</em> информации. Вряд ли кого-то обрадует перезапись сделанных настроек. Лучше создавать ini-файл и работать с ним непосредственно, с помощью IniWrite, IniRead, IniDelete.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2009-01-29T14:22:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=18912#p18912</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поддержка скинов (Dll-метод + Файл конфигурации)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=18907#p18907" />
			<content type="html"><![CDATA[<p>LEXYS, а нельзя туда *.ini вкладывать? (в библиотеку), а то очень даже удобно было бы!!! (видел это в shell32.dll)</p><p>Ещё вопрос не в тему (возможно для этого следует новую тему создать, но это позже):<br />Где можно найти инфу по возможностям библиотек винды? Как то: BeginUpdateResourceA, UpdateResourceA....<br />Это я взял из функции DLLCALL, примера, описанного выше.</p>]]></content>
			<author>
				<name><![CDATA[Resager]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=22114</uri>
			</author>
			<updated>2009-01-29T13:47:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=18907#p18907</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поддержка скинов (Dll-метод + Файл конфигурации)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=18861#p18861" />
			<content type="html"><![CDATA[<p>LEXYS, с днём рождения!!! Пожалуйста, покажи пример, когда из этой DLL загружается BMP в окно GUI?</p>]]></content>
			<author>
				<name><![CDATA[Resager]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=22114</uri>
			</author>
			<updated>2009-01-28T18:11:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=18861#p18861</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поддержка скинов (Dll-метод + Файл конфигурации)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=18855#p18855" />
			<content type="html"><![CDATA[<p>Да тут-то все расписано и готово к применению, перенеси да и все в коллекцию.<br />А тот пример нужно расписывать досканально! Щас пока времени нету <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /> Экзамен сдам! <br />Кстати у меня завтра День рождения!</p>]]></content>
			<author>
				<name><![CDATA[LEXYS]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24560</uri>
			</author>
			<updated>2009-01-28T15:48:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=18855#p18855</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поддержка скинов (Dll-метод + Файл конфигурации)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=18850#p18850" />
			<content type="html"><![CDATA[<p><strong>LEXYS</strong><br />Ты в Коллекцию будешь постить или мне самому? А то я тебе два раза уже &quot;намекал&quot;, а ты чего-то отмалчиваешься <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" />.</p>]]></content>
			<author>
				<name><![CDATA[The gray Cardinal]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=2</uri>
			</author>
			<updated>2009-01-28T14:53:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=18850#p18850</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поддержка скинов (Dll-метод + Файл конфигурации)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=18837#p18837" />
			<content type="html"><![CDATA[<p>Я использую эти иконки по другому. Перебором.<br />Поэтому чтобы они правильно заняли свое место в длл&nbsp; они должны начинаться с 0!</p><p>ROD-45L.ahk - случайно попал.</p><p>&quot;Can&#039;t load icon&quot;. - может отображаться если используется иконка которая в данном случае использоваться не может!</p>]]></content>
			<author>
				<name><![CDATA[LEXYS]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24560</uri>
			</author>
			<updated>2009-01-28T13:09:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=18837#p18837</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поддержка скинов (Dll-метод + Файл конфигурации)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=18836#p18836" />
			<content type="html"><![CDATA[<p>Спасибо, теперь получилось.<br />ROD-45L.ahk в архиве зачем?<br />Иконки в архиве будет нагляднее пронумеровать с единицы, имхо (и последняя будет одиннадцатой).</p>]]></content>
			<author>
				<name><![CDATA[The gray Cardinal]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=2</uri>
			</author>
			<updated>2009-01-28T13:02:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=18836#p18836</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поддержка скинов (Dll-метод + Файл конфигурации)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=18835#p18835" />
			<content type="html"><![CDATA[<p><strong>The gray Cardinal</strong><br />А у меня получилось, я положил туда ico-файлы, а не bmp.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2009-01-28T12:43:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=18835#p18835</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поддержка скинов (Dll-метод + Файл конфигурации)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=18834#p18834" />
			<content type="html"><![CDATA[<p>Выкладываю на обменник: вместе с примером!<br /><a href="http://webfile.ru/placed?id=2592146">http://webfile.ru/placed?id=2592146</a></p><p>Главное понимать что размер иконки в трее 16х16, стандартный размер иконки 32х32, 48х48, 64х64!<br />Я пы таюсь в своем деле добиться минимальных размеров, поэтому в иконках оставляю только нужный размер!<br />Смотри пример!</p>]]></content>
			<author>
				<name><![CDATA[LEXYS]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24560</uri>
			</author>
			<updated>2009-01-28T12:39:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=18834#p18834</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поддержка скинов (Dll-метод + Файл конфигурации)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=18832#p18832" />
			<content type="html"><![CDATA[<p>Попробовал — не получается.<br />Положил в каталог Resource два bmp-файла (107 Кб и 1 Кб). Файл resource.dll в результате собирается, но использовать его нельзя. Ярлыки Windows говорят, что файл не содержит иконок, а команда:<br /></p><div class="codebox"><pre><code>Menu, Tray, Icon, Resource.dll, 1</code></pre></div><p>говорит &quot;Can&#039;t load icon&quot;.</p><p>P.S. Про <a href="http://forum.script-coding.com/viewtopic.php?pid=18769#p18769">это</a> не забыл?</p>]]></content>
			<author>
				<name><![CDATA[The gray Cardinal]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=2</uri>
			</author>
			<updated>2009-01-28T12:30:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=18832#p18832</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поддержка скинов (Dll-метод + Файл конфигурации)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=18828#p18828" />
			<content type="html"><![CDATA[<p>Ресурсы которые можно использовать:<br />ICON<br />BITMAP<br />RCD</p><p>мой пример использования: <a href="http://forum.oszone.net/thread-127660.html">http://forum.oszone.net/thread-127660.html</a></p>]]></content>
			<author>
				<name><![CDATA[LEXYS]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24560</uri>
			</author>
			<updated>2009-01-28T08:56:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=18828#p18828</id>
		</entry>
</feed>
