<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Изменение размеров Gui контролов - мышью]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=8863</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=8863&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Изменение размеров Gui контролов - мышью».]]></description>
		<lastBuildDate>Tue, 05 Nov 2013 09:17:36 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Изменение размеров Gui контролов - мышью]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=76930#p76930</link>
			<description><![CDATA[<p>Лучше использовать &quot;gosub&quot; вместо таймера, иначе глюк получается при быстром перемещении.<br />И эта строчка ненужна:<br /></p><div class="codebox"><pre><code>GuiControl, +Redraw, SizeBar </code></pre></div><p>Периодически из-за этого исчезает второй Edit.</p><p>Больше нечем даже дополнить, код идеальный.</p>]]></description>
			<author><![CDATA[null@example.com (Alectric)]]></author>
			<pubDate>Tue, 05 Nov 2013 09:17:36 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=76930#p76930</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Изменение размеров Gui контролов - мышью]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=76924#p76924</link>
			<description><![CDATA[<p>Попытался сделать аналог контрола SizeBar (серая полоска посередине), для изменения размеров полей:<br /></p><div class="codebox"><pre><code>
#SingleInstance Force  
#NoEnv
SetBatchLines, -1 
CoordMode, Mouse, Client
C_SIZEWE := DllCall(&quot;User32.dll\LoadCursor&quot;, &quot;Ptr&quot;, NULL, &quot;Int&quot;, 32644, &quot;UPtr&quot;)  
wSizeBar := 4, Margin := 2

Gui, Margin, 5, 5
Gui, -DPIScale
Gui, Add, Edit, w200 h200 -vscroll
Gui, Add, Progress, x+%Margin% yp hp w%wSizeBar% vSizeBar BackgroundDbbbbbb
Gui, Add, Edit, w200 h200 -vscroll x+%Margin%
Gui, Show  
OnMessage(0x200, &quot;SizeBar&quot;), OnMessage(0x201, &quot;SizeBar&quot;) 
Return  

SizeBar(wParam, lParam, msg) {
    Global C_SIZEWE, wSizeBar, Margin
    Static KeepSizeBar
    
    If (msg = 0x200) 
    { 
        If (A_GuiControl = &quot;SizeBar&quot;)
            DllCall(&quot;User32.dll\SetCursor&quot;, &quot;Ptr&quot;, C_SIZEWE) 
        If KeepSizeBar
        { 
            DllCall(&quot;User32.dll\SetCursor&quot;, &quot;Ptr&quot;, C_SIZEWE) 
            SetTimer, MoveSizeBar, -10
        }
    } 
    Else If (msg = 0x201 &amp;&amp; A_GuiControl = &quot;SizeBar&quot;) 
    {
        KeepSizeBar := 1
        KeyWait LButton
        KeepSizeBar := 0 
        GoSub MoveControls
    }
    Return
    
    MoveSizeBar:
        MouseGetPos, SizeBarX
        GuiControl, Move, SizeBar, x%SizeBarX% 
        GuiControl, +Redraw, SizeBar 
        Return
        
    MoveControls: 
        GuiControlGet, SizeBar, Pos  
        GuiControlGet, Edit1, Pos  
        GuiControl, Move, Edit1, % &quot;w&quot; SizeBarX-Edit1X-Margin 
        GuiControlGet, Edit2, Pos  
        GuiControl, Move, Edit2, % &quot;x&quot; SizeBarX+Margin+wSizeBar &quot; w&quot; (Edit2X+Edit2W)-SizeBarX-Margin-wSizeBar
        Return
}
</code></pre></div><p>Есть идеи, как сделать проще?</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Mon, 04 Nov 2013 20:22:28 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=76924#p76924</guid>
		</item>
	</channel>
</rss>
