<?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 : Hanging when using &#079;nInitCommandsPopup</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Hanging when using &#079;nInitCommandsPopup]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 13 Jun 2026 13:25:51 +0000</pubDate>
  <lastBuildDate>Mon, 10 Apr 2006 16:09:39 +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=3968</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[Hanging when using &#079;nInitCommandsPopup : change loop to   for (int i...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3968&amp;PID=12115&amp;title=hanging-when-using-oninitcommandspopup#12115</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 3968<br /><strong>Posted:</strong> 10 April 2006 at 4:09pm<br /><br /><P>change loop to </P><P>&nbsp;</P><P>for (int i = 0; i &lt; pControls-&gt;GetCount(); i++)<BR>{</P><P>CXTPControl* pControl = pControls-&gt;GetAt(i);<BR>}</P>]]>
   </description>
   <pubDate>Mon, 10 Apr 2006 16:09:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3968&amp;PID=12115&amp;title=hanging-when-using-oninitcommandspopup#12115</guid>
  </item> 
  <item>
   <title><![CDATA[Hanging when using &#079;nInitCommandsPopup :  Hi,  I have a very simple...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3968&amp;PID=12079&amp;title=hanging-when-using-oninitcommandspopup#12079</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1909">BruceW</a><br /><strong>Subject:</strong> 3968<br /><strong>Posted:</strong> 10 April 2006 at 6:13am<br /><br /><br>Hi,<br><br>I have a very simple MDI example that I have been using to test ideasbefore incorporating them into my real application. I have been workingon dynamic menus from the main menubar, using OnInitCommandsPopup.<br><br>The routine gets called OK and some initial tests indicate that inprinciple I can do what I want.&nbsp; However the simple applicationhangs on the following code.<br><br>void CMainFrame::OnInitCommandsPopup(CXTPPopupBar* pPopupBar)<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // get the list of commands for the popup.<br>&nbsp;&nbsp;&nbsp; CXTPControls* pControls = pPopupBar-&gt;GetControls();<br><br>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; // Iterate through the list looking for the entries with the<br>&nbsp;&nbsp;&nbsp; &nbsp; // extension markers.<br>&nbsp;&nbsp;&nbsp; CXTPControl* pFirst = pControls-&gt;GetFirst();<br>&nbsp;&nbsp;&nbsp; CXTPControl* pEntry = pFirst;<br><br>&nbsp;&nbsp;&nbsp; long nIndex;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; CString caption;<br><br>&nbsp;&nbsp;&nbsp; while (pEntry != NULL)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; caption = pEntry-&gt;GetCaption();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; nIndex&nbsp; = pEntry-&gt;GetIndex();<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; // If caption has extension marker, then include extended menus.<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; // ...<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEntry = pControls-&gt;GetAt( pControls-&gt;GetNext( nIndex, 1 ) );<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; // GetNext cycles to beginning, so check for end of list.<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; if (pEntry == pFirst)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; pEntry = NULL;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br>}<br><br>This is simple to reproduce in a basic MFC MDI program (mine has acouple of other examples in such as child window tabs, etc. so I havenot tried taking all of the other code out), as follows:<br><br>1. Run application.<br>2. Select the standard 'Window' menu option, its menu should appear.<br>3. Drag mouse right to the 'View' menu option and its menu should appear.<br>4. Drag the mouse back to the 'Window' menu option, its menu should appear.<br>5. Drag the mouse back to the 'View' menu option.&nbsp; This will result in the application hanging.<br><br>Any advice or help here would be much appreciated.<br><br>Thanks,<br><br>Bruce.<br>]]>
   </description>
   <pubDate>Mon, 10 Apr 2006 06:13:10 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3968&amp;PID=12079&amp;title=hanging-when-using-oninitcommandspopup#12079</guid>
  </item> 
 </channel>
</rss>