<?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 Set Font int CXTListCtrl</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : How To Set Font int CXTListCtrl]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 22 Apr 2026 01:06:19 +0000</pubDate>
  <lastBuildDate>Tue, 23 Aug 2005 11:39:13 +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=2592</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 Set Font int CXTListCtrl : Hi Oleg, I was trying to do a...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2592&amp;PID=8302&amp;title=how-to-set-font-int-cxtlistctrl#8302</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=870">jlee</a><br /><strong>Subject:</strong> 2592<br /><strong>Posted:</strong> 23 August 2005 at 11:39am<br /><br /><P>Hi Oleg,</P><P>I was trying to do a similar thing to set the font for the header using the 'SetFont' function, but it didn't seem to work. Could you please give me some help here? My code is something like this:</P><FONT size=3><P><FONT size=1>m_userList.GetFont()-&gt;GetLogFont(&amp;logFont);</FONT></P><P><FONT size=1>logFont.lfHeight = -15;</FONT></P><P></FONT><FONT size=1>pFont = <FONT color=#0000ff>new</FONT> CFont;</FONT></P><P><FONT size=1>pFont-&gt;CreateFontIndirect(&amp;logFont);</FONT></P><P><FONT size=1></FONT></P><P><FONT size=1>HWND hWndHeader = m_userList.GetDlgItem(0)-&gt;GetSafeHwnd();</FONT></P><P><FONT size=1>m_header.SubclassWindow(hWndHeader);</FONT></P><P><FONT size=1>m_header.SetFont(pFont);</FONT></P><FONT color=#008000 size=1><P>// enable auto sizing.</P></FONT><P><FONT size=1>m_header.EnableAutoSize(TRUE);</FONT></P><P><FONT size=1>m_header.ResizeColumnsToFit();</FONT></P><P><FONT size=1>m_header.SetTheme(<FONT color=#0000ff>new</FONT> CXTHeaderThemeOffice2003());</FONT></P><P><FONT size=2>... </FONT></P><P><FONT size=2></FONT>&nbsp;</P><P><FONT size=2>Thanks alot,</FONT></P><P><FONT size=2>JLee</FONT></P>]]>
   </description>
   <pubDate>Tue, 23 Aug 2005 11:39:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2592&amp;PID=8302&amp;title=how-to-set-font-int-cxtlistctrl#8302</guid>
  </item> 
  <item>
   <title><![CDATA[How To Set Font int CXTListCtrl :  add pListCtrl-&amp;gt;SetAutoFont(FALSE);  before...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2592&amp;PID=7736&amp;title=how-to-set-font-int-cxtlistctrl#7736</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 2592<br /><strong>Posted:</strong> 19 July 2005 at 7:49am<br /><br /><FONT size=2><P>add</P><P>pListCtrl-&gt;SetAutoFont(FALSE);</P><P>&nbsp;</P><P>before set font.</P></FONT>]]>
   </description>
   <pubDate>Tue, 19 Jul 2005 07:49:56 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2592&amp;PID=7736&amp;title=how-to-set-font-int-cxtlistctrl#7736</guid>
  </item> 
  <item>
   <title><![CDATA[How To Set Font int CXTListCtrl : Like Vc6.0, We want to output...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2592&amp;PID=7729&amp;title=how-to-set-font-int-cxtlistctrl#7729</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1326">njyjm</a><br /><strong>Subject:</strong> 2592<br /><strong>Posted:</strong> 18 July 2005 at 10:29pm<br /><br /><P>&nbsp;&nbsp; Like Vc6.0, We want to output some messages in OutputPane, it works well,&nbsp;but&nbsp;how to&nbsp;set the font of the ListCtrl, the following set Font segment in OnCreate(...) did not work. Please give us some help !</P><P>// CompileOutputPane.h<BR>class CCompileOutputPane : public CWnd<BR>{</P><P>...</P><P>public:<BR>&nbsp;CDockPaneWnd&lt;CXTListCtrl&gt; m_lcCompileOutput;</P><P>...</P><P>}</P><P><BR>// CompileOutputPane.cpp<BR>int CCompileOutputPane::OnCreate(LPCREATESTRUCT lpCreateStruct)<BR>{<BR>...</P><P>&nbsp; LOGFONT logFont;<BR>&nbsp; CFont&nbsp;&nbsp; *pFont;<BR>&nbsp; <BR>&nbsp; CXTListCtrl *pListCtrl = &amp;m_lcCompileOutput;<BR>&nbsp; pListCtrl-&gt;GetFont()-&gt;GetLogFont(&amp;logFont);<BR>&nbsp; _tcscpy(logFont.lfFaceName, _T("Verdana"));&nbsp; pFont = new CFont;<BR>&nbsp; pFont-&gt;CreateFontIndirect(&amp;logFont);<BR>&nbsp; pListCtrl-&gt;SetFont(pFont);</P><P>...<BR>}</P><P>void CCompileOutputPane::AppendCompileInfoLine(CString strInfo, DWORD dwItemData)<BR>{<BR>&nbsp;CXTListCtrl *pListCtrl = &amp;m_lcCompileOutput;<BR>&nbsp;int nCount = pListCtrl-&gt;GetItemCount();<BR>&nbsp;int nIndex = pListCtrl-&gt;InsertItem(nCount, strInfo, GetImageIndex(dwItemData));<BR>&nbsp;pListCtrl-&gt;SetItemData(nIndex, dwItemData);</P><P>&nbsp;//Set Line Color</P><P>&nbsp;if (dwItemData)<BR>&nbsp;{<BR>&nbsp; const COLORREF COMPILE_ERROR_TEXT_COLOR&nbsp;&nbsp; = RGB(255, 0, 0);&nbsp;<BR>&nbsp; const COLORREF COMPILE_ERROR_BACKGROUND_COLOR = pListCtrl-&gt;GetListBackColor();//RGB(198, 198, 198);&nbsp;<BR>&nbsp; pListCtrl-&gt;SetRowColor(nIndex, <BR>&nbsp;&nbsp; COMPILE_ERROR_TEXT_COLOR, <BR>&nbsp;&nbsp; COMPILE_ERROR_BACKGROUND_COLOR);<BR>&nbsp;}</P><P>&nbsp;pListCtrl-&gt;SendMessage(WM_VSCROLL, SB_BOTTOM);</P><P>}<BR></P>]]>
   </description>
   <pubDate>Mon, 18 Jul 2005 22:29:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2592&amp;PID=7729&amp;title=how-to-set-font-int-cxtlistctrl#7729</guid>
  </item> 
 </channel>
</rss>