<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=158399&amp;view=findpost&amp;p=1310352</guid>
        <pubDate>Fri, 20 Oct 2006 13:56:32 +0000</pubDate>
        <title>Кстати, об AddressOf.</title>
        <link>https://forum.sources.ru/index.php?showtopic=158399&amp;view=findpost&amp;p=1310352</link>
        <description><![CDATA[Black Star: Следует однако помнить, что головастые парни из мелкософта плохого не посоветуют&#33;<br>
Потому помните, что метод <strong class='tag-b'>ALXR</strong> почти в 4 раза медленнее, чем пример из MSDN &#33;]]></description>
        <author>Black Star</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=158399&amp;view=findpost&amp;p=1309839</guid>
        <pubDate>Fri, 20 Oct 2006 09:51:59 +0000</pubDate>
        <title>Кстати, об AddressOf.</title>
        <link>https://forum.sources.ru/index.php?showtopic=158399&amp;view=findpost&amp;p=1309839</link>
        <description><![CDATA[B.V.: Done.]]></description>
        <author>B.V.</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=158399&amp;view=findpost&amp;p=1309811</guid>
        <pubDate>Fri, 20 Oct 2006 09:41:40 +0000</pubDate>
        <title>Кстати, об AddressOf.</title>
        <link>https://forum.sources.ru/index.php?showtopic=158399&amp;view=findpost&amp;p=1309811</link>
        <description><![CDATA[ALXR: Хм. Ну вот такой примерчик, например:<br>
<br>
Навешивание заголовка диалогу выбора папок SHBrowseForFolder:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">Option Explicit</div><div class="code_line">Private Declare Function SHBrowseForFolder Lib &quot;shell32&quot; (lpbi As BROWSEINFO) As Long</div><div class="code_line">Private Declare Function SHGetPathFromIDList Lib &quot;shell32&quot; (ByVal pidList As Long, ByVal lpBuffer As String) As Long</div><div class="code_line">Private Declare Function SendMessageA Lib &quot;user32.dll&quot; (ByVal hWnd As Long, ByVal uMsg As Long, ByVal wParam As Long, _</div><div class="code_line">ByVal lParam As Any) As Long</div><div class="code_line">&nbsp;</div><div class="code_line">Const WM_CREATE As Long = 1</div><div class="code_line">&nbsp;</div><div class="code_line">Private Type BROWSEINFO</div><div class="code_line">&nbsp;&nbsp; &nbsp;hwndOwner &nbsp; &nbsp; &nbsp;As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;pIDLRoot &nbsp; &nbsp; &nbsp; As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;pszDisplayName As String</div><div class="code_line">&nbsp;&nbsp; &nbsp;lpszTitle &nbsp; &nbsp; &nbsp;As String</div><div class="code_line">&nbsp;&nbsp; &nbsp;ulFlags &nbsp; &nbsp; &nbsp; &nbsp;As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;lpfnCallback &nbsp; As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;lParam &nbsp; &nbsp; &nbsp; &nbsp; As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;iImage &nbsp; &nbsp; &nbsp; &nbsp; As Long</div><div class="code_line">End Type</div><div class="code_line">&nbsp;</div><div class="code_line">Function GetFolder(ByVal hWnd As Long, ByVal sTitle As String, ByVal sCaption As String) As String</div><div class="code_line">Dim lpIDList As Long</div><div class="code_line">Dim sBuffer As String</div><div class="code_line">Dim szTitle As String</div><div class="code_line">Dim tBrowseInfo As BROWSEINFO</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; </div><div class="code_line">With tBrowseInfo</div><div class="code_line">&nbsp;&nbsp; &nbsp;.hwndOwner = hWnd &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#39; Parent window</div><div class="code_line">&nbsp;&nbsp; &nbsp;.lpszTitle = sTitle &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#39; Title of folders list</div><div class="code_line">&nbsp;&nbsp; &nbsp;.pszDisplayName = App.Title</div><div class="code_line">&nbsp;&nbsp; &nbsp;.lpfnCallback = Val(AddressOf BrowseFolderCallback) &#39; Pointer to callback procedure</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;sCaption = StrConv(sCaption, vbFromUnicode) &nbsp; &nbsp; &#39; Convert string</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.lParam = StrPtr(sCaption) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39; Pass the caption through lParam</div><div class="code_line">End With</div><div class="code_line">lpIDList = SHBrowseForFolder(tBrowseInfo)</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">If (lpIDList) Then</div><div class="code_line">&nbsp;&nbsp; &nbsp;sBuffer = String(260, 0)</div><div class="code_line">&nbsp;&nbsp; &nbsp;SHGetPathFromIDList lpIDList, sBuffer</div><div class="code_line">&nbsp;&nbsp; &nbsp;If InStr(sBuffer, vbNullChar) &#60;&#62; 0 Then sBuffer = Left(sBuffer, InStr(sBuffer, vbNullChar) - 1)</div><div class="code_line">&nbsp;&nbsp; &nbsp;GetFolder = sBuffer</div><div class="code_line">End If</div><div class="code_line">End Function</div><div class="code_line">&nbsp;</div><div class="code_line">Private Function BrowseFolderCallback(ByVal hWnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As _</div><div class="code_line">Long) As Long</div><div class="code_line">Select Case uMsg</div><div class="code_line">Case WM_CREATE: SendMessageA hWnd, 12, 0, lParam &nbsp; &nbsp; &nbsp; &nbsp;&#39; Sets our caption (pointer in lParam) to dialogbox</div><div class="code_line">End Select</div><div class="code_line">BrowseFolderCallback = 0</div><div class="code_line">End Function</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script>]]></description>
        <author>ALXR</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=158399&amp;view=findpost&amp;p=1309729</guid>
        <pubDate>Fri, 20 Oct 2006 09:01:34 +0000</pubDate>
        <title>Кстати, об AddressOf.</title>
        <link>https://forum.sources.ru/index.php?showtopic=158399&amp;view=findpost&amp;p=1309729</link>
        <description><![CDATA[B.V.: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=158399&view=findpost&p=1309396'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>ALXR &#064; <time class="tag-quote__quoted-time" datetime="2006-10-20T00:29:17+00:00">20.10.06, 00:29</time></span><div class='quote '>Предлагаю в FAQ</div></div><br>
<br>
Распиши хоть один пример применения этого кода, можно и в FAQ.]]></description>
        <author>B.V.</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=158399&amp;view=findpost&amp;p=1309526</guid>
        <pubDate>Fri, 20 Oct 2006 06:21:46 +0000</pubDate>
        <title>Кстати, об AddressOf.</title>
        <link>https://forum.sources.ru/index.php?showtopic=158399&amp;view=findpost&amp;p=1309526</link>
        <description><![CDATA[ANDLL: <strong class='tag-b'>MIF</strong><br>
Иными словами, в ФАК можно помещать только топики для чайников?]]></description>
        <author>ANDLL</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=158399&amp;view=findpost&amp;p=1309520</guid>
        <pubDate>Fri, 20 Oct 2006 06:15:44 +0000</pubDate>
        <title>Кстати, об AddressOf.</title>
        <link>https://forum.sources.ru/index.php?showtopic=158399&amp;view=findpost&amp;p=1309520</link>
        <description><![CDATA[MIF: FAQ = frequently asked questions. Вопросы про AddressOf задаются нечасто и чел, дошедший до уровня пойнтеров, обычно задает нестандартные вопросы. AddressOf не место  в FAQ.]]></description>
        <author>MIF</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=158399&amp;view=findpost&amp;p=1309516</guid>
        <pubDate>Fri, 20 Oct 2006 06:12:21 +0000</pubDate>
        <title>Кстати, об AddressOf.</title>
        <link>https://forum.sources.ru/index.php?showtopic=158399&amp;view=findpost&amp;p=1309516</link>
        <description><![CDATA[ANDLL: Respect<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>Что тут нового? </div></div>Как бы это помягче?]]></description>
        <author>ANDLL</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=158399&amp;view=findpost&amp;p=1309503</guid>
        <pubDate>Fri, 20 Oct 2006 06:03:00 +0000</pubDate>
        <title>Кстати, об AddressOf.</title>
        <link>https://forum.sources.ru/index.php?showtopic=158399&amp;view=findpost&amp;p=1309503</link>
        <description><![CDATA[Black Star: MSDN<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>To assign a function pointer to an element in a structure, you write a wrapper function. For example, the following code creates the wrapper function FnPtrToLong, which can be used to put a function pointer in any structure:<br>
<br>
Function FnPtrToLong (ByVal lngFnPtr As Long) As Long<br>
   FnPtrToLong = lngFnPtr<br>
End Function<br>
<br>
To use the function, you first declare the type, then call FnPtrToLong. You pass AddressOf plus your callback function name for the second argument.<br>
<br>
Dim mt as MyType<br>
mt.MyPtr = FnPtrToLong(AddressOf MyCallBackFunction)<br>
</div></div><br>
<br>
<div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=158399&view=findpost&p=1309396'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>ALXR &#064; <time class="tag-quote__quoted-time" datetime="2006-10-20T00:29:17+00:00">20.10.06, 00:29</time></span><div class='quote '>Предлагаю в FAQ  </div></div><br>
Что тут нового?]]></description>
        <author>Black Star</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=158399&amp;view=findpost&amp;p=1309396</guid>
        <pubDate>Fri, 20 Oct 2006 00:29:17 +0000</pubDate>
        <title>Кстати, об AddressOf.</title>
        <link>https://forum.sources.ru/index.php?showtopic=158399&amp;view=findpost&amp;p=1309396</link>
        <description><![CDATA[ALXR: Код...<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">ProcPtr = Val(AddressOf ProcName)</div></ol></div></div></div></div><br>
...замечательно заменяет код...<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">ProcPtr = GetAddr(AddressOf ProcName)</div><div class="code_line">&#39; ...</div><div class="code_line">Function GetAddr(ByVal ProcAddr As Long) As Long</div><div class="code_line">GetAddr = ProcAddr</div><div class="code_line">End Function</div></ol></div></div></div></div><br>
<br>
Предлагаю в FAQ :rolleyes:]]></description>
        <author>ALXR</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      </channel>
      </rss>
	