Changing the Header height in CListCtrl
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
Hi guys, I was wondering if anyone was successful in changing the height of a header in CListCtrl without Subclassing. I tried this recommeded method, but did not work as it keeps adjusting the column width and not the height void CTestListCtrl::SetHeadersHeight( int Height ) { HDITEM pHeaderItem; CHeaderCtrl* m_npheader = GetHeaderCtrl(); pHeaderItem.mask = HDI_TEXT | HDI_HEIGHT | HDI_FORMAT | HDI_ORDER; if( m_npheader->GetItem(0, &pHeaderItem) == FALSE ) return; pHeaderItem.cxy = Height; m_npheader->SetItem(0, &pHeaderItem); }