可以,在插入前你先设置下TREECONTRL的CFont就可以了
解决方案 »
- WIN7下命名管道问题 大哥些 帮帮忙
- Access操作必须使用一个可更新的查询
- 急急 请教 如何在CFormView里添加MEDIA PLAY 控件啊
- 有3个声卡,怎么知道当前哪个声卡是系统默认的
- 招聘c++/vc++[ATL,MFC)人才.招聘php人才.招聘js人才,工作地点:上海,有意者发简历到[email protected]
- 大哥们如何才能打开*.sln文件。是不是要作VC.net
- 只显示最后一条记录
- 一个简单问题,关于通讯过程中的数据类型
- 作品设计目的,开发思路,技术指标,创新点,技术关键,这些冬冬怎么写?谁有样板,借看一下!!!xiexie!!!!!!!!!1
- C++STL函数怎么返回值vector<string>类型,求例子(新手)
- API Hook CreateProcess问题
- 谁有 Effective C++中文版?可以共享一下吗?
void CPageContact::OnNMCustomdraw(NMHDR *pNMHDR, LRESULT *pResult)
{
LPNMCUSTOMDRAW pNMCD = reinterpret_cast<LPNMCUSTOMDRAW>(pNMHDR);
// TODO: Add your control notification handler code here
*pResult = CDRF_DODEFAULT;
// If this is the beginning of the control's paint cycle, request
// notifications for each item.
if ( CDDS_PREPAINT == pNMCD->dwDrawStage )
{
*pResult = CDRF_NOTIFYITEMDRAW;
}
else if ( CDDS_ITEMPREPAINT == pNMCD->dwDrawStage )
{
// This is the pre-paint stage for an item. We need to make another
// request to be notified during the post-paint stage. *pResult = CDRF_NOTIFYPOSTPAINT;
}
else if ( CDDS_ITEMPOSTPAINT == pNMCD->dwDrawStage )
{
// If this item is selected, re-draw the icon in its normal
// color (not blended with the highlight color).
LVITEM rItem;
int nItem = static_cast<int>( pNMCD->dwItemSpec); ZeroMemory ( &rItem, sizeof(LVITEM) );
rItem.mask = LVIF_IMAGE | LVIF_STATE;
rItem.iItem = nItem;
rItem.stateMask = LVIS_SELECTED;
GetItem ( &rItem );
// If this item is selected, redraw the icon with its normal colors.
if ( rItem.state & LVIS_SELECTED )
{
CDC* pDC = CDC::FromHandle(pNMCD->hdc);
CRect rcIcon; // Get the rect that holds the item's icon.
GetItemRect ( nItem, &rcIcon, LVIR_ICON ); // Draw the icon.
m_ImageLst.Draw ( pDC, rItem.iImage, rcIcon.TopLeft(),
ILD_TRANSPARENT );
*pResult = CDRF_SKIPDEFAULT;
}
}
}