<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Toolbar butt&#111;n rectangles</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Toolbar butt&#111;n rectangles]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 21 Apr 2026 21:42:20 +0000</pubDate>
  <lastBuildDate>Mon, 22 Aug 2005 16:27:22 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=2753</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Toolbar butt&#111;n rectangles : BOOL CMainFrame::PreTranslateMessage(MSG*...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2753&amp;PID=8270&amp;title=toolbar-button-rectangles#8270</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1410">Jeff1</a><br /><strong>Subject:</strong> 2753<br /><strong>Posted:</strong> 22 August 2005 at 4:27pm<br /><br />BOOL CMainFrame::PreTranslateMessage(MSG* pMsg)<br>{<br>&nbsp;&nbsp; &nbsp;switch (pMsg-&gt;message)<br>&nbsp;&nbsp; &nbsp;{<br>&nbsp;&nbsp; &nbsp;case WM_RBUTTONDOWN: // if right mouse down on a controlbar, display a menu<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;m_ptButtonRightClick.x=LOWORD(pMsg-&gt;lParam);<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;m_ptButtonRightClick.y=HIWORD(pMsg-&gt;lParam);<br><br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;CWnd* pWnd =CWnd::FromHandlePermanent(pMsg-&gt;hwnd); if (pWnd == NULL) break;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;CXTPToolBar*pBar = DYNAMIC_DOWNCAST(CXTPToolBar, pWnd);&nbsp;&nbsp; &nbsp;if (pBar== NULL) break;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;CXTPControl*pControl  =pBar-&gt;GetControls()-&gt;HitTest(m_ptButtonRightClick); &nbsp;&nbsp;&nbsp;if (pControl == NULL) break;<br><br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;CRect rButton;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;rButton=pControl-&gt;GetRect();<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;pBar-&gt;ClientToScreen(&amp;rButton);<br><br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;m_ptButtonRightClick.x=rButton.left;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;m_ptButtonRightClick.y=rButton.bottom;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;m_uButtonRightClickID=pControl-&gt;GetID();<br><br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;PostMessage(WM_COMMAND, m_uButtonRightClickID);<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return TRUE;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;break;<br>&nbsp;&nbsp; &nbsp;}<br><br>&nbsp;&nbsp; &nbsp;return MAINFRAME_BASE::PreTranslateMessage(pMsg);<br>}<br><br>]]>
   </description>
   <pubDate>Mon, 22 Aug 2005 16:27:22 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2753&amp;PID=8270&amp;title=toolbar-button-rectangles#8270</guid>
  </item> 
  <item>
   <title><![CDATA[Toolbar butt&#111;n rectangles : Do you know how to get the rectangle...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2753&amp;PID=8234&amp;title=toolbar-button-rectangles#8234</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1410">Jeff1</a><br /><strong>Subject:</strong> 2753<br /><strong>Posted:</strong> 19 August 2005 at 10:01am<br /><br />Do you know how to get the rectangle of the toolbar button that isright clicked on so that a menu can be displayed and aligned with thebottom left corner of the button?<br><br>Something like:<br>get the right click point<br>find the rect of the button that was right clicked on<br>appendmenu items to a menu<br>track the menu and draw it&nbsp; at bottom left of button<br><br>Thanks.<br>]]>
   </description>
   <pubDate>Fri, 19 Aug 2005 10:01:30 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2753&amp;PID=8234&amp;title=toolbar-button-rectangles#8234</guid>
  </item> 
 </channel>
</rss>