<?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 reach the DrawItem() in CXTPControlComboBox</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : How to reach the DrawItem() in CXTPControlComboBox]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 07:26:17 +0000</pubDate>
  <lastBuildDate>Thu, 20 Mar 2008 21:13:07 +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=9905</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 reach the DrawItem() in CXTPControlComboBox : Thank you so much oleg,  it help...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9905&amp;PID=32431&amp;title=how-to-reach-the-drawitem-in-cxtpcontrolcombobox#32431</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3270">hikaroute</a><br /><strong>Subject:</strong> 9905<br /><strong>Posted:</strong> 20 March 2008 at 9:13pm<br /><br />Thank you so much oleg,<DIV>&nbsp;&nbsp;&nbsp;&nbsp; it help me so much.</DIV>]]>
   </description>
   <pubDate>Thu, 20 Mar 2008 21:13:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9905&amp;PID=32431&amp;title=how-to-reach-the-drawitem-in-cxtpcontrolcombobox#32431</guid>
  </item> 
  <item>
   <title><![CDATA[How to reach the DrawItem() in CXTPControlComboBox : Hi, Its something in your sources....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9905&amp;PID=32397&amp;title=how-to-reach-the-drawitem-in-cxtpcontrolcombobox#32397</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 9905<br /><strong>Posted:</strong> 19 March 2008 at 7:55am<br /><br />Hi,<DIV>Its something in your sources. Check you set right text color.</DIV>]]>
   </description>
   <pubDate>Wed, 19 Mar 2008 07:55:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9905&amp;PID=32397&amp;title=how-to-reach-the-drawitem-in-cxtpcontrolcombobox#32397</guid>
  </item> 
  <item>
   <title><![CDATA[How to reach the DrawItem() in CXTPControlComboBox : Thank you oleg,    now I can...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9905&amp;PID=32374&amp;title=how-to-reach-the-drawitem-in-cxtpcontrolcombobox#32374</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3270">hikaroute</a><br /><strong>Subject:</strong> 9905<br /><strong>Posted:</strong> 18 March 2008 at 10:53am<br /><br /><P>Thank you oleg,</P><DIV></DIV><img src="http://forum.codejock.com/uploads/20080318_105200_combobox_proble.png" border="0"> <DIV>&nbsp;</DIV><DIV>now I can redraw my item in combobox.</DIV><DIV>But I have the new problem of my new combobox, it's the item detail lost.</DIV><DIV>&nbsp;</DIV><DIV>That you can see in my image, each column have images and it's font still have the different font color too. (in the future for the font type)</DIV><DIV>&nbsp;</DIV><DIV>But when I click the other column to change the selected. They can show the default font format with no have the image in the current selected.</DIV><DIV>&nbsp;</DIV><DIV>How can I fix this problem? Because I tested with CComboBox is OK.&nbsp; <strong><FONT color=#000099>Or you can check my source code if you want.</FONT></strong></DIV><DIV>&nbsp;</DIV><DIV>Thank you again.</DIV>]]>
   </description>
   <pubDate>Tue, 18 Mar 2008 10:53:14 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9905&amp;PID=32374&amp;title=how-to-reach-the-drawitem-in-cxtpcontrolcombobox#32374</guid>
  </item> 
  <item>
   <title><![CDATA[How to reach the DrawItem() in CXTPControlComboBox : Hi,  Check ToolkitPro\Samples\CommandBars\CustomThemes...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9905&amp;PID=32351&amp;title=how-to-reach-the-drawitem-in-cxtpcontrolcombobox#32351</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 9905<br /><strong>Posted:</strong> 18 March 2008 at 3:55am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>Check ToolkitPro\Samples\CommandBars\CustomThemes - exactly same code works for CControlComboBoxCustomDraw.</DIV>]]>
   </description>
   <pubDate>Tue, 18 Mar 2008 03:55:03 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9905&amp;PID=32351&amp;title=how-to-reach-the-drawitem-in-cxtpcontrolcombobox#32351</guid>
  </item> 
  <item>
   <title><![CDATA[How to reach the DrawItem() in CXTPControlComboBox : To oleg, mgampi or others  I...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9905&amp;PID=32344&amp;title=how-to-reach-the-drawitem-in-cxtpcontrolcombobox#32344</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3270">hikaroute</a><br /><strong>Subject:</strong> 9905<br /><strong>Posted:</strong> 17 March 2008 at 10:47pm<br /><br />To oleg, mgampi or others<DIV>&nbsp;</DIV><DIV>I use this function</DIV><DIV>&nbsp;</DIV><DIV>----------------------------------------------------------------</DIV><DIV><FONT color=#0000ff size=2>int</FONT><FONT size=2> CMainFrame::OnCreateControl(LPCREATECONTROLSTRUCT lpCreateControl)</DIV><DIV><DIV>{</DIV><DIV></FONT><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp;&nbsp; if</FONT><FONT size=2> ((lpCreateControl-&gt;nID == ID_COMBO_TEST)</FONT><FONT size=2>)</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp; {</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lpCreateControl-&gt;pControl = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CNewComboBox(GetCommandBars());</FONT></DIV><DIV><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reinterpret_cast</FONT><FONT size=2>&lt;CNewComboBox*&gt;(lpCreateControl-&gt;pControl)-&gt;ModifyListBoxStyle(</FONT><FONT color=#800000 size=2>0</FONT><FONT size=2>, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS);</FONT></DIV><DIV><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return</FONT><FONT size=2> TRUE;</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></DIV><DIV><FONT size=2>}</FONT></DIV><DIV><FONT size=2>----------------------------------------------------------------</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>But the function name <FONT color=#0000ff size=2>void</FONT><FONT size=2> CNewComboBox::DrawItem( LPDRAWITEMSTRUCT lpDrawItemStruct ); still can not use.</FONT></FONT></DIV><DIV><FONT size=2>Please tell me how to fix for run DrawItem() function.</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>Thank you.</DIV></FONT></DIV>]]>
   </description>
   <pubDate>Mon, 17 Mar 2008 22:47:03 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9905&amp;PID=32344&amp;title=how-to-reach-the-drawitem-in-cxtpcontrolcombobox#32344</guid>
  </item> 
  <item>
   <title><![CDATA[How to reach the DrawItem() in CXTPControlComboBox : Ah, I see!  I think, you have...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9905&amp;PID=32313&amp;title=how-to-reach-the-drawitem-in-cxtpcontrolcombobox#32313</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 9905<br /><strong>Posted:</strong> 17 March 2008 at 4:44am<br /><br />Ah, I see!<DIV>&nbsp;</DIV><DIV>I think, you have to reinterpret_cast&lt;&gt; lpCreatControl-&gt;pControl or DYNAMIC_DOWNCAST() to a CXTPControlComboBox like this:</DIV><DIV>&nbsp;</DIV><DIV>reinterpret_cast&lt;CXTPControlComboBox*&gt;(lpCreateControl-&gt;pControl)-&gt;ModifyListBoxStyle(...)</DIV>]]>
   </description>
   <pubDate>Mon, 17 Mar 2008 04:44:01 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9905&amp;PID=32313&amp;title=how-to-reach-the-drawitem-in-cxtpcontrolcombobox#32313</guid>
  </item> 
  <item>
   <title><![CDATA[How to reach the DrawItem() in CXTPControlComboBox : Thank you mgampi ,  But the thing...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9905&amp;PID=32312&amp;title=how-to-reach-the-drawitem-in-cxtpcontrolcombobox#32312</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3270">hikaroute</a><br /><strong>Subject:</strong> 9905<br /><strong>Posted:</strong> 17 March 2008 at 4:26am<br /><br />Thank you <a href="http://forum.codejock.com/member_profile.asp?PF=109&amp;FID=18" target="_blank"><strong><FONT color=#000000>mgampi</FONT></strong></A> , <DIV>But the thing I need to know is how to create &amp; manage the ModifyListBoxStyle in the OnCreateControl() function...</DIV><DIV><FONT color=#0000ff size=2></FONT>&nbsp;</DIV><DIV><FONT color=#0000ff size=2>int</FONT><FONT size=2> CMainFrame::OnCreateControl(LPCREATECONTROLSTRUCT lpCreateControl)</DIV><DIV><DIV>{</DIV><DIV></FONT><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp;&nbsp; if</FONT><FONT size=2> ((lpCreateControl-&gt;nID == ID_COMBO_TEST)</FONT><FONT size=2>)</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp; {</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lpCreateControl-&gt;pControl = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CXTPControlComboBox(GetCommandBars());</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lpCreateControl-&gt;pControl-&gt;<FONT color=#ff0000>ModifyListBoxStyle(0, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS);</FONT></FONT></DIV><DIV><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return</FONT><FONT size=2> TRUE;</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp; return FALSE;</FONT></DIV><DIV><FONT size=2>}</FONT></DIV><DIV><FONT size=2>&nbsp;</DIV></FONT></DIV>]]>
   </description>
   <pubDate>Mon, 17 Mar 2008 04:26:23 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9905&amp;PID=32312&amp;title=how-to-reach-the-drawitem-in-cxtpcontrolcombobox#32312</guid>
  </item> 
  <item>
   <title><![CDATA[How to reach the DrawItem() in CXTPControlComboBox : Hi,  I did it this way:  Derive...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9905&amp;PID=32311&amp;title=how-to-reach-the-drawitem-in-cxtpcontrolcombobox#32311</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 9905<br /><strong>Posted:</strong> 17 March 2008 at 4:09am<br /><br />Hi, <DIV>I did it this way:</DIV><DIV>&nbsp;</DIV><DIV>Derive not only from CXTPControlComboBox but also&nbsp;from CXTPControlComboBoxList:</DIV><DIV><FONT color=#0000ff size=2></FONT>&nbsp;</DIV><DIV><FONT color=#0000ff size=2>class</FONT><FONT size=2> CXRCurveComboBox;<BR></FONT><FONT color=#0000ff size=2>class</FONT><FONT size=2> CXRCurveComboBoxList : </FONT><FONT color=#0000ff size=2>public</FONT><FONT size=2> CXTPControlComboBoxList<BR>{</FONT></DIV><DIV><FONT size=2>DECLARE_XTP_COMMANDBAR(CXRCurveComboBoxList);</FONT></DIV><DIV><FONT size=2>DECLARE_MESSAGE_MAP()<BR></FONT></DIV><DIV><FONT color=#0000ff size=2>public</FONT><FONT size=2>:<BR></FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> DrawItem ( LPDRAWITEMSTRUCT lpDrawItemStruct );<BR></FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> DeleteItem(LPDELETEITEMSTRUCT lpDeleteItemStruct);<BR></FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> CreateListBox();<BR></FONT></DIV><DIV><FONT color=#0000ff size=2>friend</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>class</FONT><FONT size=2> CXRCurveComboBox;<BR>};<BR></FONT></DIV><DIV><FONT color=#0000ff size=2>class</FONT><FONT size=2> CXRCurveComboBox : </FONT><FONT color=#0000ff size=2>public</FONT><FONT size=2> CXTPControlComboBox</DIV><DIV><DIV>{<BR>DECLARE_XTP_CONTROL(CXRCurveComboBox)</DIV><DIV></FONT><FONT color=#0000ff size=2>public</FONT><FONT size=2>:</FONT></DIV><DIV><FONT size=2>CXRCurveComboBox();</FONT></DIV><DIV><FONT color=#0000ff size=2>virtual</FONT><FONT size=2> ~CXRCurveComboBox();</FONT></DIV><DIV><FONT color=#0000ff size=2>...</FONT></DIV><DIV><FONT color=#0000ff size=2>void</FONT><FONT size=2> DrawEditText(CDC* pDC, CRect rcText);</DIV></FONT><FONT color=#0000ff size=2><DIV>&nbsp;</DIV><DIV>protected</FONT><FONT size=2>:</FONT></DIV><DIV><FONT size=2>DECLARE_MESSAGE_MAP()</FONT></DIV><DIV><FONT size=2>};</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>/// Implementation (only important parts...)</FONT></DIV><DIV><FONT size=2>CXRCurveComboBox::CXRCurveComboBox()</DIV><DIV><DIV>{</DIV><DIV></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (m_pCommandBar)</FONT></DIV><DIV><FONT size=2>{</FONT></DIV><DIV><FONT size=2>m_pCommandBar-&gt;InternalRelease();</FONT></DIV><DIV><FONT size=2>}</FONT></DIV><DIV><FONT size=2>m_pCommandBar = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CXRCurveComboBoxList();</FONT></DIV><DIV><FONT size=2>((CXRCurveComboBoxList*)m_pCommandBar)-&gt;CreateListBox();</FONT></DIV><DIV><FONT size=2>}</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>CXRCurveComboBox::~CXRCurveComboBox()</FONT></DIV><DIV><FONT size=2>{</FONT></DIV><DIV><FONT size=2>}</DIV></FONT></DIV><DIV><FONT size=2><FONT color=#0000ff size=2></FONT></FONT>&nbsp;</DIV><DIV><FONT size=2><FONT color=#0000ff size=2>void</FONT><FONT size=2> CXRCurveComboBoxList::CreateListBox()</DIV><DIV><DIV>{ </DIV><DIV>ASSERT_VALID(_gMainInstance);<BR>VERIFY(CreateEx(WS_EX_STATICEDGE|WS_EX_TOOLWINDOW, _T("LISTBOX"), _T(""),WS_VSCROLL|WS_BORDER|WS_CLIPCHILDREN|LBS_SORT|</DIV><DIV>LBS_OWNERDRAWFIXED|LBS_HASSTRINGS|WS_POPUP|LBS_NOTIFY,<BR>CRect(0,0,0,0), _gMainInstance, 0)==TRUE);<BR><BR>SetWindowLongPtr(m_hWnd, GWLP_HWNDPARENT, 0 );<BR>ModifyStyle(WS_CHILD, WS_POPUP);<BR><BR></FONT><FONT color=#0000ff size=2>#ifdef</FONT><FONT size=2> _WIN64<BR>SetWindowLongPtr(m_hWnd, GWLP_HWNDPARENT, (LONG_PTR)_gMainInstance-&gt;GetSafeHwnd());<BR></FONT><FONT color=#0000ff size=2>#else<BR></FONT><FONT size=2>SetWindowLong(m_hWnd, GWLP_HWNDPARENT, (LONG)(LONG_PTR)_gMainInstance-&gt;GetSafeHwnd());<BR></FONT><FONT color=#0000ff size=2>#endif</FONT></DIV><DIV><FONT size=2>}</FONT></DIV><DIV>&nbsp;</DIV><DIV>_gMainInstance is in my case the global window handle (AfxGetMainWnd()). I do this this way because the classes are exported from a DLL.</DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>Hope this helps</DIV></FONT></DIV></FONT></DIV>]]>
   </description>
   <pubDate>Mon, 17 Mar 2008 04:09:31 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9905&amp;PID=32311&amp;title=how-to-reach-the-drawitem-in-cxtpcontrolcombobox#32311</guid>
  </item> 
  <item>
   <title><![CDATA[How to reach the DrawItem() in CXTPControlComboBox : And the code of new CXTPControlComboBox...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9905&amp;PID=32310&amp;title=how-to-reach-the-drawitem-in-cxtpcontrolcombobox#32310</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3270">hikaroute</a><br /><strong>Subject:</strong> 9905<br /><strong>Posted:</strong> 17 March 2008 at 4:00am<br /><br />And the code of new CXTPControlComboBox is<DIV>&nbsp;</DIV><DIV>-- header --</DIV><DIV><FONT color=#0000ff size=2>#ifndef</FONT><FONT size=2> __NEW_COMBOBOX_H__</FONT></DIV><DIV><FONT color=#0000ff size=2>#define</FONT><FONT size=2> __NEW_COMBOBOX_H__</FONT></DIV><DIV><DIV><FONT color=#0000ff size=2>class</FONT><FONT size=2> CNewComboBox : </FONT><FONT color=#0000ff size=2>public</FONT><FONT size=2> CXTPControlComboBox</FONT></DIV><DIV><FONT size=2>{</FONT></DIV><DIV><FONT color=#0000ff size=2>protected</FONT><FONT size=2>:</FONT></DIV><DIV><FONT color=#0000ff size=2>public</FONT><FONT size=2>:</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp; CNewComboBox(CXTPCommandBars* pCommandBars = NULL);</FONT></DIV><DIV><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp;&nbsp; virtual</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> DrawItem( LPDRAWITEMSTRUCT lpDrawItemStruct );</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp; DECLARE_XTP_CONTROL(CNewComboBox)</FONT></DIV><DIV><FONT size=2>};</FONT></DIV><DIV><FONT color=#0000ff size=2>#endif</FONT><FONT size=2> </FONT><FONT color=#008000 size=2>//__NEW_COMBOBOX_H__</FONT></DIV><DIV><FONT color=#008000 size=2></FONT>&nbsp;</DIV><DIV><FONT color=#008000 size=2><FONT color=#000000>-- body --</FONT></FONT></DIV><DIV><FONT color=#008000 size=2><FONT color=#0000ff size=2>#include</FONT><FONT color=#000000 size=2> </FONT><FONT color=#800080 size=2>"stdafx.h"</FONT></FONT></DIV><DIV><FONT color=#008000 size=2><FONT color=#0000ff size=2>#include</FONT><FONT color=#000000 size=2> </FONT><FONT color=#800080 size=2>"newcombobox.h"</FONT></FONT></DIV><DIV><FONT size=2><FONT color=#000000 size=2>IMPLEMENT_XTP_CONTROL(CNewComboBox, CXTPControlComboBox)</FONT></FONT></DIV><DIV><FONT size=2><FONT color=#000000 size=2>CNewComboBox::CNewComboBox(CXTPCommandBars* pCommandBars)</FONT></FONT></DIV><DIV><FONT size=2><FONT color=#000000 size=2>{</FONT></FONT></DIV><DIV><FONT size=2><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp; m_pCommandBar-&gt;SetCommandBars(pCommandBars);</FONT></FONT></DIV><DIV><FONT size=2><FONT color=#000000 size=2>}</FONT></FONT></DIV><DIV><FONT color=#008000 size=2><FONT color=#0000ff size=2>void</FONT><FONT size=2><FONT color=#000000> CNewComboBox::DrawItem( LPDRAWITEMSTRUCT </FONT></FONT></FONT><FONT color=#008000 size=2><FONT size=2><FONT color=#000000>pDrawItemStruct )</FONT></FONT></FONT></DIV><DIV><FONT size=2><FONT color=#000000 size=2>{</FONT></FONT></DIV><DIV><FONT size=2><FONT color=#000000><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp; AfxMessageBox(</FONT><FONT size=2>"Draw"</FONT><FONT size=2>);&nbsp;&nbsp;&nbsp;&nbsp; // Sample for testing</FONT></FONT></FONT></DIV><DIV><FONT size=2><FONT color=#000000 size=2>}</FONT></FONT></DIV><DIV><FONT color=#008000 size=2><FONT size=2>&nbsp;</DIV></FONT></FONT></DIV>]]>
   </description>
   <pubDate>Mon, 17 Mar 2008 04:00:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9905&amp;PID=32310&amp;title=how-to-reach-the-drawitem-in-cxtpcontrolcombobox#32310</guid>
  </item> 
  <item>
   <title><![CDATA[How to reach the DrawItem() in CXTPControlComboBox : Hi again oleg, Yes, for the standard...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9905&amp;PID=32308&amp;title=how-to-reach-the-drawitem-in-cxtpcontrolcombobox#32308</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3270">hikaroute</a><br /><strong>Subject:</strong> 9905<br /><strong>Posted:</strong> 17 March 2008 at 3:23am<br /><br /><P>Hi again oleg,</P><DIV>Yes, for the standard function that use LBS_OWNERDRAWFIXED, I think all&nbsp;should cleared(function works).&nbsp; But when I use it in the <FONT size=2>OnCreateControl(LPCREATECONTROLSTRUCT lpCreateControl) function.&nbsp; And the code inside should be</FONT></DIV><DIV><FONT color=#999999 size=2>...</FONT></DIV><DIV><FONT color=#0000ff size=2>if</FONT><FONT size=2> ((lpCreateControl-&gt;nID == ID_COMBO_ENP_LAYER)</FONT><FONT size=2>)</FONT></DIV><DIV><FONT size=2>{</FONT></DIV><DIV><FONT size=2>lpCreateControl-&gt;pControl = <FONT color=#0000ff>new</FONT> CXTPControlComboBox(GetCommandBars</FONT><FONT size=2>));</FONT></DIV><DIV><FONT size=2>lpCreateControl-&gt;pControl<FONT color=#ff0000><strong>-&gt;ModifyListBoxStyle(0, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS);</strong></FONT></FONT></DIV><DIV><FONT color=#0000ff size=2>return</FONT><FONT size=2> TRUE;</FONT></DIV><DIV><FONT size=2>}</FONT></DIV><DIV><FONT color=#666666 size=2>...</FONT></DIV><DIV><FONT size=2>But I cannot use the modifyListBoxStyle like this, how to fixed this problem.</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>Thank you again.</DIV></FONT>]]>
   </description>
   <pubDate>Mon, 17 Mar 2008 03:23:28 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9905&amp;PID=32308&amp;title=how-to-reach-the-drawitem-in-cxtpcontrolcombobox#32308</guid>
  </item> 
 </channel>
</rss>