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

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
https://www.tsingfun.com/it/cpp/1536.html 

关于 __VA_ARGS__ 宽字符版本的问题 - C/C++ - 清泛网 - 专注C/C++及内核技术

... Log(__FUNCTION__, __LINE__, (x), __VA_ARGS__) void Log(LPCSTR func, INT line, LPCTSTR fmt, ...) { // 设置地域,不然_vftprintf_s写不了中文 setlocale(0, "chs"); FILE *fp = NULL; va_list args; va_start(args, fmt); // 中间无关紧...
https://www.tsingfun.com/it/cpp/1614.html 

在ATL无窗口ActiveX 控件中如何使用定时器? - C/C++ - 清泛网 - 专注C/C++及内核技术

...TimerProc( HWND hwnd, // 定时器消息的窗口句柄 UINT message, // WM_TIMER 消息 INT_PTR idTimer, // 定时器标志 DWORD dwTime) // 当前系统启动计时 { ... } 调用方法: UINT nRet = SetTimer(NULL, // handle to main window...