<?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 : truncated description in menu popup / suggestion</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : truncated description in menu popup / suggestion]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 13 Jun 2026 13:08:00 +0000</pubDate>
  <lastBuildDate>Mon, 25 Oct 2010 05:54:15 +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=17481</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[truncated description in menu popup / suggestion : hello,add long descriptions to...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17481&amp;PID=61137&amp;title=truncated-description-in-menu-popup-suggestion#61137</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3301">Michl</a><br /><strong>Subject:</strong> 17481<br /><strong>Posted:</strong> 25 October 2010 at 5:54am<br /><br />hello,<br><br>add long descriptions to buttons and use these buttons for popup menus.<br>The popup menu supports only 2 lines of description.<br><br><table width="99%"><tr><td><pre class="BBcode"><br>CSize szDescription = pDC-&gt;GetTextExtent(pButton-&gt;GetDescription());<br>CRect rcDescription(0, 0, (szDescription.cx + 20) / 2, 0);<br>pDC-&gt;DrawText(_T("1\n2"), rcDescription, DT_CALCRECT | DT_WORDBREAK);<br><br>int nWidth = nGripperWidth + m_nPopupBarTextPadding + rcText.Width() +&nbsp; rcShortcut.Width() + 32;<br><br>return GetControlSize(pButton, CSize(max(nWidth, nGripperWidth + m_nPopupBarTextPadding + szDescription.cx / 2 + 32),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; max(szImage.cy, rcDescription.Height() + rcText.Height() + 19)), FALSE);<br></pre></td></tr></table><br><br>This code is okay, but if following condition is true then the width of popup menu is decreased.<br><table width="99%"><tr><td><pre class="BBcode"><br>if (!GetParent()-&gt;IsResizable() &amp;&amp; CXTPPopupBar::m_dMaxWidthDivisor &gt; 0 &amp;&amp; szControl.cx &gt; (CXTPPopupBar::m_dMaxWidthDivisor * rcWork.right))<br>&nbsp;&nbsp;&nbsp; szControl.cx = int(CXTPPopupBar::m_dMaxWidthDivisor * rcWork.right);<br></pre></td></tr></table><br><br>If you have a screen resolution lower than 1/3 of popup menu width (e.g. some screens or virtual boxes), so the description is breaking into 3 lines or more. But only 2 lines are still displaying.<br><br>A "workaround" is to set dMaxWidthDivisor to 1.0 to avoid resizing. But it would be more nice, if the popup menu can dynamically grow his height.<br>]]>
   </description>
   <pubDate>Mon, 25 Oct 2010 05:54:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17481&amp;PID=61137&amp;title=truncated-description-in-menu-popup-suggestion#61137</guid>
  </item> 
 </channel>
</rss>