<?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 : [solved] Ribbon xtpControlPopup SetWidth() problem</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : [solved] Ribbon xtpControlPopup SetWidth() problem]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 05:15:45 +0000</pubDate>
  <lastBuildDate>Thu, 29 Mar 2018 08:07:58 +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=23585</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[[solved] Ribbon xtpControlPopup SetWidth() problem : Little addition to drawingCommandBar...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23585&amp;PID=76725&amp;title=solved-ribbon-xtpcontrolpopup-setwidth-problem#76725</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8730">olebed</a><br /><strong>Subject:</strong> 23585<br /><strong>Posted:</strong> 29 March 2018 at 8:07am<br /><br />Little addition to drawing&nbsp;CommandBar buttons with custom size and enabled property TextBelowIcons<br><br><table width="99%"><tr><td><pre class="BBcode">CSize CXTPPaintManager::DrawControlToolBarParent(CDC* pDC, CXTPControl* pButton, BOOL bDraw)<div>{</div><div>.......</div><div><br></div><div>&nbsp; &nbsp; if (pButton-&gt;GetParent()-&gt;IsTextBelowIcons() &amp;&amp; bDrawImage)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; CXTPFontDC fontHorizontal (pDC, pButton-&gt;IsItemDefault() ? &amp;m_xtpFontRegularBold : &amp;m_xtpFontRegular);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; BOOL bTriangled = controlType == xtpControlPopup;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; if (bDraw)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (controlType == xtpControlSplitButtonPopup) rcButton.right -= m_nSplitButtonDropDownWidth;</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CPoint pt = CPoint(rcButton.CenterPoint().x - szIcon.cx / 2, rcButton.top + XTP_DPI_Y(4));</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DrawImage(pDC, pt, szIcon, pImage, bSelected, bPressed, bEnabled, bChecked, bPopuped);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CRect rcText = rcButton;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rcText.top += <b><font color="#00cc00">szIcon</font></b>.cy <font color="#00cc00" style="">+</font> XTP_DPI_Y(4);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DrawControlText(pDC, pButton, rcText, TRUE, FALSE, TRUE, bTriangled);</div>&nbsp; &nbsp; &nbsp; &nbsp; }</pre></td></tr></table><br>]]>
   </description>
   <pubDate>Thu, 29 Mar 2018 08:07:58 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23585&amp;PID=76725&amp;title=solved-ribbon-xtpcontrolpopup-setwidth-problem#76725</guid>
  </item> 
  <item>
   <title><![CDATA[[solved] Ribbon xtpControlPopup SetWidth() problem : HelloMarco,You confused me with...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23585&amp;PID=76637&amp;title=solved-ribbon-xtpcontrolpopup-setwidth-problem#76637</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8730">olebed</a><br /><strong>Subject:</strong> 23585<br /><strong>Posted:</strong> 25 February 2018 at 1:12pm<br /><br />Hello&nbsp;<span style=": rgb240, 241, 245;">Marco</span>,&nbsp;<br><br>You confused me with <a href="http://forum.codejock.com/member_profile.asp?PF=6851" rel="nofollow">Oleg</a>. As I know he doesn't work for Codejock from 2012 or 2013 year.<br><br>About next release - it is&nbsp;<span style="font-family: arial, sans-serif; font-size: 13px; white-space: nowrap;">timeless question for which I don't have answer. So I post there small fixes. This also gives possibility to quick confirmation of solution before release.<br><br>However this isn't useful for ActiveX customers. But we can share recent OCXes with support website.<br><br>Regards,<br>&nbsp;Oleksandr Lebed</span>]]>
   </description>
   <pubDate>Sun, 25 Feb 2018 13:12:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23585&amp;PID=76637&amp;title=solved-ribbon-xtpcontrolpopup-setwidth-problem#76637</guid>
  </item> 
  <item>
   <title><![CDATA[[solved] Ribbon xtpControlPopup SetWidth() problem : Oleg, is it possible to release...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23585&amp;PID=76636&amp;title=solved-ribbon-xtpcontrolpopup-setwidth-problem#76636</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=313">Marco1</a><br /><strong>Subject:</strong> 23585<br /><strong>Posted:</strong> 25 February 2018 at 12:39pm<br /><br />Oleg, is it possible to release a <b>18.3.1</b> (for this) soon?<br>Would really appreciate that.<br><br>]]>
   </description>
   <pubDate>Sun, 25 Feb 2018 12:39:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23585&amp;PID=76636&amp;title=solved-ribbon-xtpcontrolpopup-setwidth-problem#76636</guid>
  </item> 
  <item>
   <title><![CDATA[[solved] Ribbon xtpControlPopup SetWidth() problem : Hello,I&amp;#039;ve fixed also calculating...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23585&amp;PID=76635&amp;title=solved-ribbon-xtpcontrolpopup-setwidth-problem#76635</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8730">olebed</a><br /><strong>Subject:</strong> 23585<br /><strong>Posted:</strong> 24 February 2018 at 6:47pm<br /><br />Hello,<br><br>I've fixed also calculating and drawing triangles on popup and splitPopup&nbsp; controls in cases with empty labels.&nbsp; I've added this changes to <b>previous </b>code snippet.<br><br>Also I've fixed precalculation size of Edit and ComboBox controls of CommandBar/Ribbon <table width="99%"><tr><td><pre class="BBcode">CSize CXTPPaintManager::DrawControlEdit(CDC* pDC, CXTPControlEdit* pControlEdit, BOOL bDraw)<div>{</div><div>......</div><div><br></div><div>&nbsp; &nbsp; BOOL bImageVisible = pControlEdit-&gt;IsImageVisible();</div><div><b><font color="#00cc00">&nbsp; &nbsp; CSize szIcon = CSize(0);</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; if (bImageVisible)</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; {</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; szIcon = pControlEdit-&gt;GetIconSize();</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; CSize szAvailable = CSize(XTP_DPI_X(szIcon.cx) + XTP_DPI_X(2) * 2, nHeight);</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; CXTPImageManagerIcon* pImage = pControlEdit-&gt;GetImage(szIcon.cx);</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; szIcon = GetStretchIconSizeDPIAwareness(pImage, szIcon, pControlEdit, szAvailable);</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; }</font></b></div><div><br></div><div>&nbsp; &nbsp; int nLabelWidth = (bImageVisible ? <b><font color="#00cc00">szIcon.cx&nbsp; + XTP_DPI_X(3) * 2</font></b> : 0) +</div><div>&nbsp; &nbsp; &nbsp; &nbsp; (bCaptionVisible ? nCaptionWidth : 0);</div><div><br></div><div>&nbsp; &nbsp; if (bImageVisible)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; nHeight = max(nHeight, pControlEdit-&gt;GetButtonSize().cy);</div><div><br></div><div>&nbsp; &nbsp; pControlEdit-&gt;SetLabelWidth(nLabelWidth);</div><div><br></div><div>&nbsp; &nbsp; return CSize(pControlEdit-&gt;GetWidth(), nHeight);</div><div>}</div><div><br></div><div>CSize CXTPPaintManager::DrawControlComboBox(CDC* pDC, CXTPControlComboBox* pControlCombo, BOOL bDraw)</div><div>{</div><div>......</div><div><br></div><div>&nbsp; &nbsp; BOOL bImageVisible = pControlCombo-&gt;IsImageVisible();</div><div><b><font color="#00cc00">&nbsp; &nbsp; CSize szIcon = CSize(0);</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; if (bImageVisible)</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; {</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; szIcon = pControlCombo-&gt;GetIconSize();</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; CSize szAvailable = CSize(XTP_DPI_X(szIcon.cx) + XTP_DPI_X(2) * 2, nHeight);</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; CXTPImageManagerIcon* pImage = pControlCombo-&gt;GetImage(szIcon.cx);</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; szIcon = GetStretchIconSizeDPIAwareness(pImage, szIcon, pControlCombo, szAvailable);</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; }</font></b></div><div><br></div><div>&nbsp; &nbsp; int nLabelWidth = (bImageVisible ? <b><font color="#00cc00">szIcon.cx&nbsp; + XTP_DPI_X(3) * 2</font></b> : 0) +</div><div>&nbsp; &nbsp; &nbsp; &nbsp; (bCaptionVisible ? nCaptionWidth : 0);</div><div><br></div><div>&nbsp; &nbsp; if (bImageVisible)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; nHeight = max(nHeight, pControlCombo-&gt;GetParent()-&gt;GetButtonSize().cy);</div><div><br></div><div>&nbsp; &nbsp; pControlCombo-&gt;SetLabelWidth(nLabelWidth);</div><div><br></div><div>&nbsp; &nbsp; return CSize(pControlCombo-&gt;GetWidth(), nHeight);</div>}</pre></td></tr></table><br>Also for using DPIScalingOption in ComboBox control we should set correct pointer to CommandBars on ComboBox creation (see implementation of CXTPPaintManager::IsDPIIconsScallingEnabled) <table width="99%"><tr><td><pre class="BBcode">CXTPControl* CXTPControls::Add(XTPControlType controlType, int nId, LPCTSTR strParameter, int nBefore, BOOL bTemporary)<div>{</div><div>&nbsp; &nbsp; CXTPControl* pControl = NULL;</div><div>&nbsp; &nbsp; CXTPCommandBars* pCommandBars = GetCommandBars();</div><div><br></div><div>&nbsp; &nbsp; switch (controlType)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; case xtpControlCustom:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return Add(new CXTPControlCustom(), nId, strParameter, nBefore, bTemporary);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; case xtpControlButton:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (nId == XTP_ID_WINDOWLIST) pControl = (CXTPControl*)CXTPControlWindowList::CreateObject();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (nId == XTP_ID_WORKSPACE_ACTIONS) pControl = (CXTPControl*)CXTPControlWorkspaceActions::CreateObject();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (nId == ID_VIEW_TOOLBAR) pControl = (CXTPControl*)CXTPControlToolbars::CreateObject();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (nId == XTP_ID_FILE_MRU &amp;&amp; !bTemporary) pControl = (CXTPControl*)CXTPControlRecentFileList::CreateObject();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pControl = (CXTPControl*)CXTPControlButton::CreateObject();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; case xtpControlComboBox:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pControl = (CXTPControl*)CXTPControlComboBox::CreateObject();</div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (pControl-&gt;GetCommandBar())</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pControl-&gt;GetCommandBar()-&gt;SetCommandBars(pCommandBars);</font></b></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>........</div></pre></td></tr></table><br>Regards,<br>&nbsp;Oleksandr Lebed]]>
   </description>
   <pubDate>Sat, 24 Feb 2018 18:47:31 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23585&amp;PID=76635&amp;title=solved-ribbon-xtpcontrolpopup-setwidth-problem#76635</guid>
  </item> 
  <item>
   <title><![CDATA[[solved] Ribbon xtpControlPopup SetWidth() problem : HelloH&#195;&#165;kan Renning,Thanks a lot...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23585&amp;PID=76628&amp;title=solved-ribbon-xtpcontrolpopup-setwidth-problem#76628</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8730">olebed</a><br /><strong>Subject:</strong> 23585<br /><strong>Posted:</strong> 22 February 2018 at 2:33pm<br /><br />Hello&nbsp;Håkan Renning,<br><br>Thanks a lot for bringing this to our attention.<br>I'm glad to inform you that the issue has been addressed and fixed.<br>Problem was due to recent changes for drawing icons with custom&nbsp;size on CommandBars.<br><table width="99%"><tr><td><pre class="BBcode">CSize CXTPPaintManager::DrawControlToolBarParent(CDC* pDC, CXTPControl* pButton, BOOL bDraw)<div>{</div><div>.......</div><div><b><font color="#00cc00">&nbsp; &nbsp; if (bDrawImage)</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; {</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; if (!bVert)</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; szIcon.cx += XTP_DPI_X(3) * 2;</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; else</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; szIcon.cy += XTP_DPI_Y(3) * 2;&nbsp; &nbsp;&nbsp;</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; }</font></b></div><div><br></div><div>&nbsp; &nbsp; switch (controlType)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; case xtpControlPopup:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!bDrawImage)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CSize sz = DrawControlText(pDC, pButton, rcButton, bDraw, bVert, TRUE, !bDraw || pButton-&gt;GetParent()-&gt;GetType() != xtpBarTypeMenuBar);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (pButton-&gt;GetID() == XTP_ID_CUSTOMIZE_ADDORREMOVE)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sz = CSize(sz.cx + XTP_DPI_X(14), sz.cy + XTP_DPI_Y(10));</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sz = CSize(sz.cx + XTP_DPI_X(6), sz.cy + XTP_DPI_Y(6));</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return GetControlSize(pButton, sz, bVert);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!bDrawText)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CPoint pt = CPoint(rcButton.right - XTP_DPI_X(7) <b><font color="#00cc00">/ 2</font></b>, rcButton.CenterPoint().y);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DrawDropDownGlyph(pDC, pButton, pt, pButton-&gt;GetSelected(), pButton-&gt;GetPopuped(), pButton-&gt;GetEnabled(), FALSE);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return GetControlSize(pButton, CSize(<b><font color="#00cc00">szIcon.cx</font></b> + XTP_DPI_X(7), szButton.cy), bVert);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return GetControlSize(pButton, DrawControlText(pDC, pButton, rcButton, bDraw, pButton-&gt;GetParent()-&gt;GetType() != xtpBarTypeMenuBar, <b><font color="#00cc00">szIcon</font></b>, bDrawImage), bVert);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; case xtpControlSplitButtonPopup:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;if (!bDrawImage)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;szButton = CSize(XTP_COMMANDBAR_MIN_CONTROL_HEIGHT, XTP_COMMANDBAR_MIN_CONTROL_HEIGHT);</div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;else</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;szButton.cx = szIcon.cx;</font></b></div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!bDrawText)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return GetControlSize(pButton, CSize(szButton.cx + m_nSplitButtonDropDownWidth, szButton.cy), bVert);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rcButton.right -= m_nSplitButtonDropDownWidth;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CSize sz = DrawControlText(pDC, pButton, rcButton, bDraw, FALSE, <b><font color="#00cc00">szIcon</font></b>, bDrawImage);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return GetControlSize(pButton, CSize(sz.cx + m_nSplitButtonDropDownWidth, sz.cy), bVert);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; case xtpControlButtonPopup:</div><div>&nbsp; &nbsp; case xtpControlButton:</div><div>&nbsp; &nbsp; case xtpControlLabel:</div><div>&nbsp; &nbsp; case xtpControlCheckBox:</div><div>&nbsp; &nbsp; case xtpControlGallery:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!bDrawText)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return GetControlSize(pButton, szButton, bVert);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!bDrawImage) szButton = CSize(XTP_COMMANDBAR_MIN_CONTROL_HEIGHT, szButton.cy);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return GetControlSize(pButton, DrawControlText(pDC, pButton, rcButton, bDraw, FALSE, <b><font color="#00cc00">szIcon</font></b>, bDrawImage), bVert);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp; return 0;</div><div>}</pre></td></tr></table></div>Regards,<br>&nbsp;Oleksandr Lebed]]>
   </description>
   <pubDate>Thu, 22 Feb 2018 14:33:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23585&amp;PID=76628&amp;title=solved-ribbon-xtpcontrolpopup-setwidth-problem#76628</guid>
  </item> 
  <item>
   <title><![CDATA[[solved] Ribbon xtpControlPopup SetWidth() problem : Hi,Just upgraded to 18.3 from...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23585&amp;PID=76624&amp;title=solved-ribbon-xtpcontrolpopup-setwidth-problem#76624</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3206">renninha</a><br /><strong>Subject:</strong> 23585<br /><strong>Posted:</strong> 22 February 2018 at 9:24am<br /><br />Hi,<div><br></div><div>Just upgraded to 18.3 from 18.2 and now the pButton-&gt;SetWidth() causes the button's caption to disappear, only the icon remains (xtpButtonIconAndCaption). Worked fine in 18.2 and earlier versions.</div><div><br></div><div><img src="uploads/3206/da.PNG" height="103" width="262" border="0" /><br></div><div><br></div><div>Is it a bug or show I now use a different parameter to do this?</div><div><br></div><div>Thanks.</div>]]>
   </description>
   <pubDate>Thu, 22 Feb 2018 09:24:22 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23585&amp;PID=76624&amp;title=solved-ribbon-xtpcontrolpopup-setwidth-problem#76624</guid>
  </item> 
 </channel>
</rss>