<?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=8287&amp;type=atom" />
	<updated>2013-09-29T14:08:40Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=8287</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Отображение текста на полупрозрачном фоне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75619#p75619" />
			<content type="html"><![CDATA[<p>А вот если убрать из опций Centre, то тогда сам текст уже распологается на равных расстояниях от краёв окна...</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-09-29T14:08:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75619#p75619</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Отображение текста на полупрозрачном фоне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75610#p75610" />
			<content type="html"><![CDATA[<p>Оно самое:<br /></p><div class="codebox"><pre><code>
If !pToken := Gdip_Startup()   {
   MsgBox, 48, gdiplus error!, Gdiplus failed to start. Please ensure you have gdiplus on your system
   ExitApp
}
 
xMargin = 0
yMargin = 30
BackTrans = ba
BackColor = 2943AF
ThisFont = Arial 
Font = s62 Italic
FontColor = ffffff
Text = Tutorial 8`nThank you for trying this example 

 
hdc := CreateCompatibleDC() 
G := Gdip_GraphicsFromHDC(hdc) 
Data := Gdip_TextToGraphics(G, Text, Font, ThisFont) ; x|y|w|h|кол-во символов|кол-во строк
DeleteDC(hdc), Gdip_DeleteGraphics(G)
 
StringSplit, Arr, Data, |  
Width := Ceil(Arr3) + xMargin * 2, Height := Ceil(Arr4) + yMargin * 2
Options = x%xMargin% y%yMargin% Centre cff%FontColor% r4 %Font%
 
Gui, +HWNDhGui -Caption +E0x80000 +LastFound +AlwaysOnTop +ToolWindow +OwnDialogs -DPIScale
Gui, Show, NA 
 
hbm := CreateDIBSection(Width, Height), hdc := CreateCompatibleDC() 
obm := SelectObject(hdc, hbm), G := Gdip_GraphicsFromHDC(hdc), Gdip_SetSmoothingMode(G, 4) 
pBrush := Gdip_BrushCreateSolid(&quot;0x&quot; BackTrans BackColor) 
Gdip_FillRoundedRectangle(G, pBrush, 0, 0, Width, Height, 10) 
Gdip_DeleteBrush(pBrush) 

If !Gdip_FontFamilyCreate(ThisFont)   {
   MsgBox, 48, Font error!, The font you have specified does not exist on the system
   ExitApp
} 
  
Gdip_TextToGraphics(G, Text, Options, ThisFont, Width, Height) 

UpdateLayeredWindow(hGui, hdc, (A_ScreenWidth-Width)//2, (A_ScreenHeight-Height)//2, Width, Height)
 
SelectObject(hdc, obm), DeleteObject(hbm), DeleteDC(hdc), Gdip_DeleteGraphics(G)
Return 
</code></pre></div><p>Вот только мистика, если xMargin больше 0. Текст почему то явно стремится к правому краю <img src="//forum.script-coding.com/img/smilies/sad.png" width="15" height="15" /> а не к центру, как того хотелось.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-09-28T18:40:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75610#p75610</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Отображение текста на полупрозрачном фоне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75603#p75603" />
			<content type="html"><![CDATA[<p>А, вспомнил, можно узнать просто ширину и высоту текста:<br /></p><div class="codebox"><pre><code>pToken := Gdip_Startup()
hdc := CreateCompatibleDC() 
G := Gdip_GraphicsFromHDC(hdc)

Text = Tutorial 8`nThank you for trying this example
MsgBox, % Gdip_TextToGraphics(G, Text, &quot;s42 Italic&quot;, &quot;Arial&quot;) ; x|y|w|h|кол-во символов|кол-во строк</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2013-09-27T21:05:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75603#p75603</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Отображение текста на полупрозрачном фоне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75602#p75602" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Спасибо за ответы, буду думать.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-09-27T20:33:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75602#p75602</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Отображение текста на полупрозрачном фоне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75601#p75601" />
			<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-09-27T20:28:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75601#p75601</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Отображение текста на полупрозрачном фоне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75600#p75600" />
			<content type="html"><![CDATA[<p>А w80p - что значит?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-09-27T20:21:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75600#p75600</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Отображение текста на полупрозрачном фоне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75599#p75599" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Ещё не до конца понимаю, что в Options значат - x10p y10p w80p?</p></blockquote></div><p>Возможно, в этом и есть твоя проблема. x10p означает, что текст расположен на десяти процентах общей длины от начала, т. е. это относительный способ задания положения. Можно и без &quot;p&quot; как обычно — x10 — 10 пикселей от края.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2013-09-27T20:18:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75599#p75599</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Отображение текста на полупрозрачном фоне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75596#p75596" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />О, спасибо! И так и эдак покрутил. Что в итоге к полученной ширине и высоте прибавлять никак не пойму, не подскажешь?<br /></p><div class="codebox"><pre><code>
Text = Tutorial 8`nThank you for trying this example
Font = Arial 
FontSize = 42
BackTrans = ba
BackColor = 2943AF 
FontColor = ffffff 
Options = x10p y10p w80p Centre s%FontSize% Italic     
    
If !pToken := Gdip_Startup()   {
   MsgBox, 48, gdiplus error!, Gdiplus failed to start. Please ensure you have gdiplus on your system
   ExitApp
}

hdc := CreateCompatibleDC() 
G := Gdip_GraphicsFromHDC(hdc)

 
Data := Gdip_TextToGraphics(G, Text, Options, Font, 3000, 3000) ; 1000 — с запасом, x|y|w|h|кол-во символов|кол-во строк
StringSplit, Arr, Data, |  
 
Width := Arr3, Height := Arr4 
  
Gui, +HWNDhGui -Caption +E0x80000 +LastFound +AlwaysOnTop +ToolWindow +OwnDialogs -DPIScale
Gui, Show, NA 
 
hbm := CreateDIBSection(Width, Height), hdc := CreateCompatibleDC() 
obm := SelectObject(hdc, hbm), G := Gdip_GraphicsFromHDC(hdc), Gdip_SetSmoothingMode(G, 4) 
pBrush := Gdip_BrushCreateSolid(&quot;0x&quot; BackTrans BackColor) 
Gdip_FillRoundedRectangle(G, pBrush, 0, 0, Width, Height, 10) 
Gdip_DeleteBrush(pBrush) 

If !Gdip_FontFamilyCreate(Font)   {
   MsgBox, 48, Font error!, The font you have specified does not exist on the system
   ExitApp
} 

Gdip_TextToGraphics(G, Text, Options, Font, Width, Height) 

UpdateLayeredWindow(hGui, hdc, (A_ScreenWidth-Width)//2, (A_ScreenHeight-Height)//2, Width, Height)
 
SelectObject(hdc, obm), DeleteObject(hbm), DeleteDC(hdc), Gdip_DeleteGraphics(G)
Return 
</code></pre></div><p>Ещё не до конца понимаю, что в Options значат - x10p y10p w80p?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-09-27T19:35:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75596#p75596</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Отображение текста на полупрозрачном фоне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75593#p75593" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>А как можно сделать размер окна в зависимости от содержимого текста</p></blockquote></div><p>Код определяет размер текста и его координаты:<br /></p><div class="codebox"><pre><code>pToken := Gdip_Startup()
hdc := CreateCompatibleDC() 
G := Gdip_GraphicsFromHDC(hdc)

Text = Tutorial 8`nThank you for trying this example
Font = Arial 
FontSize = 42
Options = x10p y10p w80p Centre s%FontSize% Italic 

MsgBox, % Gdip_TextToGraphics(G, Text, Options, Font, 1000, 1000) ; 1000 — с запасом, x|y|w|h|кол-во символов|кол-во строк</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2013-09-27T16:52:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75593#p75593</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Отображение текста на полупрозрачном фоне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75572#p75572" />
			<content type="html"><![CDATA[<p>Разобрался в примере:<br /></p><div class="codebox"><pre><code>

 ; Example 8: Gdip.Tutorial.8-Write.text.onto.a.gui.ahk    http://www.autohotkey.net/~tic/Gdip.Tutorial.8-Write.text.onto.a.gui.ahk 

#SingleInstance Force 
SetBatchLines -1 


If !pToken := Gdip_Startup()   {
   MsgBox, 48, gdiplus error!, Gdiplus failed to start. Please ensure you have gdiplus on your system
   ExitApp
}

OnExit, Exit
OnMessage(0x201, &quot;WM_LBUTTONDOWN&quot;)
 
Width := 400, Height := 250
BackTrans = ba
BackColor = 2943AF
Font = Arial 
FontSize = 42
FontColor = ffffff
Text = Tutorial 8`nThank you for trying this example 

Options = x10p y10p w80p Centre cff%FontColor% r4 s%FontSize% Italic 
 
Gui, +HWNDhGui -Caption +E0x80000 +LastFound +AlwaysOnTop +ToolWindow +OwnDialogs -DPIScale
Gui, Show, NA 
 
hbm := CreateDIBSection(Width, Height), hdc := CreateCompatibleDC() 
obm := SelectObject(hdc, hbm), G := Gdip_GraphicsFromHDC(hdc), Gdip_SetSmoothingMode(G, 4) 
pBrush := Gdip_BrushCreateSolid(&quot;0x&quot; BackTrans BackColor) 
Gdip_FillRoundedRectangle(G, pBrush, 0, 0, Width, Height, 10) 
Gdip_DeleteBrush(pBrush) 

If !Gdip_FontFamilyCreate(Font)   {
   MsgBox, 48, Font error!, The font you have specified does not exist on the system
   ExitApp
} 
  
Gdip_TextToGraphics(G, Text, Options, Font, Width, Height) 

UpdateLayeredWindow(hGui, hdc, (A_ScreenWidth-Width)//2, (A_ScreenHeight-Height)//2, Width, Height)
 
SelectObject(hdc, obm), DeleteObject(hbm), DeleteDC(hdc), Gdip_DeleteGraphics(G)
Return 

WM_LBUTTONDOWN()   {
   PostMessage, 0xA1, 2
}
 

Esc::
Exit: 
GuiClose:
GuiEscape:
    Gdip_Shutdown(pToken)
    ExitApp
</code></pre></div><p>Теперь такой вопрос: тут заранее указывается размер окну. А как можно сделать размер окна в зависимости от содержимого текста, по аналогии с этим:<br /></p><div class="codebox"><pre><code> 
#SingleInstance Force 

Text1 = Tutorial 8`nThank you for trying this example 
Text2 = 000`n0`n0`n0`n0`n0`n0`n0`n000 
Text3 = ``
FontSize = 28
I = 0

Gui, +AlwaysOnTop +ToolWindow -Caption +DPIScale 
Gui, Color, 2943AF
Gui, Font, s%FontSize% cffffff Italic, Times New Roman 
    
Loop    { 
    DllCall(&quot;DestroyWindow&quot;, &quot;Ptr&quot;, hText), I := ++I &gt; 3 ? 1 : I
    Gui, Add, Text, % &quot;Center hwndhText x&quot; FontSize &quot; y&quot; FontSize / 2, % Text%I%
    Gui, Show, AutoSize Center
    Sleep 1111 
}

Esc::
    ExitApp
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-09-26T22:38:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75572#p75572</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Отображение текста на полупрозрачном фоне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=72028#p72028" />
			<content type="html"><![CDATA[<p>Спасибо! Действительно отличный пример. <br />Курить придётся долго <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-05-11T18:43:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=72028#p72028</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Отображение текста на полупрозрачном фоне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=72022#p72022" />
			<content type="html"><![CDATA[<p>Ну так я же говорю, нужно переводить и разбираться.</p><p>1. Открываем файл Gdip.ahk в Блокноте и подыскиваем подходящую для наших целей функцию в разделе <strong>Text functions</strong>. Похоже, Gdip_DrawString - то, что нужно.</p><p>2. Далее можно открывать словарь и изучать функцию... Или сразу <a href="http://www.google.com/cse?cx=008894931886257774458:qsymwz_o1tq&amp;hl=en&amp;q=DrawString#gsc.tab=0&amp;gsc.q=DrawString&amp;gsc.page=1">поискать готовый пример применения</a> (см. ссылку в моей подписи).</p><p>3. По третьему результату поиска, обнаруживаем на немецком подфоруме<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;прекрасный пример</div><div class="fancy_spoiler"><div class="codebox"><pre><code>;basiert auf tics Beispiel#SingleInstance, Force
#NoEnv
SetBatchLines, -1


If !pToken := Gdip_Startup()
{
   MsgBox, 48, gdiplus error!, Gdiplus failed to start. Please ensure you have gdiplus on your system
   ExitApp
}
OnExit, Exit

Width := 300, Height := 200

Gui, 1:  -Caption +E0x80000 +LastFound +OwnDialogs +Owner +AlwaysOnTop
Gui, 1: Show, NA

hwnd1 := WinExist()

hbm := CreateDIBSection(Width, Height)
hdc := CreateCompatibleDC()
obm := SelectObject(hdc, hbm)

G := Gdip_GraphicsFromHDC(hdc)
Gdip_SetSmoothingMode(G, 4)

pBrush := Gdip_CreateLineBrush(0, 0, Width, Height, 0xFF000000, 0xaa0000FF)

Gdip_FillRoundedRectangle(G, pBrush, 0, 0, Width, Height, 20)
Gdip_DeleteBrush(pBrush)

Font := &quot;Arial&quot;

If !hFamily := Gdip_FontFamilyCreate(Font)
{
   MsgBox, 48, Font error!, The font you have specified does not exist on the system
   ExitApp
}

pBrush2 := Gdip_CreateLineBrush(0, 0, 200, 100, 0xFFFF0000, 0xFF00FF00)
hFont := Gdip_FontCreate(hFamily, 20, &quot;Regular&quot;)
hFormat := Gdip_StringFormatCreate(0x4000)
CreateRectF(RectF, 10, 30, 200, 100)

Gdip_SetSmoothingMode(G, 4)
Gdip_SetTextRenderingHint(G, 4)

Gdip_DrawString(G, &quot;Tutorial 8`n`nThank you for trying this example&quot;, hFont, hFormat, pBrush2, RectF)

UpdateLayeredWindow(hwnd1, hdc, (A_ScreenWidth-Width)//2, (A_ScreenHeight-Height)//2, Width, Height)

OnMessage(0x201, &quot;WM_LBUTTONDOWN&quot;)


; Delete resources
SelectObject(hdc, obm)
DeleteObject(hbm)
DeleteDC(hdc)
Gdip_DeleteGraphics(G)
Return

;#######################################################################

; This function is called every time the user clicks on the gui
; The PostMessage will act on the last found window (this being the gui that launched the subroutine, hence the last parameter not being needed)
WM_LBUTTONDOWN()
{
   PostMessage, 0xA1, 2
}

;#######################################################################

Exit:
; gdi+ may now be shutdown on exiting the program
Gdip_Shutdown(pToken)
ExitApp
Return</code></pre></div></div></div><p>4. Убедившись, что эта функция позволяет достигнуть поставленную цель, изучаем её детально.</p><p><span style="color: #999999">5. А если хотите помочь коллегам-скриптописателям, выложите перевод / описание функции в соответствующей теме.</span></p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2013-05-11T15:19:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=72022#p72022</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Отображение текста на полупрозрачном фоне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=72012#p72012" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Далее рисуем поверх прямоугольника нужный текст непрозрачной кистью.</p></blockquote></div><p>Пример известный. А по счёт текста ничего ясно.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-05-11T10:40:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=72012#p72012</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Отображение текста на полупрозрачном фоне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=72010#p72010" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><div class="quotebox"><blockquote><p>в сторону фона-картинки типа png, gif, ico. Вроде они поддерживают частичную прозрачность.</p></blockquote></div><p>Безуспешный поиск такого решения уже был <a href="http://forum.script-coding.com/viewtopic.php?id=8145">в этой теме</a>.</p></blockquote></div><p>Точняк.</p><br /><p>Тогда можно попробовать так.<br />Используем</p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;этот код,</div><div class="fancy_spoiler"><div class="codebox"><pre><code>
   If !pToken := Gdip_Startup()
   {
      MsgBox, 48, Ошибка GDI+, Убедитесь в наличии gdiplus.dll в вашей системе!
      ExitApp
   }

   OnExit, Exit
   SetBatchLines, -1
   SetWinDelay, 0


   Width = 500
   Height = 250       ; размеры картинки

   H2 := Height//2, W2 := Width//2
   X := (A_ScreenWidth-Width)//2
   Y := (A_ScreenHeight-Height)//2


   Gui, -Caption +E0x80000 +LastFound +ToolWindow +AlwaysOnTop  ; WS_EX_LAYERED := 0x80000
   WinGet, ID
   Gui, Show
   OnMessage(0x201, &quot;WM_LBUTTONDOWN&quot;)
   OnMessage(0x003, &quot;WM_MOVE&quot;)
   DllCall(&quot;Winmm\timeBeginPeriod&quot;, UInt, 3)

   hbm := CreateDIBSection(Width, Height)
   hdc := CreateCompatibleDC()
   obm := SelectObject(hdc, hbm)
   G := Gdip_GraphicsFromHDC(hdc)
   Gdip_SetSmoothingMode(G, 4)

   pFillBrush := Gdip_BrushCreateSolid(0x66FFFF00)
   Gdip_FillRectangle(G, pFillBrush, 0, 0, Width, Height)
   Gdip_DeleteBrush(pFrameBrush)

   UpdateLayeredWindow(ID, hdc, X, Y, Width, Height)
Return


GuiClose:
GuiEscape:
   ExitApp

Exit:
   Gdip_DeletePen(pGrayPen), Gdip_DeletePen(pBluePen), Gdip_DeleteBrush(pFillBrush)
   SelectObject(hdc, obm), DeleteObject(hbm), DeleteDC(hdc), Gdip_DeleteGraphics(G)
   Gdip_Shutdown(pToken)
   DllCall(&quot;Winmm\timeEndPeriod&quot;, UInt, 3)
   ExitApp

WM_LBUTTONDOWN()
{
   PostMessage, WM_NCLBUTTONDOWN := 0xA1, HTCAPTION := 2
}

WM_MOVE(wp, lp)
{
   global X, Y
   X := lp &amp; 0xFFFF, Y := lp &gt;&gt; 16
}
</code></pre></div></div></div><p>чтобы создать специальное окно и нарисовать в нём полупрозрачный прямоугольник. Затем открываем файл Gdip.ahk и переводим главу<br />;###############<br />; Text functions<br />;###############</p><p>Далее рисуем поверх прямоугольника нужный текст непрозрачной кистью.</p><br /><p>P. S.: Ещё раз благодарю <strong>teadrinker</strong> <a href="http://forum.script-coding.com/viewtopic.php?pid=45984#p45984">за разобранный пример</a>.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2013-05-11T08:23:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=72010#p72010</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Отображение текста на полупрозрачном фоне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=72008#p72008" />
			<content type="html"><![CDATA[<p>А, может как-то через <em>SendMessage</em> можно задать прозрачность конкретному контролу?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-05-10T19:36:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=72008#p72008</id>
		</entry>
</feed>
