Getting the number of columns in the report view

Thursday Aug 6th 1998 by Zafir Anjum
Share:

Getting the number of columns in the report view


To get the number of columns in the list view control, we first get a pointer to the header control and then use the header control to query the number of columns it has.
CHeaderCtrl* pHeader = (CHeaderCtrl*) m_listctrl.GetDlgItem(0);
int nColumnCount = pHeader->GetItemCount();
This works even when the listview control has the LVS_NOCOLUMNHEADER style. It also works if the control is not in the report view.
 

Share:
Home
Mobile Site | Full Site
Copyright 2017 © QuinStreet Inc. All Rights Reserved