|
-
June 2nd, 1999, 05:53 PM
#1
CListCtrl
I have multi CListCtrls in a CScrollView. I need to change the font size and get the ctrls to display in the new font. Details please, I am very confused at this point.
-
June 2nd, 1999, 08:10 PM
#2
Re: CListCtrl
just call SetFont() on 'em. you'll have to create the font's first and keep them hanging around while the list controls exist. here's an example...
// m_font1, m_font2 are CFont member var's in
// your CFormView class.
//
// Put this code in your OnInitialUpdate function.
// *Watch out though!* If you use default MFC
// doc-view stuff then calling File->Open will
// result in this code executing again and
// you'll get an assert because the object
// already exists.
//
// 10 point Courier New
m_font1.CreatePointFont(100, _T("Courier New"));
m_ListCtrl1.SetFont(&m_font1, true);
// 12 point Arial
m_font2.CreatePointFont(120, _T("Arial"));
m_ListCtrl2.SetFont(&m_font2, true);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|