<?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 : to insert image or icon to CXTPControl;</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : to insert image or icon to CXTPControl;]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 22 Apr 2026 16:17:39 +0000</pubDate>
  <lastBuildDate>Wed, 01 Oct 2008 20:00:30 +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=12307</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[to insert image or icon to CXTPControl; :  my class don&amp;#039;t have CXTPFrameWnd.class...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12307&amp;PID=41572&amp;title=to-insert-image-or-icon-to-cxtpcontrol#41572</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4549">copycdx2</a><br /><strong>Subject:</strong> 12307<br /><strong>Posted:</strong> 01 October 2008 at 8:00pm<br /><br /><br>&nbsp;my class don't have CXTPFrameWnd.<br><br>&nbsp;class Cg3OutlookBarContainer : public CTaskPanelBase.<br><br>&nbsp;so, i created CXTPPopupBar by CreateObject();<br><br>&nbsp;how get commandbar point ?<br><br>&nbsp;m_pPopupBar = (CXTPPopupBar*)CXTPPopupToolBar::CreateObject();<br><br><br>-----------------------------------------------------------------------------------------------<br><br>Cg3OutlookBarContainer::~Cg3OutlookBarContainer()<br>{<br>&nbsp;&nbsp;&nbsp; if( m_pPopupBar )<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; AFX_MANAGE_STATE(AfxGetStaticModuleState());<br><font color="#ff0000"><br>&nbsp;&nbsp; //&nbsp; when create code.<br></font>&nbsp;&nbsp; //&nbsp; insert below code and kill.&nbsp; not insert below code and not kill.<br>&nbsp;&nbsp; // pCtrl-&gt;GetImageManager()-&gt;SetIcons(IDR_TOOLBAR1);<br><br><font color="#ff0000">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m_pPopupBar-&gt;InternalRelease()<font color="#ff0000">;&nbsp;&nbsp;&nbsp; &lt;= err</font></font><font color="#ff0000">or;</font><br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m_pPopupBar = NULL;<br>&nbsp;&nbsp;&nbsp; }<br>}<br><br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if( m_pPopupBar == NULL )<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPControl* pCtrl = NULL;<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; HICON hIcon = ::LoadIcon( AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_ANALYSIS01) );<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPControlButton* pButton01 = new CXTPControlButton();<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pButton01-&gt;SetCaption(_T("hello"));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pButton01-&gt;SetStyle(xtpButtonIcon);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pButton01-&gt;SetHeight( 48 );<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pButton01-&gt;SetWidth( 48 );<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //pButton01-&gt;SetCustomIcon(hIcon);<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m_pPopupBar = (CXTPPopupBar*)CXTPPopupToolBar::CreateObject();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m_pPopupBar-&gt;SetOwner(this);<br>&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m_pPopupBar-&gt;SetTearOffPopup(_T("Text Color"), IDR_TOOLBAR1, 0);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m_pPopupBar-&gt;GetControls()-&gt;Add( pButton01);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pCtrl = m_pPopupBar-&gt;GetControls()-&gt;Add( xtpControlButton, ID_FILE_TEST01 );<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pCtrl-&gt;SetCaption(_T("555"));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pCtrl-&gt;SetHeight(48);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pCtrl-&gt;SetWidth(48);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pCtrl-&gt;GetImageManager()-&gt;SetIcons(IDR_TOOLBAR1);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pCtrl-&gt;SetIconId( ID_BUTTON40007 );<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if( m_pPopupBar )<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CRect rc;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; this-&gt;GetWindowRect(&amp;rc);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; this-&gt;ScreenToClient(&amp;rc);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; POINT pp;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; GetCursorPos(&amp;pp);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m_pPopupBar-&gt;Popup( pp.x-100, pp.y, NULL );<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>]]>
   </description>
   <pubDate>Wed, 01 Oct 2008 20:00:30 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12307&amp;PID=41572&amp;title=to-insert-image-or-icon-to-cxtpcontrol#41572</guid>
  </item> 
  <item>
   <title><![CDATA[to insert image or icon to CXTPControl; : Hi, You need add image to image...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12307&amp;PID=41562&amp;title=to-insert-image-or-icon-to-cxtpcontrol#41562</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 12307<br /><strong>Posted:</strong> 01 October 2008 at 2:07pm<br /><br />Hi,<DIV>You need add image to image manager for ID_FILE_TEST01&nbsp;id:</DIV><DIV>&nbsp;</DIV><DIV>pCommandBars-&gt;GetImageManager()-&gt;SetIcons(,,);</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 01 Oct 2008 14:07:58 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12307&amp;PID=41562&amp;title=to-insert-image-or-icon-to-cxtpcontrol#41562</guid>
  </item> 
  <item>
   <title><![CDATA[to insert image or icon to CXTPControl; :  I would like to insert icon...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12307&amp;PID=41554&amp;title=to-insert-image-or-icon-to-cxtpcontrol#41554</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4549">copycdx2</a><br /><strong>Subject:</strong> 12307<br /><strong>Posted:</strong> 01 October 2008 at 6:21am<br /><br /><br>I would like to insert icon to CXTPControl.<br><br>CXTPControl* pCtrl = m_pPopupBar-&gt;GetControls()-&gt;Add( xtpControlButton, ID_FILE_TEST01 );<br><br><br>and, I hope to catch message of button click.<br><br><br>]]>
   </description>
   <pubDate>Wed, 01 Oct 2008 06:21:02 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12307&amp;PID=41554&amp;title=to-insert-image-or-icon-to-cxtpcontrol#41554</guid>
  </item> 
 </channel>
</rss>