<?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 : Markup in CXTPControlComboBox</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Markup in CXTPControlComboBox]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 13 Jun 2026 11:57:58 +0000</pubDate>
  <lastBuildDate>Fri, 28 May 2010 04:38:21 +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=16594</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[Markup in CXTPControlComboBox : Oleg gave me some basic code that...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16594&amp;PID=58710&amp;title=markup-in-cxtpcontrolcombobox#58710</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2432">scottp</a><br /><strong>Subject:</strong> 16594<br /><strong>Posted:</strong> 28 May 2010 at 4:38am<br /><br /><p><a href="file:///c:%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" target="_blank">Oleg gave me some basic code that I customised to suit my purposes. It would be nice if this code sample made it into the samples.</a></p><p><br></p><p><a href="file:///c:%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" target="_blank"><br></a></p><div>class CControlComboBoxCustomDraw: publicCXTPControlComboBox, CXTPMarkupContext {</div><div> &nbsp;&nbsp;&nbsp;&nbsp; DECLARE_XTP_CONTROL(CControlComboBoxCustomDraw)</div><div>public:</div><div>&nbsp;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CControlComboBoxCustomDraw(CXTPCommandBars*pCommandBars = NULL)</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GetCommandBar()-&gt;SetCommandBars(pCommandBars);// Require to find Site.</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ModifyListBoxStyle(0,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS);</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</div><div>&nbsp;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; voidDrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); };</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div><div>//////////////////////////////////////////////////////////////////////////</div><div>// CControlComboBoxCustomDraw</div><div>&nbsp;</div><div>IMPLEMENT_XTP_CONTROL(CControlComboBoxCustomDraw,CXTPControlComboBox)</div><div>&nbsp;</div><div>void CControlComboBoxCustomDraw::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct ) {</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CStringstrText;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GetLBText(lpDrawItemStruct-&gt;itemID,strText);</div><div>&nbsp;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CRectrc(&amp;lpDrawItemStruct-&gt;rcItem);</div><div>&nbsp;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ASSERT(lpDrawItemStruct-&gt;CtlType== ODT_LISTBOX);</div><div>&nbsp;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDC* pDC =CDC::FromHandle(lpDrawItemStruct-&gt;hDC);</div><div>&nbsp;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BOOL bSelected= lpDrawItemStruct-&gt;itemState &amp; ODS_SELECTED;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CXTPPaintManager*pPaintManager = GetPaintManager();</div><div>&nbsp;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLORREFcrOldTextColor = pDC-&gt;SetTextColor(pPaintManager-&gt;GetRectangleTextColor(bSelected,FALSE, TRUE, FALSE, FALSE, xtpBarTypePopup, xtpBarPopup));</div><div>&nbsp;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (bSelected)</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pPaintManager-&gt;DrawRectangle(pDC,rc, TRUE, FALSE, TRUE, FALSE, FALSE, xtpBarTypePopup, xtpBarPopup);</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pDC-&gt;FillSolidRect(rc,pPaintManager-&gt;GetXtremeColor(COLOR_WINDOW));</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CStringstrMarkup = _T("&lt;TextBlock&gt;") + strText +_T("&lt;/TextBlock&gt;");</div><div>&nbsp;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CXTPMarkupUIElement*pElement = XTPMarkupParseText(this, strMarkup);</div><div>&nbsp;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (pElement)</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rc.left+= 3;</div><div>&nbsp;</div><div>XTPMarkupSetDefaultFont(this, 0, pDC-&gt;GetTextColor());</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XTPMarkupRenderElement(pElement,pDC-&gt;GetSafeHdc(), rc);</div><div>&nbsp;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XTPMarkupReleaseElement(pElement);</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div><div>}</div>]]>
   </description>
   <pubDate>Fri, 28 May 2010 04:38:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16594&amp;PID=58710&amp;title=markup-in-cxtpcontrolcombobox#58710</guid>
  </item> 
  <item>
   <title><![CDATA[Markup in CXTPControlComboBox : Hi;I&amp;#039;m also interrested in...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16594&amp;PID=58487&amp;title=markup-in-cxtpcontrolcombobox#58487</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 16594<br /><strong>Posted:</strong> 13 May 2010 at 4:14pm<br /><br />Hi;<br><br>I'm also interrested in using markup in plain CComboBox or CComboBoxEx.<br>How can this be achieved?<br>]]>
   </description>
   <pubDate>Thu, 13 May 2010 16:14:49 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16594&amp;PID=58487&amp;title=markup-in-cxtpcontrolcombobox#58487</guid>
  </item> 
  <item>
   <title><![CDATA[Markup in CXTPControlComboBox : Hi,is it possible to use (simple)...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16594&amp;PID=58091&amp;title=markup-in-cxtpcontrolcombobox#58091</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2432">scottp</a><br /><strong>Subject:</strong> 16594<br /><strong>Posted:</strong> 15 April 2010 at 8:19am<br /><br />Hi,<br><br>is it possible to use (simple) markup in a CXTPControlComboBox on a toolbar? <br><br>I just want to add an icon to each item and make some items italic<br><br>thanks,<br><br>scott<br>]]>
   </description>
   <pubDate>Thu, 15 Apr 2010 08:19:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16594&amp;PID=58091&amp;title=markup-in-cxtpcontrolcombobox#58091</guid>
  </item> 
 </channel>
</rss>