怎么改变ListBox的颜色 谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 HBRUSH CListCtrlDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); // TODO: Change any attributes of the DC here if(nCtlColor==CTLCOLOR_LISTBOX) { pDC->SetTextColor(RGB(0,0,255)); pDC->SetBkColor(RGB(0,255,0)); } // TODO: Return a different brush if the default is not desired return hbr;}但是这种方法只能在ListBox中有Item的情况下才有效. 如何做个文件处理中的对话框,效果类似windows文件复制中的效果 各位帮忙看看哪里出错了? 数据库操作 ATL Simple Object怎么向外传出内部参数? 关于外挂拦截技术................................呢 如何获取耳麦输入的语音流 求学习网络编程方案。 谁能给我一份VC方面关于网络聊天的程序类子(有代码的)如果好用就给分 高分请教简单算法!急急! 当栈内的变量出现动态分配内存时,怎么保证其他变量的地址正确性?? 类似yahoo messenger的多方语音聊天,是怎么实现的? 怎样设listbox的背景色及其它问题 有关MAPI发送邮件的问题
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
if(nCtlColor==CTLCOLOR_LISTBOX)
{
pDC->SetTextColor(RGB(0,0,255));
pDC->SetBkColor(RGB(0,255,0));
}
// TODO: Return a different brush if the default is not desired
return hbr;
}
但是这种方法只能在ListBox中有Item的情况下才有效.