<?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 : Using Ribb&#111;n in a dialog</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Using Ribb&#111;n in a dialog]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 29 Jun 2026 01:04:24 +0000</pubDate>
  <lastBuildDate>Wed, 10 Jun 2020 02:48:59 +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=23364</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[Using Ribb&#111;n in a dialog : This was very useful for displaying...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23364&amp;PID=77698&amp;title=using-ribbon-in-a-dialog#77698</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=686">cpede</a><br /><strong>Subject:</strong> 23364<br /><strong>Posted:</strong> 10 June 2020 at 2:48am<br /><br />This was very useful for displaying Ribbons in a dialog.<div><br></div><div>But how do I remove/delete the Ribbon bar runtime from code in the dialog.</div><div><br></div><div>1) Using Remove on the Toolbar does not fully do the trick, since there still is an empty window/background in the ribbon area left?</div><div>2) SetVisible(FALSE) hides the toolbar but also leaves an empty window/background.</div><div>3) delete CommandBars is virtual and cannot be called</div><div><br></div><div>There is missing the opposite to InitCommandBars to fully remove the ribbon?</div><div><br></div><div>-cpede</div>]]>
   </description>
   <pubDate>Wed, 10 Jun 2020 02:48:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23364&amp;PID=77698&amp;title=using-ribbon-in-a-dialog#77698</guid>
  </item> 
  <item>
   <title><![CDATA[Using Ribb&#111;n in a dialog : Hi!Yes it works :-)Have a look...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23364&amp;PID=75877&amp;title=using-ribbon-in-a-dialog#75877</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=365">Alex H.</a><br /><strong>Subject:</strong> 23364<br /><strong>Posted:</strong> 12 June 2017 at 9:23am<br /><br />Hi!<br>Yes it works :-)<br><br>Have a look at:<br>Samples\CommandBars\DialogSample\DialogSampleDlg.cpp(197)<br><br>I can send you some snippets :-)<br><br>derive your dialog from <br><pre style="font-family:C&#111;nsolas;font-size:13;color:black;:white;"><span style="color:#2b91af;">CXTPDialogBase</span>&lt;<span style="color:#6f008a;">CXTResizeDialog</span>&gt;<br>in <span style="color:#a31515;">OnInitDialog</span> create your commandbars<br><br><span style="color:green;">//&nbsp;Initialize&nbsp;the&nbsp;command&nbsp;bars</span>	<span style="color:blue;">if</span>(!InitCommandBars())	{		<span style="color:blue;">return</span>&nbsp;-1;	}	 	<span style="color:green;">//&nbsp;Get&nbsp;a&nbsp;pointer&nbsp;to&nbsp;the&nbsp;command&nbsp;bars&nbsp;object.</span>	<span style="color:#2b91af;">CXTPCommandBars</span>*&nbsp;pCommandBars&nbsp;=&nbsp;GetCommandBars();	<span style="color:blue;">if</span>(pCommandBars&nbsp;==&nbsp;<span style="color:#6f008a;">NULL</span>)	{				<span style="color:blue;">return</span>&nbsp;-1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:green;">//&nbsp;fail&nbsp;to&nbsp;create</span>	} 	<br>&nbsp;then create your ribbon:<br><br><span style="color:#2b91af;">CXTPRibbonBar</span>*&nbsp;pRibbonBar&nbsp;=&nbsp;(<span style="color:#2b91af;">CXTPRibbonBar</span>*)pCommandBars-&gt;Add(<span style="color:#6f008a;">_T</span>(<span style="color:#a31515;">""</span>),&nbsp;<span style="color:darkslategray;">xtpBarTop</span>,&nbsp;<span style="color:#6f008a;">RUNTIME_CLASS</span>(<span style="color:#2b91af;">CXTPRibbonBar</span>)); 	<span style="color:blue;">if</span>&nbsp;(!pRibbonBar)	{				<span style="color:blue;">return</span>&nbsp;<span style="color:#6f008a;">FALSE</span>;	}<br>	pRibbonBar-&gt;EnableDocking(0);	pRibbonBar-&gt;EnableCustomization(<span style="color:#6f008a;">FALSE</span>);<br>...<br> <br><span style="color:#2b91af;">	CXTPRibbonTab</span>*&nbsp;pTabBase&nbsp;=&nbsp;pRibbonBar-&gt;AddTab(&nbsp;<span style="color:#2b91af;">CMfxString</span>(<span style="color:#6f008a;">IDS_RIBBON_START</span>)&nbsp;);<br>... <br><br>you will nedd a helper<br><br><span style="color:green;">//---------------------------------------------------------------------------------------&nbsp;</span><span style="color:blue;">void</span>&nbsp;<span style="color:#2b91af;">CDlgMailNew</span>::RepositionControls()<span style="color:green;">//---------------------------------------------------------------------------------------&nbsp;</span>{	<span style="color:blue;">if</span>&nbsp;(m_bInRepositionControls)		<span style="color:blue;">return</span>; 	<span style="color:#2b91af;">CRect</span>&nbsp;rcClientStart;		GetClientRect(rcClientStart); 	<span style="color:blue;">if</span>&nbsp;((GetStyle()&nbsp;&amp;&nbsp;<span style="color:#6f008a;">WS_MINIMIZE</span>)&nbsp;||&nbsp;(rcClientStart.IsRectEmpty()))		<span style="color:blue;">return</span>; 	m_bInRepositionControls&nbsp;=&nbsp;<span style="color:#6f008a;">TRUE</span>; 	<span style="color:#2b91af;">CRect</span>&nbsp;rcClientNow;	RepositionBars(<span style="color:#6f008a;">AFX_IDW_CONTROLBAR_FIRST</span>,&nbsp;<span style="color:#6f008a;">AFX_IDW_CONTROLBAR_LAST</span>,&nbsp;0,&nbsp;<span style="color:darkslategray;">reposQuery</span>,&nbsp;rcClientNow); 	<span style="color:#2b91af;">CRect</span>&nbsp;rcBorders(rcClientNow.left&nbsp;-&nbsp;rcClientStart.left,&nbsp;rcClientNow.top&nbsp;-&nbsp;rcClientStart.top,&nbsp;&nbsp;rcClientStart.right&nbsp;-&nbsp;rcClientNow.right,&nbsp;		rcClientStart.bottom&nbsp;-&nbsp;rcClientNow.bottom); 	<span style="color:blue;">if</span>&nbsp;(rcBorders&nbsp;!=&nbsp;m_rcBorders)	{				<span style="color:#2b91af;">CPoint</span>&nbsp;ptOffset(rcBorders.left&nbsp;-&nbsp;m_rcBorders.left,&nbsp;rcBorders.top&nbsp;-&nbsp;m_rcBorders.top);		<span style="color:#2b91af;">CSize</span>&nbsp;szOffset(rcBorders.left&nbsp;+&nbsp;rcBorders.right&nbsp;-&nbsp;m_rcBorders.left&nbsp;-&nbsp;m_rcBorders.right,			rcBorders.top&nbsp;+&nbsp;rcBorders.bottom&nbsp;-&nbsp;m_rcBorders.top&nbsp;-&nbsp;m_rcBorders.bottom); 		m_ptRepositionOffset&nbsp;=&nbsp;ptOffset; 		<span style="color:#2b91af;">CRect</span>&nbsp;rcWindow;		GetWindowRect(rcWindow);		rcWindow.BottomRight()&nbsp;+=&nbsp;szOffset; 		Offset(ptOffset);		m_szWindow&nbsp;+=&nbsp;szOffset;		m_szMin&nbsp;+=&nbsp;szOffset;			MoveWindow(rcWindow,&nbsp;<span style="color:#6f008a;">TRUE</span>);	} 	m_rcBorders&nbsp;=&nbsp;rcBorders; 	RepositionBars(<span style="color:#6f008a;">AFX_IDW_CONTROLBAR_FIRST</span>,&nbsp;<span style="color:#6f008a;">AFX_IDW_CONTROLBAR_LAST</span>,&nbsp;0);		m_bInRepositionControls&nbsp;=&nbsp;<span style="color:#6f008a;">FALSE</span>;}<br><br>----<br><br>call this helper in OnSize and in OnInitDialog<br><br>:-)<br><br><br></pre>]]>
   </description>
   <pubDate>Mon, 12 Jun 2017 09:23:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23364&amp;PID=75877&amp;title=using-ribbon-in-a-dialog#75877</guid>
  </item> 
  <item>
   <title><![CDATA[Using Ribb&#111;n in a dialog : Hello. Is this possible to use...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23364&amp;PID=75864&amp;title=using-ribbon-in-a-dialog#75864</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9163">yves</a><br /><strong>Subject:</strong> 23364<br /><strong>Posted:</strong> 05 June 2017 at 6:38pm<br /><br />Hello. Is this possible to use Ribbon in a dialog? Does anyone have an example? Thanks.]]>
   </description>
   <pubDate>Mon, 05 Jun 2017 18:38:10 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23364&amp;PID=75864&amp;title=using-ribbon-in-a-dialog#75864</guid>
  </item> 
 </channel>
</rss>