<?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 : Ribbon Control on Dialog Box</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Ribbon Control on Dialog Box]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 13 Jun 2026 01:54:45 +0000</pubDate>
  <lastBuildDate>Mon, 12 Oct 2009 15:07:07 +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=15276</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[Ribbon Control on Dialog Box : Alright thanks, it works perfectly......]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15276&amp;PID=53791&amp;title=ribbon-control-on-dialog-box#53791</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5577">EASX</a><br /><strong>Subject:</strong> 15276<br /><strong>Posted:</strong> 12 October 2009 at 3:07pm<br /><br />Alright thanks, it works perfectly... I felt like the answer was right in front of me. I feel so foolish&nbsp;<img src="http://forum.codejock.com/smileys/smiley26.gif" border="0" align="absmiddle">]]>
   </description>
   <pubDate>Mon, 12 Oct 2009 15:07:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15276&amp;PID=53791&amp;title=ribbon-control-on-dialog-box#53791</guid>
  </item> 
  <item>
   <title><![CDATA[Ribbon Control on Dialog Box : You need  if ( bCheckbox ==...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15276&amp;PID=53781&amp;title=ribbon-control-on-dialog-box#53781</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 15276<br /><strong>Posted:</strong> 12 October 2009 at 12:39pm<br /><br /><P>You need</P><DIV>&nbsp;</DIV><DIV>if ( bCheckbox <strong>==</strong> TRUE )<BR>{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Code in here<BR>}</DIV><DIV>&nbsp;</DIV><DIV>instead of</DIV><DIV>&nbsp;</DIV><DIV>if ( bCheckbox = TRUE )<BR>{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Code in here<BR>}</DIV>]]>
   </description>
   <pubDate>Mon, 12 Oct 2009 12:39:55 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15276&amp;PID=53781&amp;title=ribbon-control-on-dialog-box#53781</guid>
  </item> 
  <item>
   <title><![CDATA[Ribbon Control on Dialog Box :     Ok its fixed. Thank you!...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15276&amp;PID=53642&amp;title=ribbon-control-on-dialog-box#53642</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5577">EASX</a><br /><strong>Subject:</strong> 15276<br /><strong>Posted:</strong> 06 October 2009 at 2:26am<br /><br />Ok its fixed. Thank you! I was forgetting the "? TRUE : FALSE" and the ZeroMemory.<br><br>Now one last question ( I think ), when I try to do anything like:<br><br><table width="99%"><tr><td><pre class="BBcode">if ( bCheckbox = TRUE )<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Code in here<br>}</pre></td></tr></table><br><br>It doesn't work and the code messes up again. Where can I add the code to make my app do something when the checkbox is checked? And I'm actually using:<br><br><table width="99%"><tr><td><pre class="BBcode">ON_COMMAND</pre></td></tr></table><br>and<br><table width="99%"><tr><td><pre class="BBcode">ON_UPDATE_COMMAND_UI</pre></td></tr></table><br><br>for a single checkbox.<br><br>My functions look like:<br><br><table width="99%"><tr><td><pre class="BBcode">void CDialogSampleDlg::OnViewShowHide ( )<br>{<br>&nbsp;&nbsp;&nbsp; bCheckbox ^= 1;<br>}</pre></td></tr></table><br><br>and<br><br><table width="99%"><tr><td><pre class="BBcode">void CDialogSampleDlg::OnUpdateViewShowHide ( CCmdUI* pCmdUI )<br>{<br>&nbsp;&nbsp;&nbsp; pCmdUI-&gt;SetCheck ( bCheckbox ? TRUE : FALSE );<br>}</pre></td></tr></table><br><br>So how/where would I add code to make it do something when checked? I know I can't put it in OnViewShowHide or OnUpdateViewShowHide, as it messes up and the checkbox doesn't operate properly after that. And when I tried putting the code in OnInitDialog, it of course didn't work. But I was trying any options I had.<br><br>Also, I put ZeroMemory in my OnInitDialog. It works, but is that where you wanted me to put it?<br>]]>
   </description>
   <pubDate>Tue, 06 Oct 2009 02:26:01 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15276&amp;PID=53642&amp;title=ribbon-control-on-dialog-box#53642</guid>
  </item> 
  <item>
   <title><![CDATA[Ribbon Control on Dialog Box :  I don&amp;#039;t see where you update...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15276&amp;PID=53634&amp;title=ribbon-control-on-dialog-box#53634</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=369">SuperMario</a><br /><strong>Subject:</strong> 15276<br /><strong>Posted:</strong> 05 October 2009 at 9:13am<br /><br />I don't see where you update the command:<br><br>From header:<br>void OnUpdateViewShowHide(CCmdUI* pCmdUI);<br> void OnViewShowHide(UINT nID);<br>BOOL m_bOptions&#091;6&#093;;<br><br>Source:<br>ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_RULER, ID_VIEW_THUMBNAILS, OnUpdateViewShowHide)<br>ON_COMMAND_RANGE(ID_VIEW_RULER, ID_VIEW_THUMBNAILS, OnViewShowHide)<br><br>ZeroMemory(&amp;m_bOptions, sizeof(m_bOptions));<br><br>void CMainFrame::OnViewShowHide(UINT nID)<br>{<br>&nbsp;&nbsp;&nbsp; m_bOptions&#091;nID - ID_VIEW_RULER&#093; ^= 1;<br>}<br><br>void CDialogSampleDlg::OnUpdateViewShowHide(CCmdUI* pCmdUI)<br>{<br>&nbsp;&nbsp;&nbsp; pCmdUI-&gt;SetCheck(m_bOptions&#091;pCmdUI-&gt;m_nID - ID_VIEW_RULER&#093; ? TRUE : FALSE);<br><br>}<br><br>If that don't he;&#091; post your sample again and we will fix it.<br>]]>
   </description>
   <pubDate>Mon, 05 Oct 2009 09:13:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15276&amp;PID=53634&amp;title=ribbon-control-on-dialog-box#53634</guid>
  </item> 
  <item>
   <title><![CDATA[Ribbon Control on Dialog Box : Sorry for the double post.Its...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15276&amp;PID=53629&amp;title=ribbon-control-on-dialog-box#53629</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5577">EASX</a><br /><strong>Subject:</strong> 15276<br /><strong>Posted:</strong> 04 October 2009 at 4:30pm<br /><br />Sorry for the double post.<br><br><br>Its all drawing perfectly. Now the issue is when I click on the checkbox, it auto-unchecks itself.<br><br>When I use the code:<br><br><table width="99%"><tr><td><pre class="BBcode">void CDialogSampleDlg::OnCheckbox (UINT nID)<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_bCheckbox&#091;nID - ID_BUTTON_CHECKBOX1&#093; ^= 1;<br>}</pre></td></tr></table><br><br>the checkbox's all automatically uncheck themselves (except 3... which is extremely random). And when I use the code:<br><br><table width="99%"><tr><td><pre class="BBcode">void CDialogSampleDlg::OnCheckbox (UINT nID)<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_bCheckbox&#091;nID - ID_BUTTON_CHECKBOX1&#093; = 1;<br>}</pre></td></tr></table><br><br>then the checkbox stays clicked no matter what (of course, since itequals 1, I just did this to show something is wrong within thisfunction).<br><br><br>I have even tried something like this:<br><br><table width="99%"><tr><td><pre class="BBcode">void CDialogSampleDlg::OnCheckbox ()<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_bCheckboxTest ^= 1;<br>}</pre></td></tr></table><br><br>and used ON_COMMAND and ON_UPDATE_COMMAND_UI instead (for theOnUpdateCheckbox function). But the same issue occurs. Do you think youmay know what is the issue is?<br><br>I've also tried:<br><br><table width="99%"><tr><td><pre class="BBcode">void CDialogSampleDlg::OnCheckbox ()<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp; if (&nbsp; m_bCheckboxTest = 0 )<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; m_bCheckboxTest = 1;<br>&nbsp;&nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; m_bCheckboxTest = 0;<br>}</pre></td></tr></table><br><br><br>But again, it doesn't stay checked. Is this just a bug and CodeJock Ribbon controls shouldn't be used on dialog boxes?<br>]]>
   </description>
   <pubDate>Sun, 04 Oct 2009 16:30:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15276&amp;PID=53629&amp;title=ribbon-control-on-dialog-box#53629</guid>
  </item> 
  <item>
   <title><![CDATA[Ribbon Control on Dialog Box :      SuperMario wrote:Haven&amp;#039;t...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15276&amp;PID=53593&amp;title=ribbon-control-on-dialog-box#53593</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5577">EASX</a><br /><strong>Subject:</strong> 15276<br /><strong>Posted:</strong> 01 October 2009 at 6:07pm<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by SuperMario" alt="Originally posted by SuperMario" style="vertical-align: text-bottom;" /> <strong>SuperMario wrote:</strong><br /><br />Haven't had time to look at the sample, here is an old one I dug up, I think all you need to do is update the rc2 file with code from a current ribbon sample.<br><br>http://forum.codejock.com/uploads/20080917_022718_ds.zip<br></td></tr></table><br><br>I'm getting the exact same issue with that one. And when I attempt to add a 2nd tab and write anything in it, it doesn't appear until I minimize the ribbon control then click on the tab (in which case its still locked out, and it ONLY shows when the ribbon control is supposed to be hidden).<br><br><br>Edit: Everything is now drawing PERFECTLY, but I still can't click it, it keeps everything locked out. And the size issue has been corrected as well.<br>]]>
   </description>
   <pubDate>Thu, 01 Oct 2009 18:07:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15276&amp;PID=53593&amp;title=ribbon-control-on-dialog-box#53593</guid>
  </item> 
  <item>
   <title><![CDATA[Ribbon Control on Dialog Box : Haven&amp;#039;t had time to look...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15276&amp;PID=53585&amp;title=ribbon-control-on-dialog-box#53585</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=369">SuperMario</a><br /><strong>Subject:</strong> 15276<br /><strong>Posted:</strong> 01 October 2009 at 3:35pm<br /><br />Haven't had time to look at the sample, here is an old one I dug up, I think all you need to do is update the rc2 file with code from a current ribbon sample.<br><br>http://forum.codejock.com/uploads/20080917_022718_ds.zip<br>]]>
   </description>
   <pubDate>Thu, 01 Oct 2009 15:35:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15276&amp;PID=53585&amp;title=ribbon-control-on-dialog-box#53585</guid>
  </item> 
  <item>
   <title><![CDATA[Ribbon Control on Dialog Box :   Hey SuperMario, thank you...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15276&amp;PID=53580&amp;title=ribbon-control-on-dialog-box#53580</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5577">EASX</a><br /><strong>Subject:</strong> 15276<br /><strong>Posted:</strong> 01 October 2009 at 11:58am<br /><br />Hey SuperMario, thank you for your response!<br><br>I have attached my project so you can take a look at it, since you said its hard to say without seeing the project. Last night I was up changing stuff around, trying to figure how to fix it, so there may be a few issues somewhere in the code. But I just tried to compile and it compiled just fine. I couldn't figure how to add the code you suggested (when I tried adding it, it wouldn't work). So I figured giving you the source would probably be best.<br><br>]]>
   </description>
   <pubDate>Thu, 01 Oct 2009 11:58:19 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15276&amp;PID=53580&amp;title=ribbon-control-on-dialog-box#53580</guid>
  </item> 
  <item>
   <title><![CDATA[Ribbon Control on Dialog Box :   Without seeing your project...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15276&amp;PID=53576&amp;title=ribbon-control-on-dialog-box#53576</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=369">SuperMario</a><br /><strong>Subject:</strong> 15276<br /><strong>Posted:</strong> 01 October 2009 at 9:15am<br /><br />Without seeing your project it is hard to say.&nbsp; But I can guarantee that it will work, just a matter of seeing what you do wrong.&nbsp; A few things to try.<br><br>Do you handle OnKickIdle?<br><br><table width="99%"><tr><td><pre class="BBcode"><br>ON_MESSAGE(WM_KICKIDLE, OnKickIdle)<br><br>.....<br><br>LRESULT CDialogSampleDlg::OnKickIdle(WPARAM, LPARAM)<br>{<br>&nbsp;&nbsp;&nbsp; if (GetCommandBars()) GetCommandBars()-&gt;UpdateCommandBars();<br>&nbsp;&nbsp;&nbsp; // If you use status bar<br>&nbsp;&nbsp;&nbsp; if (m_wndStatusBar.GetSafeHwnd()) m_wndStatusBar.SendMessage(WM_IDLEUPDATECMDUI, TRUE);<br>&nbsp;&nbsp;&nbsp; return 0;<br>}<br></pre></td></tr></table><br><br>As far as the empty space, maybe you need to handle the sizing.<br><br><table width="99%"><tr><td><pre class="BBcode"><br>ON_WM_SIZE()<br><br>void CDialogSampleDlg::OnSize(UINT nType, int cx, int cy) <br>{<br>&nbsp;&nbsp;&nbsp; CDialogSampleDlgBase::OnSize(nType, cx, cy);<br>&nbsp;&nbsp;&nbsp; RepositionControls();<br>}<br><br>void CDialogSampleDlg::RepositionControls()<br>{<br>&nbsp;&nbsp;&nbsp; if (m_bInRepositionControls || !m_bInitDone)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return;<br><br>&nbsp;&nbsp;&nbsp; CRect rcClientStart;<br>&nbsp;&nbsp;&nbsp; CRect rcClientNow;<br>&nbsp;&nbsp;&nbsp; GetClientRect(rcClientStart);<br><br>&nbsp;&nbsp;&nbsp; if ((GetStyle() &amp; WS_MINIMIZE) || (rcClientStart.IsRectEmpty()))<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return;<br><br>&nbsp;&nbsp;&nbsp; m_bInRepositionControls = TRUE;<br><br>&nbsp;&nbsp;&nbsp; RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0, reposQuery, rcClientNow);<br><br>&nbsp;&nbsp;&nbsp; CRect rcBorders(rcClientNow.left - rcClientStart.left, rcClientNow.top - rcClientStart.top,&nbsp; rcClientStart.right - rcClientNow.right, <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rcClientStart.bottom - rcClientNow.bottom);<br><br>&nbsp;&nbsp;&nbsp; if (rcBorders != m_rcBorders)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CPoint ptOffset(rcBorders.left - m_rcBorders.left, rcBorders.top - m_rcBorders.top);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CSize szOffset(rcBorders.left + rcBorders.right - m_rcBorders.left - m_rcBorders.right,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rcBorders.top + rcBorders.bottom - m_rcBorders.top - m_rcBorders.bottom);<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CRect rcWindow;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; GetWindowRect(rcWindow);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rcWindow.BottomRight() += szOffset;<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Offset(ptOffset);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m_szWindow += szOffset;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m_szMin += szOffset;<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; MoveWindow(rcWindow, TRUE);<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; m_rcBorders = rcBorders;<br><br>&nbsp;&nbsp;&nbsp; RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);<br><br>&nbsp;&nbsp;&nbsp; m_bInRepositionControls = FALSE;<br>}<br><br></pre></td></tr></table><br>]]>
   </description>
   <pubDate>Thu, 01 Oct 2009 09:15:08 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15276&amp;PID=53576&amp;title=ribbon-control-on-dialog-box#53576</guid>
  </item> 
  <item>
   <title><![CDATA[Ribbon Control on Dialog Box :    Hey I&amp;#039;m trying the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15276&amp;PID=53561&amp;title=ribbon-control-on-dialog-box#53561</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5577">EASX</a><br /><strong>Subject:</strong> 15276<br /><strong>Posted:</strong> 30 September 2009 at 11:45pm<br /><br />Hey I'm trying the trial and when I make the ribbon bar on my dialog box, I create everything in OnInitDialog();. I figure this has something to do with the buttons and everything else on the ribbon bar functioning properly, but I honestly have no clue how I could fix it. When I compile and launch my app, I can click any button, but as soon as I click a button or any sort of control, it all goes grey and I can't click any of them again. Could someone please explain what to do to fix this issue? I imagine its not a big fix, I just can't think of how to do it as I'm completely new to CodeJock and I'm just trying it out.<br><br><br>Please note this is on a dialog, not MDI or SDI.<br><br><br>Edit: Also, when I add the ribbon controls, it adds a lot of extra space to my dialog on the bottom. When I place something at the bottom of the dialog box in the editor and then compile and run, there is a lot of empty space at the bottom. I suppose this is also how I am implementing the code?<br>]]>
   </description>
   <pubDate>Wed, 30 Sep 2009 23:45:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15276&amp;PID=53561&amp;title=ribbon-control-on-dialog-box#53561</guid>
  </item> 
 </channel>
</rss>