MFC change ListCtrl title height

1. Add the ListCtrl control in the dialog interface and declare that the control is m_ListSpe;

2. The initial actions of the ListCtrl control are as follows

LOGFONT logfont;//It is better to make class members, global variables, static members  
    CFont *pfont1 = m_ListSpe.GetFont();  
    pfont1->GetLogFont( &logfont );  
    logfont.lfHeight = logfont.lfHeight * 2; //You can modify here The height ratio of the
    font logfont.lfWidth = logfont.lfWidth * 2; //The width ratio of the font can be modified here
    static CFont font1;  
    font1.CreatePointFont(100,"Arial",NULL);
    m_ListSpe.SetFont(&font1);  
    font1.Detach ();

Guess you like

Origin blog.csdn.net/Hat_man_/article/details/109714822
Recommended