<?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 : How to add commandbars to MDIChild window?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : How to add commandbars to MDIChild window?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 11 Jun 2026 07:18:21 +0000</pubDate>
  <lastBuildDate>Wed, 23 Jul 2008 02:05:25 +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=10846</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[How to add commandbars to MDIChild window? : I was quite inconsiderate in OnSize. Thank...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=10846&amp;PID=38734&amp;title=how-to-add-commandbars-to-mdichild-window#38734</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4351">Shinonome</a><br /><strong>Subject:</strong> 10846<br /><strong>Posted:</strong> 23 July 2008 at 2:05am<br /><br />I was quite inconsiderate in OnSize.<br />Thank you Oleg !<br /><br /> <img src="http://forum.codejock.com/smileys/smiley36.gif" border="0" align="middle"> ]]>
   </description>
   <pubDate>Wed, 23 Jul 2008 02:05:25 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=10846&amp;PID=38734&amp;title=how-to-add-commandbars-to-mdichild-window#38734</guid>
  </item> 
  <item>
   <title><![CDATA[How to add commandbars to MDIChild window? : Hi,  Also catch OnSize and a...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=10846&amp;PID=38730&amp;title=how-to-add-commandbars-to-mdichild-window#38730</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 10846<br /><strong>Posted:</strong> 23 July 2008 at 1:52am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>Also catch OnSize and add</DIV><DIV>&nbsp;</DIV><DIV>RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);</DIV>]]>
   </description>
   <pubDate>Wed, 23 Jul 2008 01:52:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=10846&amp;PID=38730&amp;title=how-to-add-commandbars-to-mdichild-window#38730</guid>
  </item> 
  <item>
   <title><![CDATA[How to add commandbars to MDIChild window? : I want to attach the toolbar in...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=10846&amp;PID=38687&amp;title=how-to-add-commandbars-to-mdichild-window#38687</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4351">Shinonome</a><br /><strong>Subject:</strong> 10846<br /><strong>Posted:</strong> 22 July 2008 at 8:29am<br /><br />I want to attach the toolbar in MDI child window of a CWnd.<br />It doesn't function though it wrote referring to 'http://forum.codejock.com/forum_posts.asp?TID=9230'.<br />I want to write it on the class that derives from not CMDIChildWnd but CWnd.<br />What is insufficient?<br /><br />1) Create MDI Application without Document/View architecture.<br />2) Add OnCreate method in CChildView.<br />3) Edit OnCreate method, Constructor and destructor.<br /><br />-------------------------------------------------------------------------<br /><br />class CChildView : public CWnd<br />{<br />public:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CChildView() ;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;virtual ~CChildView() ;<br /><br />protected :<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;virtual BOOL PreCreateWindow( CREATESTRUCT& cs ) ;<br /><br />protected :<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;afx_msg int OnCreate( LPCREATESTRUCT lpCreateStruct ) ;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;afx_msg void OnPaint() ;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DECLARE_MESSAGE_MAP()<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CXTPCommandBars*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_lpxtpCmdBars ;<br />} ;<br /><br /><br />CChildView::CChildView()<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_lpxtpCmdBars = CXTPCommandBars::CreateCommandBars() ;<br />}<br /><br />CChildView::~CChildView()<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_lpxtpCmdBars-&gt;InternalRelease() ;<br />}<br /><br />BEGIN_MESSAGE_MAP( CChildView, CWnd )<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ON_WM_PAINT()<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ON_WM_CREATE()<br />END_MESSAGE_MAP()<br /><br />BOOL CChildView::PreCreateWindow(CREATESTRUCT& cs)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if( ! CWnd::PreCreateWindow( cs )) return FALSE ;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cs.dwExStyle |= WS_EX_CLIENTEDGE;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cs.style&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&= ~WS_BORDER;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cs.lpszClass  = AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW|CS_DBLCLKS, ::LoadCursor( NULL, IDC_ARROW ), reinterpret_cast&lt; HBRUSH &gt;( COLOR_WINDOW + 1 ), NULL ) ;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return TRUE ;<br />}<br /><br />void CChildView::OnPaint()<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CPaintDC dc( this ) ;<br />}<br /><br />int CChildView::OnCreate(LPCREATESTRUCT lpCreateStruct)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if( CWnd::OnCreate(lpCreateStruct ) == -1 ) return -1 ;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_lpxtpCmdBars-&gt;GetToolTipContext()-&gt;SetStyle( xtpToolTipStandard ) ;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_lpxtpCmdBars-&gt;SetSite( this ) ;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_lpxtpCmdBars-&gt;EnableCustomization( FALSE ) ;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_lpxtpCmdBars-&gt;EnableDocking();<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Create ToolBar<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CXTPToolBar* lpxtpToolBar = (CXTPToolBar*)m_lpxtpCmdBars-&gt;Add( L"Standard", xtpBarBottom ) ;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if( ! lpxtpToolBar || !lpxtpToolBar-&gt;LoadToolBar( IDR_MAINFRAME ))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TRACE0( "Failed to create toolbar\n" ) ;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return -1 ;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lpxtpToolBar-&gt;SetShowGripper( FALSE ) ;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lpxtpToolBar-&gt;ShowExpandButton( FALSE ) ;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lpxtpToolBar-&gt;EnableDocking( xtpFlagAlignBottom ) ;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return 0 ;<br />}<br /><br />-------------------------------------------------------------------------<br /> <img src="http://forum.codejock.com/smileys/smiley19.gif" border="0" align="middle"> ]]>
   </description>
   <pubDate>Tue, 22 Jul 2008 08:29:34 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=10846&amp;PID=38687&amp;title=how-to-add-commandbars-to-mdichild-window#38687</guid>
  </item> 
  <item>
   <title><![CDATA[How to add commandbars to MDIChild window? :   mgampi wrote: Hi,Take a look...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=10846&amp;PID=36069&amp;title=how-to-add-commandbars-to-mdichild-window#36069</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3353">Howard Farseer</a><br /><strong>Subject:</strong> 10846<br /><strong>Posted:</strong> 31 May 2008 at 2:37pm<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by mgampi" alt="Originally posted by mgampi" style="vertical-align: text-bottom;" /> <strong>mgampi wrote:</strong><br /><br /><P>Hi,<BR>Take a look at <a href="http://forum.codejock.com/forum_posts.asp?TID=9230" target="_blank">http://forum.codejock.com/forum_posts.asp?TID=9230</A>. </P></td></tr></table> <DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>thank you very much! It really works!</DIV>]]>
   </description>
   <pubDate>Sat, 31 May 2008 14:37:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=10846&amp;PID=36069&amp;title=how-to-add-commandbars-to-mdichild-window#36069</guid>
  </item> 
  <item>
   <title><![CDATA[How to add commandbars to MDIChild window? : Hi,Take a look at http://forum...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=10846&amp;PID=36062&amp;title=how-to-add-commandbars-to-mdichild-window#36062</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 10846<br /><strong>Posted:</strong> 31 May 2008 at 6:09am<br /><br /><P>Hi,<BR>Take a look at <a href="http://forum.codejock.com/forum_posts.asp?TID=9230" target="_blank">http://forum.codejock.com/forum_posts.asp?TID=9230</A>. </P>]]>
   </description>
   <pubDate>Sat, 31 May 2008 06:09:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=10846&amp;PID=36062&amp;title=how-to-add-commandbars-to-mdichild-window#36062</guid>
  </item> 
  <item>
   <title><![CDATA[How to add commandbars to MDIChild window? : I&amp;#039;ve tried my way like th...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=10846&amp;PID=36057&amp;title=how-to-add-commandbars-to-mdichild-window#36057</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3353">Howard Farseer</a><br /><strong>Subject:</strong> 10846<br /><strong>Posted:</strong> 31 May 2008 at 1:20am<br /><br /><DIV>I've tried my way like this:</DIV><DIV>VERIFY(m_wndToolBar.CreateToolBar(WS_VISIBLE | WS_CHILD | <BR>&nbsp;&nbsp;&nbsp;CBRS_TOOLTIPS | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, this));<BR>&nbsp;&nbsp;VERIFY(m_wndToolBar.LoadToolBar(IDR_SPLIT_ADDRESSBAR/*IDR_EXPLORER_BAR*/));</DIV><DIV>&nbsp;</DIV><DIV>but this toolbar doesn't has all features as toolbars in main frame window.</DIV><DIV>Especially it has no effect when i set xtpFlagStretched flag,.The custom control didn't&nbsp; stretch while the same one in mainwnd toolbar did.</DIV>]]>
   </description>
   <pubDate>Sat, 31 May 2008 01:20:34 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=10846&amp;PID=36057&amp;title=how-to-add-commandbars-to-mdichild-window#36057</guid>
  </item> 
 </channel>
</rss>