• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetHeaderCtrl函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: GetHeaderCtrl

void CListCtrlEx::InsertProgresCtrl(int iIndex, int iStatus)
{
	CHeaderCtrl* pHeader = GetHeaderCtrl();
	
	CRect ColRt;
	pHeader->GetItemRect(m_iProgressColumn, &ColRt);
	 //get the rect
	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;

	CProgressCtrl *pControl = new CProgressCtrl;
	pControl->Create(WS_CHILD|WS_VISIBLE, rt, this, IDC_PROGRESS_LIST + iIndex);
	pControl->SetRange(0, 100);
	pControl->SetPos(iStatus);
	pControl->ShowWindow(SW_SHOWNOACTIVATE);
	
	 //add them to the list
	m_ProgressList.push_back(pControl);
}
开发者ID:340211173,项目名称:an-hai-vng-gsd-cdatabasequery,代码行数:27,代码来源:ListCtrlEx.cpp


示例17: return

DWORD CReportCtrl::_GetHeaderTextFormat(int nColumn) const
{
	if(!HasColumnHeader())
	{
		return(ES_LEFT);
	}

	HDITEM	hd;
	hd.mask = HDI_FORMAT;
	if(!GetHeaderCtrl()->GetItem(nColumn, &hd))
	{
		return(ES_LEFT);
	}

	if(hd.fmt & HDF_CENTER)
	{
		return(ES_CENTER);
	}
	else if(hd.fmt & HDF_RIGHT)
	{
		return(ES_RIGHT);
	}
	else
	{
		return(ES_LEFT);
	}
}
开发者ID:340211173,项目名称:hf-2011,代码行数:27,代码来源:Reportctrl.cpp


示例18: first

BOOL CVarListCtrl::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) 
{
    HD_NOTIFY   *pHDN = (HD_NOTIFY*)lParam;

    if((pHDN->hdr.code == HDN_BEGINTRACKW || pHDN->hdr.code == HDN_BEGINTRACKA)
            && pHDN->iItem == 1)            // Prevent only first (col# 0) from resizing
    {
            *pResult = TRUE;                // disable tracking
            return TRUE;                    // Processed message
    }
	else if ((pHDN->hdr.code == HDN_ENDTRACKA) || (pHDN->hdr.code == HDN_ENDTRACKW))
	{
		CHeaderCtrl* pHeader = GetHeaderCtrl();
		if (pHeader)
		{
			int nColumnCount = pHeader->GetItemCount();
			if (nColumnCount > 0)
				SetColumnWidth(nColumnCount-1, LVSCW_AUTOSIZE_USEHEADER);
		}
	}


	
	return CListCtrl::OnNotify(wParam, lParam, pResult);
}
开发者ID:lassoan,项目名称:PythonVisualDebugger,代码行数:25,代码来源:varlistctrl.cpp


示例19: sizeof

//
//	[virtual] ODBCGridCtrl::OnSetups
//
void	
ODBCGridCtrl::OnSetup()
	{
	/*
	SELECT 
	INC.UID, 
	INC.ORDER_N, 
	INC.CLIENT_UID, 
	(SELECT NAME FROM AXSYS_CONTACT WHERE UID = INC.CLIENT_UID ) AS CLIENT_NAME,
	INC.OUTPUT_DATE, 
	INC.PAYMENT, 
	INC.REAL_PAYMENT,  
	INC.NATIVE_PAYMENT,  
	INC.CLOSED 
	FROM AXSYS_OUTPUT  INC
	ORDER BY INC.UID;
	*/

	NONCLIENTMETRICS ncm;
	ncm.cbSize = sizeof(NONCLIENTMETRICS);
	SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &ncm, NULL);

	m_pFont = new CFont();
	m_pFont->CreateFontIndirect(&ncm.lfCaptionFont);
	SetFont(m_pFont);

//	SubclassHeader();
//	GetFlatHeaderCtrl()->ShowSortArrow(FALSE);

	CHeaderCtrl* pHdr = GetHeaderCtrl();
	if( pHdr )
		pHdr->SetFont(m_pFont);
	SetCellSelectionMode(FALSE);
	}
开发者ID:zqrtalent,项目名称:MercuryUI,代码行数:37,代码来源:ODBCGridCtrl.cpp


示例20: GetHeaderCtrl

void CKadSearchListCtrl::Localize()
{
	CHeaderCtrl* pHeaderCtrl = GetHeaderCtrl();
	HDITEM hdi;
	hdi.mask = HDI_TEXT;
	CString strRes;

	for (int icol = 0; icol < pHeaderCtrl->GetItemCount(); icol++)
	{
		switch (icol)
		{
			case colNum: strRes = GetResString(IDS_NUMBER); break;
			case colKey: strRes = GetResString(IDS_KEY); break;
			case colType: strRes = GetResString(IDS_TYPE); break;
			case colName: strRes = GetResString(IDS_SW_NAME); break;
			case colStop: strRes = GetResString(IDS_STATUS); break;
			case colResponses: strRes = GetResString(IDS_RESPONSES); break;
			case colLoad: strRes = GetResString(IDS_THELOAD); break;
			case colPacketsSent: strRes = GetResString(IDS_PACKSENT); break;
			default: strRes.Empty(); break;
		}
		hdi.pszText = const_cast<LPTSTR>((LPCTSTR)strRes);
		pHeaderCtrl->SetItem(icol, &hdi);
	}

	int iItems = GetItemCount();
	for (int i = 0; i < iItems; i++)
		SearchRef((Kademlia::CSearch *)GetItemData(i));

	UpdateKadSearchCount();
}
开发者ID:brolee,项目名称:EMule-GIFC,代码行数:31,代码来源:KadSearchListCtrl.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetHeadingFromVector函数代码示例发布时间:2022-05-30
下一篇:
C++ GetHeader函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap