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

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

C++模板-继承-具现化 - C/C++ - 清泛网 - 专注C/C++及内核技术

...Handler = 0; class Test : public NewHandlerSurpport<Test> { public: int val; }; 怎么样?看了上面的代码,大家是否有些迷惑?首先,类NewHandlerSurpport采用的模板类的定义,其内部却没用到类型T;其次,它的子类在继承时,用了class Test : pu...
https://www.tsingfun.com/it/cpp/645.html 

C++ HICON与HBITMAP相互转换 - C/C++ - 清泛网 - 专注C/C++及内核技术

... BITMAP bmp; CDC bmpDC; CDC iconDC; ICONINFO csII; int bRetValue = ::GetIconInfo(hIcon, &csII); if (bRetValue == FALSE) return NULL; bmpDC.Attach(::GetDC(NULL)); iconDC.CreateCompatibleDC(&bmpDC); if (::GetObject(csII.hbmColor, sizeof(BITMAP), &bmp)) ...
https://www.tsingfun.com/it/cpp/968.html 

ATL COM开发入门(二)(ActiveX/COM组件回调JS) - C/C++ - 清泛网 - 专注C/C++及内核技术

...显示计数。 一、ATLDemo.idl 中添加一个新的接口: BeginTiming函数体: STDMETHODIMP CAtlDemoIf::BeginTiming(IDispatch* pIDispatch) { gIDispatch = pIDispatch; UINT nRet = SetTimer(NULL, // handle to main window ID_TIMER, // 定时器标识 ...
https://www.tsingfun.com/it/cpp/1362.html 

VS2005中SetUnhandledExceptionFilter函数应用 - C/C++ - 清泛网 - 专注C/C++及内核技术

... SetUnhandledExceptionFilter(NULL); UnhandledExceptionFilter(&ExceptionPointers); 解决方法是拦截CRT调用SetUnhandledExceptionFilter函数,使之无效。在X86平台下,可以使用以下代码。 #ifndef _M_IX86 #error "The following code only works for x86!" #endif v...
https://www.tsingfun.com/it/cpp/1425.html 

VC 对话框背景颜色、控件颜色 - C/C++ - 清泛网 - 专注C/C++及内核技术

...本 SetDialogBkColor(RGB(0,0,255),RGB(255,0,0)); int nResponse = dlg.DoModal(); … } 编译并运行,此时对话框的背景色和文本色已发生了改变。值得注意的是:在调用DoModal()之前必须先调用SetDialogBkColor,且此方法...
https://www.tsingfun.com/it/cpp/1432.html 

向CListView控件发LVN_COLUMNCLICK消息 - C/C++ - 清泛网 - 专注C/C++及内核技术

...,让控件自己处理: BOOL ClickListColumn(CListCtrl& listCtrl, int index) { if(index >= listCtrl.GetHeaderCtrl()->GetItemCount()) return FALSE; NM_LISTVIEW nmListView; memset(&nmListView, 0, sizeof(nmListView)); nmListView.iItem = -1;//NO...
https://www.tsingfun.com/it/cpp/1434.html 

stl 字符串std::string作为std::map主键key的实例 - C/C++ - 清泛网 - 专注C/C++及内核技术

...mp_string; } private: const std::string &m_s_cmp_string; }; int main() { std::map<std::string, std::string> my_map; my_map.insert(std::make_pair("10", "china")); my_map.insert(std::make_pair("20", "usa")); my_map.insert(std::make_pair("30", "english")); my_ma...
https://www.tsingfun.com/it/cpp/1483.html 

stdbool.h C99标准杂谈 - C/C++ - 清泛网 - 专注C/C++及内核技术

...定义宏: #define true 1 #define false 0 #define bool _Bool typdef int _Bool 但是很遗憾,Visual C++不支持C99,至少现在来看是没这个计划(参见http://en.wikipedia.org/wiki/C99)。所以stdbool.h就不能在vc里面用: http://msdn.microsoft.com/en-us/library/02y9a5ye...
https://www.tsingfun.com/it/cpp/1500.html 

C++在堆上申请二维数组 - C/C++ - 清泛网 - 专注C/C++及内核技术

...间不能连续且需要多个指针才能管理 double *d[m]; for (int i=0; i<m; i++) d = new double[n]; C++ 堆 二维数组
https://www.tsingfun.com/it/cpp/1515.html 

解决:Successful WSAStartup not yet performed. Error code : 10093. - C...

...: BOOL CxxxApp::InitInstance() { WSADATA wsaData; int res = WSAStartup(0x202, &wsaData); if (res) { AfxMessageBox("WSAStartup filed. [CxxxApp::InitInstance()]", 0); return false; } ... } WSAStartup 10093