大约有 5,000 项符合查询结果(耗时:0.0079秒) [XML]

https://www.tsingfun.com/it/cpp/1951.html 

[完整源码实例] 修改 CListCtrl 的标题栏字体颜色;重绘 CListCtrl 标题栏 ...

...CListCtrl m_ListCtrl; CMyHeaderCtrl m_HeaderCtrl; 使用:OnInitDialog //表格数据初始化 m_ListCtrl.InsertColumn(0, _T("序号"), LVCFMT_LEFT, 60); m_ListCtrl.InsertColumn(1, _T("测试"), LVCFMT_LEFT, 200); m_ListCtrl.InsertColumn(2, _T("备注"), LVCFMT_LEFT, 100); //插...
https://www.tsingfun.com/it/cpp/1962.html 

CListCtrl 行高设置,自定义行高 - C/C++ - 清泛网 - 专注C/C++及内核技术

...m; pDC->SetBkMode(TRANSPARENT); if( bHighlight ) //如果被选 { pDC->SetTextColor(RGB(255,255,255)); //文本为白色 pDC->FillRect(rcBack, &CBrush(RGB(90,162,0))); } else { pDC->SetTextColor(RGB(0,0,0)); //文本为黑色 ...
https://www.tsingfun.com/it/cpp/2101.html 

passing xxx as \'this\' argument of xxx discards qualifiers - C/C++ - 清泛网 - 专注C/C++及内核技术

... << " " << itr->getName() << endl; } return 0; } 这个例子,加入set的StudentT对象都变成const对象了,那么调用getId等方法时只能调用其const版本,因为没有定义这个版本,因此编译器提示错误. 解决方法就是将getId和getName方法声明为...
https://www.tsingfun.com/it/cpp/2102.html 

error: cannot dynamic_cast ‘b’ (of type ‘class Base*’) to type ‘c...

...态的,即要求至少有一个虚函数,因此需要仔细检查类定义有无虚函数,例如可以将析构函数设置为虚函数. 更正后的代码为(来自: c++ - converting a base class pointer to a derived class pointer): #include <iostream> using namespace std; class Base {...
https://www.tsingfun.com/it/cpp/2104.html 

auto_ptr is not dereferencable - C/C++ - 清泛网 - 专注C/C++及内核技术

...t pt1's does nothing auto_ptr在拷贝时会转移内存控制权,例子pt1赋值给pt2后,将内存管理权转移给pt2, 此时pt1指针为NULL。 auto_ptr dereferencable
https://www.tsingfun.com/it/cpp/2117.html 

Error: must call SetScrollSizes() or SetScaleToFitSize()问题的解决 - C...

...程序运行后发生错误,调试发现程序进入下面的错误处理。 void CScrollView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo) { ASSERT_VALID(pDC); #ifdef _DEBUG if (m_nMapMode == MM_NONE) { TRACE(traceAppMsg, 0, "Error: must call SetScrollSizes() or ...
https://www.tsingfun.com/it/cpp/2123.html 

MFC Static透明背景色的实现、Static控件自绘、Static字体修改 - C/C++ - ...

...改变字体、文本颜色等。 自绘时注意点: 1、消息映射不要有:ON_WM_PAINT、ON_WM_DRAWITEM 消息,否则DrawItem函数不会被调用。 2、DrawItem而非OnDrawItem。OnDrawItem是ON_WM_DRAWITEM消息的处理函数,是处理子控件发送过来的自绘消息的。...
https://www.tsingfun.com/it/cpp/2124.html 

MFC RoundRect、FillRect等函数如何设置颜色 - C/C++ - 清泛网 - 专注C/C++及内核技术

... pDC->RoundRect(rectEdit, point); pDC->SelectObject(oldpen); CDCFillRect与FillSolidRect的区别: 在网上找FillRect与FillSolidRect的时候通常都会看到下面的一句话。 FillSolidRect与CDC::FillRect类似,FillSolidRect只能使用固体色(由COLORREF参数决定...
https://www.tsingfun.com/it/cpp/2191.html 

如何提高 VS2010/VS2012 编译速度 - C/C++ - 清泛网 - 专注C/C++及内核技术

...> Yes(/MP) 默认情况下Debug/Release均未设置。 在全局参数可以设置最大并行project的数目。默认情况下该参数有系统的“核”数决定。如i7 CPU默认为8。 Options->Projects and Solutions->Build and Run: 8 maximum number of parallel project builds. V...
https://www.tsingfun.com/it/cpp/2432.html 

C++ 智能指针shared_ptr,weak_ptr,shared_from_this实践 - C/C++ - 清泛网 - 专注C/C++及内核技术

...后出作用域自动释放引用计数。 shared_from_this() 在本对象使用必须依赖本对象存在,如果本对象已释放,它的行为不确定。 回调函数使用: 强指针:任务都要执行;弱指针:允许某情况下任务丢弃不执行。 强指针 lock 时会...