<?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 : Not getting HMENU of MDI Menu</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : General Discussion : Not getting HMENU of MDI Menu]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 14 May 2026 03:15:31 +0000</pubDate>
  <lastBuildDate>Thu, 08 Mar 2007 01:41:38 +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=6589</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[Not getting HMENU of MDI Menu : Hello,  I have created MDI application...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6589&amp;PID=21002&amp;title=not-getting-hmenu-of-mdi-menu#21002</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2796">Makarand</a><br /><strong>Subject:</strong> 6589<br /><strong>Posted:</strong> 08 March 2007 at 1:41am<br /><br />Hello,<DIV>&nbsp;</DIV><DIV>I have created MDI application with MDI menu by using following code</DIV><DIV>&nbsp;</DIV><DIV>if (!InitCommandBars())<BR>&nbsp;&nbsp;return -1;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</DIV><DIV>CXTPCommandBars* pCommandBars = GetCommandBars();<BR>&nbsp;if(pCommandBars == NULL)<BR>&nbsp;{<BR>&nbsp;&nbsp;TRACE0("Failed to create command bars object.\n");<BR>&nbsp;&nbsp;return -1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // fail to create<BR>&nbsp;}</DIV><DIV>&nbsp;// Add the menu bar<BR>&nbsp;CXTPMenuBar* pMenuBar = pCommandBars-&gt;SetMenu(<BR>&nbsp;&nbsp;_T("Menu Bar"), IDR_MAINFRAME);</DIV><DIV>&nbsp;if(pMenuBar == NULL)<BR>&nbsp;{<BR>&nbsp;&nbsp;TRACE0("Failed to create menu bar.\n");<BR>&nbsp;&nbsp;return -1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // fail to create<BR>&nbsp;}</DIV><DIV>&nbsp;</DIV><DIV>Now I want to get the hendle of MDI menu.</DIV><DIV>I have used following code for the same </DIV><DIV>&nbsp;</DIV><DIV>HMENU hMenu = GetMenu()-&gt;GetSafeHmenu();</DIV><DIV>&nbsp;</DIV><DIV>or</DIV><DIV>&nbsp;</DIV><DIV>CMainFrame * pFrame = (CMainFrame *)AfxGetMainWnd();</DIV><DIV>CMenu * pMenu = pFrame-&gt;GetMenu();</DIV><DIV>&nbsp;</DIV><DIV>But I am getting NULL value.</DIV><DIV>&nbsp;</DIV><DIV>How do I get the HMENU of the MDI Menu?</DIV><DIV>&nbsp;</DIV><DIV>Please Help me </DIV><DIV>&nbsp;</DIV><DIV>Thanks,</DIV><DIV>Makarand</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 08 Mar 2007 01:41:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6589&amp;PID=21002&amp;title=not-getting-hmenu-of-mdi-menu#21002</guid>
  </item> 
 </channel>
</rss>