<?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=23244&amp;view=findpost&amp;p=170611</guid>
        <pubDate>Sun, 04 May 2003 11:26:02 +0000</pubDate>
        <title>ToolTip</title>
        <link>https://forum.sources.ru/index.php?showtopic=23244&amp;view=findpost&amp;p=170611</link>
        <description><![CDATA[DenLik: НЕ-ЗА-ЧТО, а то см MSDN и тд, а что это, где это ? &nbsp;;)]]></description>
        <author>DenLik</author>
        <category>C/C++: Системное программирование и WinAPI</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=23244&amp;view=findpost&amp;p=170610</guid>
        <pubDate>Sun, 04 May 2003 10:36:38 +0000</pubDate>
        <title>ToolTip</title>
        <link>https://forum.sources.ru/index.php?showtopic=23244&amp;view=findpost&amp;p=170610</link>
        <description><![CDATA[experimenter: cпа-си-бо.]]></description>
        <author>experimenter</author>
        <category>C/C++: Системное программирование и WinAPI</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=23244&amp;view=findpost&amp;p=170609</guid>
        <pubDate>Sun, 04 May 2003 09:30:11 +0000</pubDate>
        <title>ToolTip</title>
        <link>https://forum.sources.ru/index.php?showtopic=23244&amp;view=findpost&amp;p=170609</link>
        <description><![CDATA[DenLik: Мой код - тултип для тулбара, но он понятен и легко переделать, тк кнопка - тоже окно.<br><br>Принцип - создать окно, создать для него тултип, активизировать нук, а еще надо создать обработчик для хука.<br><br>BOOL InitToolbar(void )<br>{<br> &nbsp; &nbsp; SIZE size;<br> &nbsp; &nbsp; int iIndex ;<br> &nbsp; &nbsp; TOOLINFO ti; &nbsp; &nbsp;// tool information <br> &nbsp; &nbsp; RECT rect ; <br><br> &nbsp; &nbsp; if(!((*gpAvec).hMainToolBar = CreateToolbarEx(hMainWnd,<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WS_VISIBLE&#124;WS_CHILD&#124;TBSTYLE_FLAT,<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IDC_TOOLBAR,<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BITMAP_COUNT,<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hInst,<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IDB_TOOLBAR,<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gatbButton,<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BUTTON_COUNT,<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 32, 32, 32, 32,<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sizeof(TBBUTTON)) ) )<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return FALSE ;<br><br> &nbsp; &nbsp; &nbsp;(*gpAvec).dwButtonSize = SendMessage((*gpAvec).hMainToolBar, &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TB_GETBUTTONSIZE, &nbsp;0, 0 ) + (*gpAvec).dwCYFRAME ;<br> &nbsp; &nbsp; &nbsp;SendMessage((*gpAvec).hMainToolBar, TB_GETMAXSIZE, 0, (LPARAM)&amp;size ) ;<br> &nbsp; &nbsp; &nbsp;SetWindowPos((*gpAvec).hMainToolBar, HWND_TOP, 0, 0, size.cx, size.cy, &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SWP_SHOWWINDOW ) ;<br><br> &nbsp; &nbsp; &nbsp;// создаем тултип и говорим, что он для тулбара &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp;(*gpAvec).hMainToolTip = CreateWindowEx(0, TOOLTIPS_CLASS, &quot;&quot;, WS_POPUP &#124; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TTS_NOPREFIX &#124; TTS_ALWAYSTIP, CW_USEDEFAULT, CW_USEDEFAULT, &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CW_USEDEFAULT, CW_USEDEFAULT, &nbsp;(*gpAvec).hMainToolBar, NULL, hInst, <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NULL); <br><br> &nbsp; &nbsp; if(!(*gpAvec).hMainToolTip )<br> &nbsp; &nbsp; &nbsp;return FALSE ;<br><br> &nbsp; &nbsp; // хук на мышку на тулбареЮ, где ToolTipMsgProc - обработчик<br> &nbsp; &nbsp; (*gpAvec).hHook = SetWindowsHookEx(WH_MOUSE, ToolTipMsgProc, NULL, &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GetCurrentThreadId() ); <br> &nbsp; &nbsp; if ((*gpAvec).hHook == (HHOOK) NULL) <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return FALSE; <br><br> &nbsp; &nbsp; for (iIndex = 0; iIndex &lt; BUTTON_COUNT; iIndex++) <br> &nbsp; &nbsp; { <br>  &nbsp; &nbsp; &nbsp;if(gatbButton[iIndex].fsStyle == TBSTYLE_SEP )<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue ;<br> &nbsp; &nbsp; &nbsp;SendMessage((*gpAvec).hMainToolBar, TB_GETITEMRECT, (WPARAM)iIndex, &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(LPARAM)&amp;rect ) ;<br> &nbsp; &nbsp; &nbsp;ZeroMemory(&amp;ti, sizeof(TOOLINFO)) ;<br> &nbsp; &nbsp; &nbsp;ti.cbSize = sizeof(TOOLINFO); <br> &nbsp; &nbsp; &nbsp;ti.uFlags = 0 ;<br> &nbsp; &nbsp; &nbsp;ti.hwnd = (*gpAvec).hMainToolBar; <br> &nbsp; &nbsp; &nbsp;ti.hinst = hInst; <br> &nbsp; &nbsp; &nbsp;ti.rect = rect ;<br> &nbsp; &nbsp; &nbsp;ti.uId = gatbButton[iIndex].idCommand;<br> &nbsp; &nbsp; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; switch(gatbButton[iIndex].idCommand)<br> &nbsp; &nbsp; &nbsp;{<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case IDB_EXIT : ti.lpszText = (char*)IDM_EXIT ; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp;break ;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case IDB_STOP: ti.lpszText = (char*)IDM_STOP ; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break ;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case IDB_SCAN : ti.lpszText = (char*)IDM_SCAN ;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break ;<br> &nbsp; &nbsp; &nbsp;}<br><br> &nbsp; &nbsp; &nbsp;if (!SendMessage((*gpAvec).hMainToolTip, TTM_ADDTOOL, 0, (LPARAM) &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (LPTOOLINFO) &amp;ti)) <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return FALSE ; <br> &nbsp; &nbsp;} <br><br> &nbsp; &nbsp;return TRUE;<br>} <br><br>// ToolTipMsgProc - monitors the message stream for mouse messages intended <br>// &nbsp; &nbsp; for a control window in the dialog box. <br>// Returns a message-dependent value. <br>// nCode - hook code. <br>// wParam - message flag (not used). <br>// lParam - address of an MSG structure. <br>LRESULT CALLBACK ToolTipMsgProc(int nCode, WPARAM wParam, LPARAM lParam) <br>{ <br> &nbsp; &nbsp; &nbsp; if (nCode &lt; 0 )<br> &nbsp; &nbsp; &nbsp;return (CallNextHookEx((*gpAvec).hHook, nCode, wParam, lParam)); <br> <br> &nbsp; &nbsp; &nbsp; switch(wParam )<br> &nbsp; &nbsp; &nbsp; {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case WM_MOUSEMOVE: <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ((*gpAvec).hMainToolTip != NULL )<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MSG msg; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;POINT Point ;<br><br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;msg.message = (UINT)wParam ;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;msg.hwnd = ((MOUSEHOOKSTRUCT*)lParam)-&gt;hwnd ;<br><br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Point = ((MOUSEHOOKSTRUCT*)lParam)-&gt;pt ;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MapWindowPoints(HWND_DESKTOP, hMainWnd, &amp;Point, 1) ;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;msg.wParam = 0 ;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;msg.lParam = MAKEWPARAM(Point.x, Point.y ) ;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;msg.pt = Point ;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SendMessage((*gpAvec).hMainToolTip, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TTM_RELAYEVENT, 0, (LPARAM) (LPMSG) &amp;msg);  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break; <br> &nbsp; &nbsp; &nbsp; &nbsp;default: <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break; <br> &nbsp; &nbsp;} <br> &nbsp;<br> &nbsp; &nbsp;// ловим мышку на тулбаре дальше ?<br> &nbsp; &nbsp;return (CallNextHookEx((*gpAvec).hHook, nCode, wParam, lParam)); <br>}]]></description>
        <author>DenLik</author>
        <category>C/C++: Системное программирование и WinAPI</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=23244&amp;view=findpost&amp;p=170608</guid>
        <pubDate>Sat, 03 May 2003 18:14:19 +0000</pubDate>
        <title>ToolTip</title>
        <link>https://forum.sources.ru/index.php?showtopic=23244&amp;view=findpost&amp;p=170608</link>
        <description><![CDATA[experimenter: молодец! рад за тебя.]]></description>
        <author>experimenter</author>
        <category>C/C++: Системное программирование и WinAPI</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=23244&amp;view=findpost&amp;p=170607</guid>
        <pubDate>Sat, 03 May 2003 17:06:46 +0000</pubDate>
        <title>ToolTip</title>
        <link>https://forum.sources.ru/index.php?showtopic=23244&amp;view=findpost&amp;p=170607</link>
        <description><![CDATA[HOMO_PROGRAMMATIS: Уфф... Лень... В МСДН всё очень хорошо написано, я лично понял с первого раза &nbsp;:D]]></description>
        <author>HOMO_PROGRAMMATIS</author>
        <category>C/C++: Системное программирование и WinAPI</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=23244&amp;view=findpost&amp;p=170606</guid>
        <pubDate>Sat, 03 May 2003 13:26:02 +0000</pubDate>
        <title>ToolTip</title>
        <link>https://forum.sources.ru/index.php?showtopic=23244&amp;view=findpost&amp;p=170606</link>
        <description><![CDATA[experimenter: Дайте пример пожалуйста, как создать ToolTip для кнопки в диалоге.]]></description>
        <author>experimenter</author>
        <category>C/C++: Системное программирование и WinAPI</category>
      </item>
	
      </channel>
      </rss>
	