![]() |
How To Set Font int CXTListCtrl |
Post Reply
|
| Author | |
njyjm
Newbie
Joined: 18 July 2005 Status: Offline Points: 1 |
Post Options
Thanks(0)
Quote Reply
Topic: How To Set Font int CXTListCtrlPosted: 18 July 2005 at 10:29pm |
|
Like Vc6.0, We want to output some messages in OutputPane, it works well, but how to set the font of the ListCtrl, the following set Font segment in OnCreate(...) did not work. Please give us some help ! // CompileOutputPane.h ... public: ... }
LOGFONT logFont; ... void CCompileOutputPane::AppendCompileInfoLine(CString strInfo, DWORD dwItemData) //Set Line Color if (dwItemData) pListCtrl->SendMessage(WM_VSCROLL, SB_BOTTOM); } |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 19 July 2005 at 7:49am |
|
add pListCtrl->SetAutoFont(FALSE);
before set font. |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
jlee
Newbie
Joined: 06 December 2004 Status: Offline Points: 6 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 August 2005 at 11:39am |
|
Hi Oleg, 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: m_userList.GetFont()->GetLogFont(&logFont); logFont.lfHeight = -15; pFont = new CFont;pFont->CreateFontIndirect(&logFont); HWND hWndHeader = m_userList.GetDlgItem(0)->GetSafeHwnd(); m_header.SubclassWindow(hWndHeader); m_header.SetFont(pFont); // enable auto sizing. m_header.EnableAutoSize(TRUE); m_header.ResizeColumnsToFit(); m_header.SetTheme(new CXTHeaderThemeOffice2003()); ...
Thanks alot, JLee |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |