当前位置: 首页>>代码示例>>C++>>正文


C++ GetHeaderCtrl函数代码示例

本文整理汇总了C++中GetHeaderCtrl函数的典型用法代码示例。如果您正苦于以下问题:C++ GetHeaderCtrl函数的具体用法?C++ GetHeaderCtrl怎么用?C++ GetHeaderCtrl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了GetHeaderCtrl函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: auto_size

void CListCtrlEx::auto_size()
{
	if (!GetSafeHwnd() || !GetHeaderCtrl())
		return;
	for (int i = 0; i < GetHeaderCtrl()->GetItemCount(); i++)
		SetColumnWidth(i, LVSCW_AUTOSIZE_USEHEADER);
}
开发者ID:ChangerR,项目名称:xcc,代码行数:7,代码来源:ListCtrlEx.cpp

示例2: PreSubclassWindow

//控件绑定
void CHappyGoDlgT::PreSubclassWindow()
{
    if(GetHeaderCtrl())
		m_ListHeader.SubclassWindow(GetHeaderCtrl()->GetSafeHwnd());

	CListCtrl::PreSubclassWindow();
}
开发者ID:lincoln56,项目名称:robinerp,代码行数:8,代码来源:MyListCtrl.cpp

示例3: GetHeaderCtrl

BOOL CReportCtrl::SetHeaderImage(int nColumn, int nImageIndex, BOOL bLeftSide)
{
	if(GetHeaderCtrl()->GetImageList() == NULL)
	{
		CListCtrl :: GetHeaderCtrl()->SetImageList(GetImageList());
	}

	HDITEM	hi;
	:: memset(&hi, 0, sizeof(HDITEM));
	hi.mask = HDI_FORMAT;
	if(!GetHeaderCtrl()->GetItem(nColumn, &hi))
	{
		return(FALSE);
	}

	hi.mask |= HDI_IMAGE;
	hi.fmt |= HDF_IMAGE;

	if(!bLeftSide)
	{
		hi.fmt |= HDF_BITMAP_ON_RIGHT;						// draw the image on right side of text
	}

	hi.iImage = nImageIndex;
	return(CListCtrl :: GetHeaderCtrl()->SetItem(nColumn, &hi));
}
开发者ID:340211173,项目名称:hf-2011,代码行数:26,代码来源:Reportctrl.cpp

示例4: GetHeaderCtrl

void	CReportCtrl::DrawSortArrow(int Col, int Desc)
{
	if (Col < 0)
		return;
#if _MFC_VER < 0x0700	// if MFC 6
	HDITEM	hdi;
	hdi.mask = HDI_IMAGE | HDI_FORMAT;
	GetHeaderCtrl()->GetItem(Col, &hdi);
	if (Desc < 0) {	// erase
		hdi.mask = HDI_FORMAT;
		hdi.fmt &= ~HDF_IMAGE;
	} else {
		hdi.mask = HDI_FORMAT | HDI_IMAGE;
		hdi.fmt |= HDF_IMAGE | HDF_BITMAP_ON_RIGHT;
		hdi.iImage = Desc;
	}
#else	// .NET; use sort header format flags instead of image list
	HDITEM	hdi;
	hdi.mask = HDI_FORMAT;
	GetHeaderCtrl()->GetItem(Col, &hdi);
	hdi.mask = HDI_FORMAT;
	if (Desc < 0)	// erase
		hdi.fmt &= ~(HDF_SORTUP | HDF_SORTDOWN);
	else {
		if (Desc)
			hdi.fmt |= HDF_SORTDOWN;
		else
			hdi.fmt |= HDF_SORTUP;
	}
#endif
	GetHeaderCtrl()->SetItem(Col, &hdi);
}
开发者ID:victimofleisure,项目名称:WaveShop,代码行数:32,代码来源:ReportCtrl.cpp

示例5: VERIFY

void CSortingListControl::SortItems()
{
	VERIFY(CListCtrl::SortItems(&_CompareFunc, (DWORD_PTR)&m_sorting));

	HDITEM hditem;
	ZeroMemory(&hditem, sizeof(hditem));

	if (m_indicatedColumn != -1)
	{
		CString text;
		hditem.mask= HDI_TEXT;
		hditem.pszText= text.GetBuffer(256);
		hditem.cchTextMax= 256;
		GetHeaderCtrl()->GetItem(m_indicatedColumn, &hditem);
		text.ReleaseBuffer();
		text= text.Mid(2);
		hditem.pszText= (LPTSTR)(LPCTSTR)text;
		GetHeaderCtrl()->SetItem(m_indicatedColumn, &hditem);
	}

	CString text;
	hditem.mask= HDI_TEXT;
	hditem.pszText= text.GetBuffer(256);
	hditem.cchTextMax= 256;
	GetHeaderCtrl()->GetItem(m_sorting.column1, &hditem);
	text.ReleaseBuffer();
	text= (m_sorting.ascending1 ? _T("< ") : _T("> ")) + text;
	hditem.pszText= (LPTSTR)(LPCTSTR)text;
	GetHeaderCtrl()->SetItem(m_sorting.column1, &hditem);
	m_indicatedColumn= m_sorting.column1;
}
开发者ID:Meitinger,项目名称:windirstat,代码行数:31,代码来源:sortinglistcontrol.cpp

示例6: PreSubclassWindow

void CListCtrlEx::PreSubclassWindow()
{
	if(GetHeaderCtrl())
	{
		m_HeaderCtrl.SubclassWindow(GetHeaderCtrl()->m_hWnd);
	}
	CListCtrl::PreSubclassWindow();
}
开发者ID:niujingqian,项目名称:haocai,代码行数:8,代码来源:ListCtrlEx.cpp

示例7: OnShowWindow

void CHappyGoDlgT::OnShowWindow(BOOL bShow, UINT nStatus)
{
	CListCtrl::OnShowWindow(bShow, nStatus);

	// TODO: 在此处添加消息处理程序代码
	if(GetHeaderCtrl())
		m_ListHeader.SubclassWindow(GetHeaderCtrl()->m_hWnd);
}
开发者ID:lincoln56,项目名称:robinerp,代码行数:8,代码来源:MyListCtrl.cpp

示例8: PreSubclassWindow

void CFishListCtrl::PreSubclassWindow() 
{
	// TODO: Add your specialized code here and/or call the base class
	if(GetHeaderCtrl())
    {
        m_ctrlHeader.SubclassWindow(GetHeaderCtrl()->m_hWnd);
    }

	CListCtrl::PreSubclassWindow();
}
开发者ID:johnpark82,项目名称:fish_client,代码行数:10,代码来源:fishlistctrl.cpp

示例9: PreSubclassWindow

void CRTListCtrl::PreSubclassWindow()
{
	if(GetHeaderCtrl() != NULL)
	{
		m_HeaderCtrl.SubclassWindow(GetHeaderCtrl()->m_hWnd);
	}

	m_Container.Create(this);
	CListCtrl::PreSubclassWindow();
}
开发者ID:wjx0912,项目名称:rtskin,代码行数:10,代码来源:RTListCtrl.cpp

示例10: GetHeaderCtrl

void CListCtrlEx::ReadState(LPCSTR pszName)
{
	CHeaderCtrl* pHdr = GetHeaderCtrl ();
	int *piWidthes;

	Initialize ();

	LPBYTE pbW, pbI;
	UINT uSizeI, uSizeW;

	CString strIndexes = pszName, strWidthes = pszName;
	strIndexes += 'I';
	strWidthes += 'W';

	
	if (_App.GetProfileBinary (_T ("Settings\\View\\ListViews"), strIndexes, &pbI, &uSizeI) &&
		 _App.GetProfileBinary (_T ("Settings\\View\\ListViews"), strWidthes, &pbW, &uSizeW) && 
		 uSizeI == m_cTotalCols * sizeof (int) && uSizeW == m_cTotalCols * sizeof (int))
	{
		CopyMemory (m_aIndex, pbI, m_cTotalCols * sizeof (int));
		piWidthes = (int*) pbW;

		

		int i = m_cTotalCols - 1;
		for (i = m_cTotalCols - 1; i >= 0; i--)
			if (m_aIndex [i] == -1)	
				DeleteColumn (i);	

		int aOrder [LISTEX_MAXCOLUMNS];
		int iCorr = 0;
		
		
		for (i = 0; i < m_cTotalCols; i++)
		{
			if (m_aIndex [i] != -1)
				aOrder [m_aIndex [i]] = i - iCorr;
			else
				iCorr ++;
		}
		pHdr->SetOrderArray (GetHeaderCtrl ()->GetItemCount (), (int*) aOrder);

		RebuildAIndex ();

		for (i = 0; i < m_cTotalCols; i++)
		{
			if (piWidthes [i] > 0)
				SetColumnWidth (aOrder [m_aIndex [i]], piWidthes [i]);
		}

		delete [] pbW;
		delete [] pbI;
	}
}
开发者ID:HackLinux,项目名称:Free-Download-Manager-vs2010,代码行数:54,代码来源:ListCtrlEx.cpp

示例11: GetHeaderCtrl

void CFileBrowserListCtrl::DrawSortArrow(int Col, int Dir)
{
	HDITEM	hdi;
	hdi.mask = HDI_IMAGE | HDI_FORMAT;
	GetHeaderCtrl()->GetItem(Col, &hdi);
	if (Dir < 0) {	// erase arrow
		hdi.mask = HDI_FORMAT;
		hdi.fmt &= ~HDF_IMAGE;
	} else {
		hdi.mask = HDI_FORMAT | HDI_IMAGE;
		hdi.fmt |= HDF_IMAGE | HDF_BITMAP_ON_RIGHT;
		hdi.iImage = Dir;
	}
	GetHeaderCtrl()->SetItem(Col, &hdi);
}
开发者ID:victimofleisure,项目名称:Fractice,代码行数:15,代码来源:FileBrowserListCtrl.cpp

示例12: OnCreate

//建立消息
int CSkinListCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (__super::OnCreate(lpCreateStruct)==-1) return -1;
	m_SkinHeadCtrl.SubclassWindow(GetHeaderCtrl()->GetSafeHwnd());
	SetExtendedStyle(LIST_STYTE);
	return 0;
}
开发者ID:firehot,项目名称:WH2008,代码行数:8,代码来源:SkinListCtrl.cpp

示例13: PreSubclassWindow

//控件绑定
void CSkinListCtrl::PreSubclassWindow()
{
	__super::PreSubclassWindow();
	m_SkinHeadCtrl.SubclassWindow(GetHeaderCtrl()->GetSafeHwnd());
	SetExtendedStyle(LIST_STYTE);
	return;
}
开发者ID:firehot,项目名称:WH2008,代码行数:8,代码来源:SkinListCtrl.cpp

示例14: ASSERT

void HHideListCtrl::PreSubclassWindow() 
{
	ASSERT( GetStyle() & LVS_REPORT );
	
	CListCtrl::PreSubclassWindow();
	VERIFY( m_ctlHeader.SubclassWindow( GetHeaderCtrl()->GetSafeHwnd() ) );
}
开发者ID:BackupTheBerlios,项目名称:flushcms,代码行数:7,代码来源:HHideListCtrl.cpp

示例15: SetItemText

void CListCtrlEx::UpdateStatusDownload(int iIndex, int iStatus)
{
	CString strStatus;
	strStatus.Format(_T("%d%%"), iStatus);
	m_ProgressList[iIndex]->SetWindowText(strStatus.GetBuffer());
	m_ProgressList[iIndex]->SetMarquee(false, 1);
	m_ProgressList[iIndex]->SetPos(iStatus);
	m_ProgressList[iIndex]->Invalidate(TRUE);
	if(iStatus >= 100)
	{
		SetItemText(iIndex, 2, strStatus);
	}
	

	CHeaderCtrl* pHeader=GetHeaderCtrl();
	CRect ColRt;
	pHeader->GetItemRect(m_iProgressColumn,&ColRt);
	CRect rt;
	GetItemRect(iIndex, &rt, LVIR_LABEL);
	rt.top += 1;
	rt.bottom -= 1;
	rt.left += ColRt.left;
	int Width = ColRt.Width();
	rt.right = rt.left + Width - 4;
	rt.left = ColRt.left +1 ;
	rt.right = ColRt.right-1;
	
	m_ProgressList[iIndex]->MoveWindow(&rt, TRUE);
		
	
}
开发者ID:340211173,项目名称:an-hai-vng-gsd-cdatabasequery,代码行数:31,代码来源:ListCtrlEx.cpp


注:本文中的GetHeaderCtrl函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。