<?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 create menuitem with 2 ic&#111;ns</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : how to create menuitem with 2 ic&#111;ns]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 19 Apr 2026 05:49:57 +0000</pubDate>
  <lastBuildDate>Fri, 07 Jul 2006 12:16:36 +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=3910</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 create menuitem with 2 ic&#111;ns : Hey Oleg,  Thanks for the quick...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3910&amp;PID=14041&amp;title=how-to-create-menuitem-with-2-icons#14041</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=864">JamesH</a><br /><strong>Subject:</strong> 3910<br /><strong>Posted:</strong> 07 July 2006 at 12:16pm<br /><br />Hey Oleg,<DIV>&nbsp;</DIV><DIV>Thanks for the quick response.&nbsp; Your right it was something dumb, the menu created is later copied before being displayed and the copy didn't copy over the DoubleGripper property. <IMG height=17 alt=Embarrassed src="http://forum.codejock.com/smileys/smiley9.gif" width=17 align=absMiddle border="0"></DIV><DIV>&nbsp;</DIV><DIV>Thanks again,</DIV><DIV>- James</DIV>]]>
   </description>
   <pubDate>Fri, 07 Jul 2006 12:16:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3910&amp;PID=14041&amp;title=how-to-create-menuitem-with-2-icons#14041</guid>
  </item> 
  <item>
   <title><![CDATA[how to create menuitem with 2 ic&#111;ns : Hi,   In our WTL sample I a...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3910&amp;PID=14035&amp;title=how-to-create-menuitem-with-2-icons#14035</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 3910<br /><strong>Posted:</strong> 07 July 2006 at 8:56am<br /><br /><DIV>Hi,</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>In our WTL sample I added:</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;XtremeCommandBars::ICommandBarPopupPtr popup = m_spCommandBars-&gt;GetActiveMenuBar()-&gt;Controls-&gt;GetItem(1);<BR>&nbsp;popup-&gt;CommandBar-&gt;DoubleGripper = VARIANT_TRUE;&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>and it works as expected. Check your code.</DIV>]]>
   </description>
   <pubDate>Fri, 07 Jul 2006 08:56:02 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3910&amp;PID=14035&amp;title=how-to-create-menuitem-with-2-icons#14035</guid>
  </item> 
  <item>
   <title><![CDATA[how to create menuitem with 2 ic&#111;ns : I&amp;#039;m having a problem with...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3910&amp;PID=14025&amp;title=how-to-create-menuitem-with-2-icons#14025</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=864">JamesH</a><br /><strong>Subject:</strong> 3910<br /><strong>Posted:</strong> 06 July 2006 at 6:57pm<br /><br />I'm having a problem with the doubleGripper as well.<DIV>&nbsp;</DIV><DIV>I have a CommandBarPopup pointer:</DIV><DIV>&nbsp;</DIV><DIV><EM>ICommandBarPopupPtr popup;</EM></DIV><DIV>&nbsp;</DIV><DIV>And I add tools to it using:</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;<EM>ctrl = popup-&gt;CommandBar-&gt;Controls-&gt;Add( XtremeCommandBars::xtpControlButton, (long)ts-&gt;ctrlID, A2W( (char*)(ts-&gt;caption) ), vtMissing, VARIANT_TRUE);<BR></EM></DIV><DIV>I set the control to be checked:</DIV><DIV>&nbsp;&nbsp;&nbsp;<EM>ctrl-&gt;Checked = ts-&gt;depressed;</EM>&nbsp;&nbsp;&nbsp;<BR></DIV><DIV>And then I set the double gripper so those tools should have an icon and a check mark:</DIV><DIV>&nbsp;</DIV><DIV><EM>&nbsp;&nbsp;&nbsp;&nbsp;popup-&gt;CommandBar-&gt;DoubleGripper = VARIANT_TRUE;</EM>&nbsp;&nbsp;&nbsp;&nbsp;<BR></DIV><DIV>The tools show up in the correct checked or unchecked state but just with the single gripper (ie. no check mark, just a highlighted icon).</DIV><DIV>&nbsp;</DIV><DIV>Any ideas?</DIV>]]>
   </description>
   <pubDate>Thu, 06 Jul 2006 18:57:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3910&amp;PID=14025&amp;title=how-to-create-menuitem-with-2-icons#14025</guid>
  </item> 
  <item>
   <title><![CDATA[how to create menuitem with 2 ic&#111;ns : Hello Oleg,  I need to set the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3910&amp;PID=12654&amp;title=how-to-create-menuitem-with-2-icons#12654</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1726">Raj.krishnan</a><br /><strong>Subject:</strong> 3910<br /><strong>Posted:</strong> 04 May 2006 at 7:16am<br /><br /><P>Hello Oleg,</P><P>&nbsp;&nbsp; I need to set the same two icons for a right click menu . can you help me to solve the issue how to add two icons in right click menu.</P>]]>
   </description>
   <pubDate>Thu, 04 May 2006 07:16:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3910&amp;PID=12654&amp;title=how-to-create-menuitem-with-2-icons#12654</guid>
  </item> 
  <item>
   <title><![CDATA[how to create menuitem with 2 ic&#111;ns : Hello, Create with wizard new...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3910&amp;PID=12125&amp;title=how-to-create-menuitem-with-2-icons#12125</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 3910<br /><strong>Posted:</strong> 11 April 2006 at 7:37am<br /><br /><P>Hello,</P><P>Create with wizard new application, recreate this issue and attach here. I will show what you must to change. </P><P>Can't understand why it is so difficult for you. All you need is specify index of your popup control.</P>]]>
   </description>
   <pubDate>Tue, 11 Apr 2006 07:37:55 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3910&amp;PID=12125&amp;title=how-to-create-menuitem-with-2-icons#12125</guid>
  </item> 
  <item>
   <title><![CDATA[how to create menuitem with 2 ic&#111;ns : Hello Oleg, Can you check me...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3910&amp;PID=12122&amp;title=how-to-create-menuitem-with-2-icons#12122</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1726">Raj.krishnan</a><br /><strong>Subject:</strong> 3910<br /><strong>Posted:</strong> 11 April 2006 at 7:06am<br /><br /><P>Hello Oleg,</P><P>Can you check me and tell what is the issue please!! </P>]]>
   </description>
   <pubDate>Tue, 11 Apr 2006 07:06:19 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3910&amp;PID=12122&amp;title=how-to-create-menuitem-with-2-icons#12122</guid>
  </item> 
  <item>
   <title><![CDATA[how to create menuitem with 2 ic&#111;ns : Hello Oleg , Thanks for the reply...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3910&amp;PID=12057&amp;title=how-to-create-menuitem-with-2-icons#12057</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1726">Raj.krishnan</a><br /><strong>Subject:</strong> 3910<br /><strong>Posted:</strong> 08 April 2006 at 7:38am<br /><br /><P>Hello Oleg ,</P><P>Thanks for the reply . Thing is its crashing because </P><P>m_pControls-&gt;GetCount() </P><P>is less than the nIndex i dont know how to set the m_pControls Count.Give me a solution on this why it is less than my index . I had already sent you the code.</P><P>CXTPControl* CXTPCommandBar::GetControl(int nIndex) const<BR>{<BR>&nbsp;//Ensure the index falls within the correct range.<BR>&nbsp;if ((nIndex &gt;= 0) &amp;&amp; (nIndex &lt; m_pControls-&gt;GetCount()))<BR>&nbsp;{<BR>&nbsp;&nbsp;return m_pControls-&gt;GetAt(nIndex);<BR>&nbsp;}<BR>&nbsp;return NULL;<BR>}</P>]]>
   </description>
   <pubDate>Sat, 08 Apr 2006 07:38:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3910&amp;PID=12057&amp;title=how-to-create-menuitem-with-2-icons#12057</guid>
  </item> 
  <item>
   <title><![CDATA[how to create menuitem with 2 ic&#111;ns : The line: pPopupBar-&amp;gt;GetControl(10)  So...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3910&amp;PID=12033&amp;title=how-to-create-menuitem-with-2-icons#12033</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 3910<br /><strong>Posted:</strong> 07 April 2006 at 9:45am<br /><br /><P>The line:</P><P>pPopupBar-&gt;GetControl(10)</P><P>&nbsp;</P><P>So Are you sure you need index 10? Double check it.</P><P>if it returns NULL it mean index out of range.</P>]]>
   </description>
   <pubDate>Fri, 07 Apr 2006 09:45:55 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3910&amp;PID=12033&amp;title=how-to-create-menuitem-with-2-icons#12033</guid>
  </item> 
  <item>
   <title><![CDATA[how to create menuitem with 2 ic&#111;ns : Hi Oleg, I had already sent the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3910&amp;PID=12027&amp;title=how-to-create-menuitem-with-2-icons#12027</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1726">Raj.krishnan</a><br /><strong>Subject:</strong> 3910<br /><strong>Posted:</strong> 06 April 2006 at 11:47pm<br /><br /><P>Hi Oleg,</P><P>I had already sent the code for the following . Please help me to solve this issue . Its a very important one in our module .</P>]]>
   </description>
   <pubDate>Thu, 06 Apr 2006 23:47:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3910&amp;PID=12027&amp;title=how-to-create-menuitem-with-2-icons#12027</guid>
  </item> 
  <item>
   <title><![CDATA[how to create menuitem with 2 ic&#111;ns : Hello Oleg, m_wndLayer2ToolBa...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3910&amp;PID=11993&amp;title=how-to-create-menuitem-with-2-icons#11993</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1726">Raj.krishnan</a><br /><strong>Subject:</strong> 3910<br /><strong>Posted:</strong> 06 April 2006 at 12:40am<br /><br /><P>Hello Oleg,</P><P>m_wndLayer2ToolBar.CreateToolBar(WS_VISIBLE|WS_CHILD|CBRS_TO OLTIPS, this, AFX_IDW_TOOLBAR + 3);<BR>&nbsp;m_wndLayer2ToolBar.LoadToolBar(IDR_BUTTONS_TOOLBAR);<BR>&nbsp;</P><P>&nbsp;pCtrl = m_wndLayer2ToolBar.GetControls()-&gt;FindControl(ID_BUDDYLIS T_BTN);<BR>&nbsp;pCtrl-&gt;SetStyle(xtpButtonIcon);<BR>&nbsp;pBtnCtrl = (CXTPControlPopup*)m_wndLayer2ToolBar.GetControls()-&gt;SetC ontrolType(pCtrl, xtpControlPopup);</P><P>&nbsp;CMenu&nbsp;cMenu;<BR>&nbsp;cMenu.LoadMenu( IDR_BUDDYBTN_MENU );<BR>&nbsp;pSubMenu = cMenu.GetSubMenu(0);<BR>&nbsp;<BR>&nbsp;if( pSubMenu &amp;&amp; pBtnCtrl )<BR>&nbsp;{<BR>&nbsp;&nbsp;pBtnCtrl-&gt;SetCommandBar( pSubMenu );<BR>&nbsp;}<BR>&nbsp;<BR>&nbsp;pCtrl = m_wndLayer2ToolBar.GetControls()-&gt;FindControl( ID_GOACTION_BUTTON );<BR>&nbsp;pCtrl-&gt;SetStyle(xtpButtonIcon);<BR>&nbsp;pBtnCtrl = (CXTPControlPopup*)m_wndLayer2ToolBar.GetControls()-&gt;SetC ontrolType(pCtrl, xtpControlSplitButtonPopup );</P><P>&nbsp;CMenu&nbsp;&nbsp;cSubMenu;<BR>&nbsp;cSubMenu.LoadMenu( IDR_GO_OPTIONSMENU );<BR>&nbsp;pSubMenu = cSubMenu.GetSubMenu(0);</P><P>&nbsp;if( pSubMenu &amp;&amp; pBtnCtrl )<BR>&nbsp;{<BR>&nbsp;&nbsp;// Rajkumar Apr 3 2006 <BR>&nbsp;&nbsp;pBtnCtrl-&gt;SetCommandBar( pSubMenu );<BR>&nbsp;<BR>&nbsp;&nbsp;pCommandBar = pBtnCtrl-&gt;GetCommandBar();<BR>&nbsp;&nbsp;if (pCommandBar)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;CXTPPopupBar *pPopupBar = (CXTPPopupBar*)pCommandBar;<BR>&nbsp;&nbsp;&nbsp;if (pPopupBar)<BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;pPopupBar-&gt;SetDoubleGripper(TRUE) ;</P><P>&nbsp;&nbsp;&nbsp;&nbsp;CXTPpChildPopupBar *pChildPopupBar = (CXTPPopupBar*)pPopupBar-&gt;GetControl(10)-&gt;GetCommandBa r();<BR>&nbsp;&nbsp;&nbsp;&nbsp;if (pChildPopupBar ) <BR>&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pPopupBarChild-&gt;SetDoubleGripper(TRUE); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;}<BR></P><P>When i tried to get the&nbsp;the&nbsp;ppopupBarChild it is crashing while i debugged this is where it is crashing </P><P>CXTPControl* CXTPCommandBar::GetControl(int nIndex) const<BR>{<BR>&nbsp;//Ensure the index falls within the correct range.<BR>&nbsp;if ((nIndex &gt;= 0) &amp;&amp; (nIndex &lt; m_pControls-&gt;GetCount()))<BR>&nbsp;{<BR>&nbsp;&nbsp;return m_pControls-&gt;GetAt(nIndex);<BR>&nbsp;}<BR>&nbsp;return NULL;<BR>}&nbsp;</P><P>this function is returning NULL&nbsp; that is why it cant get the pointer</P><P>my menubar is the same what i had sent earlier with menu iitem ( copy,New etc... ) in the previous mail</P><P>So please help on this issue i dont what i have to do give me a sample also how to do it&nbsp;in the ame manner.</P>]]>
   </description>
   <pubDate>Thu, 06 Apr 2006 00:40:12 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3910&amp;PID=11993&amp;title=how-to-create-menuitem-with-2-icons#11993</guid>
  </item> 
 </channel>
</rss>