<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: CreateWindowEx стиль окна]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10406&amp;type=atom" />
	<updated>2015-02-13T15:32:28Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10406</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: CreateWindowEx стиль окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=91545#p91545" />
			<content type="html"><![CDATA[<p>Меню нужно создавать заранее и один раз. Правый клик можно отследить проще, через метку <a href="http://ahkscript.org/docs/commands/Gui.htm#GuiContextMenu">GuiContextMenu</a>:<br /></p><div class="codebox"><pre><code>;SetBatchLines -1
Gui +LastFound 
Gui Show,w800 h520

Global WS_VISIBLE     := 0x10000000 
Global WS_CHILD      := 0x40000000 
Global ES_CENTER    := 0x1
Global ES_PASSWORD := 0x20

Menu, menu_context, Add, Тык , a

Global RE
RText=Привет мир!
DllCall(&quot;LoadLibrary&quot;,Str,&quot;Msftedit.dll&quot;)
DllCall(&quot;CreateWindowEx&quot;
    , Uint,    0x200
    , Str,     &quot;RichEdit50W&quot;
    , Str,     RText
    , Uint,    WS_VISIBLE | WS_CHILD | ES_CENTER
    , int,     0
    , int,     0
    , int,     200
    , int,    50 
    , Uint,     WinExist()
    , Uint,    0
    , Uint,    hRE
    , Uint,    0) 
Return

GuiContextMenu:
   MouseGetPos,,,, ctrl
   if ctrl = RichEdit50W1
      Menu, menu_context, Show
   Return

GuiClose:
GuiEscape:
ExitApp

a:
msgbox Тык</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-02-13T15:32:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=91545#p91545</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: CreateWindowEx стиль окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=91544#p91544" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Нужно меню создать самостоятельно, после этого отслеживать клик правой кнопкой по данному контролу.</p></blockquote></div><p>Я к такому решению пришел.<br /></p><div class="codebox"><pre><code>;SetBatchLines -1
Gui +LastFound 
Gui Show,w800 h520

Global WS_VISIBLE     := 0x10000000 
Global WS_CHILD      := 0x40000000 
Global ES_CENTER    := 0x1
Global ES_PASSWORD := 0x20


Global RE
RText=Привет мир!
hRE := DllCall(&quot;LoadLibrary&quot;,Str,&quot;Msftedit.dll&quot;)
DllCall(&quot;CreateWindowEx&quot;
    , Uint,    0x200
    , Str,     &quot;RichEdit50W&quot;
    , Str,     RText
    , Uint,    WS_VISIBLE | WS_CHILD | ES_CENTER
    , int,     0
    , int,     0
    , int,     200
    , int,    50 
    , Uint,     WinExist()
    , Uint,    0
    , Uint,    hRE
    , Uint,    0) 
    
OnMessage(0x0204, &quot;WM_RBUTTONDOWN&quot;)
Return

WM_RBUTTONDOWN(){
MouseGetPos, , , , ctrl
if ctrl = RichEdit50W1
{
        Menu, menu_context, Add, Тык , a
        Menu, menu_context, Show
        Menu, menu_context, DeleteAll,
}
}


GuiClose:
GuiEscape:
ExitApp

a:
msgbox Тык</code></pre></div>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2015-02-13T15:20:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=91544#p91544</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: CreateWindowEx стиль окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=91513#p91513" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Malcev пишет:</cite><blockquote><p>0x50000000 получили, как я понимаю из-за того, что сложили эти 2 величины</p></blockquote></div><p>Так это не сложение, это операция &quot;побитового или&quot;. Сравни два результата:<br /></p><div class="codebox"><pre><code>SetFormat, IntegerFast, H
MsgBox, % 0xFFFF | 0xFFFF &quot;`n&quot; 0xFFFF + 0xFFFF</code></pre></div><div class="quotebox"><blockquote><p>Я не понимаю почему многие так все шифруют?</p></blockquote></div><p>Я тоже не понимаю, может хотят казаться этакими волшебниками, оперирующими &quot;магическими числами&quot;?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-02-13T02:43:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=91513#p91513</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: CreateWindowEx стиль окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=91511#p91511" />
			<content type="html"><![CDATA[<p>0x50000000 получили, как я понимаю из-за того, что сложили эти 2 величины, поэтому так и написал.<br />Я не понимаю почему многие так все шифруют?<br />Нет, чтобы написать так:<br /></p><div class="codebox"><pre><code>;SetBatchLines -1
Gui +LastFound 
Gui Show,w800 h520

RText=Привет мир!
hRE:=DllCall(&quot;LoadLibrary&quot;,Str,&quot;Msftedit.dll&quot;)
global WS_VISIBLE=0x10000000, WS_CHILD=0x40000000
RE:=DllCall(&quot;CreateWindowEx&quot;
    , Uint,    0x200
    , Str,     &quot;RichEdit50W&quot;
    , Str,     RText
    , Uint,   WS_CHILD | WS_VISIBLE
    , int,     0
    , int,     0
    , int,     200
    , int,    50 ;Pos
    , Uint,     WinExist()
    , Uint,    0
    , Uint,    hRE
    , Uint,    0) ;hWnd Parent, hInstance

Return

GuiClose:
GuiEscape:
ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-02-13T02:38:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=91511#p91511</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: CreateWindowEx стиль окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=91510#p91510" />
			<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>2015-02-13T02:31:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=91510#p91510</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: CreateWindowEx стиль окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=91509#p91509" />
			<content type="html"><![CDATA[<p>спасибо. А что насчет второго вопроса?</p>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2015-02-13T02:13:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=91509#p91509</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: CreateWindowEx стиль окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=91508#p91508" />
			<content type="html"><![CDATA[<p>Там не &quot;+&quot;, там &quot;|&quot;, это не одно и то же.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-02-13T02:04:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=91508#p91508</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: CreateWindowEx стиль окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=91507#p91507" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>; WS_CHILD (0x40000000) + WS_VISIBLE (0x10000000) = 0x50000000:</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-02-13T01:50:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=91507#p91507</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: CreateWindowEx стиль окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=91506#p91506" />
			<content type="html"><![CDATA[<p>Доброго времени суток.<br />Кто знает что это за стиль окна <strong>0x50000000</strong></p><p>столкнулся с с ним в этом скрипте:</p><div class="codebox"><pre><code>;SetBatchLines -1
Gui +LastFound 
Gui Show,w800 h520

RText=Привет мир!
hRE:=DllCall(&quot;LoadLibrary&quot;,Str,&quot;Msftedit.dll&quot;)
RE:=DllCall(&quot;CreateWindowEx&quot;
    , Uint,    0x200
    , Str,     &quot;RichEdit50W&quot;
    , Str,     RText
    , Uint,    0x50000000
    , int,     0
    , int,     0
    , int,     200
    , int,    50 ;Pos
    , Uint,     WinExist()
    , Uint,    0
    , Uint,    hRE
    , Uint,    0) ;hWnd Parent, hInstance

Return

GuiClose:
GuiEscape:
ExitApp</code></pre></div><p>если его не указывать, то edit поля не видно.<br />не совсем удобно со стилями edit&#039;а работать.<br />и еще вопрос каким способом можно приделать контекстное меню на правую кнопку мыши для этого поля?</p>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2015-02-13T01:29:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=91506#p91506</id>
		</entry>
</feed>
