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

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

Win32 创建控件风格不是Win XP的解决方案 - C/C++ - 清泛网 - 专注C/C++及内核技术

...MANIFEST "TestCtrlStyle.manifest" 注意,有时候,加这样一句代码在资源文件中,链接时会出错: 1>Linking... 1>CVTRES : fatal error CVT1100: duplicate resource. type:MANIFEST, name:1, language:0x0409 1>LINK : fatal error LNK1123: failure during conve...
https://www.tsingfun.com/it/cpp/1335.html 

半个汉字的校验与处理(C++) - C/C++ - 清泛网 - 专注C/C++及内核技术

...生新的半个汉字。 以下是我近期对半个汉字的处理,C++代码如下: // strSrc: 原始字符串 // nMaxLen: 截断后的最大长度 char *GetTruncate(char *strSrc, int nMaxLen) { if (strSrc == NULL || nMaxLen == 0) { return NULL;...
https://www.tsingfun.com/it/cpp/1354.html 

BugTrap:程序崩溃快照、bug跟踪之利器 - C/C++ - 清泛网 - 专注C/C++及内核技术

...出崩溃信息对话框,直接将崩溃包保存文件,只需将上述代码改为: static void SetupExceptionHandler() { LOG_TRACER(); BT_InstallSehFilter(); // 配置信息 BT_SetAppName(_T("MarketInfo")); //自动保存crash文件 BT_SetReportFilePath(_T("crash")...
https://www.tsingfun.com/it/cpp/1361.html 

一个宏命令,就可以程序崩溃时生成dump文件 - C/C++ - 清泛网 - 专注C/C++及内核技术

...初始化时加入 DeclareDumpFile(); 创建头文件DumpFile.h, 将下列代码放进文件中: #pragma once #include <windows.h> #include < Dbghelp.h> #include <iostream> #include <vector> using namespace std; #pragma comment(lib, "Dbghelp.lib") namespace NSDumpFile { ...
https://www.tsingfun.com/it/cpp/1372.html 

Boost智能指针——shared_ptr - C/C++ - 清泛网 - 专注C/C++及内核技术

... 不要构造一个临时的shared_ptr作为函数的参数。 如下列代码则可能导致内存泄漏(当函数g()抛异常的时候就会泄露了,这个是boost文档上特地注明的标准bad Practices): void test() { foo(boost::shared_ptr<implementation>(new implementati...
https://www.tsingfun.com/it/cpp/1463.html 

div布局居中的方法 - C/C++ - 清泛网 - 专注C/C++及内核技术

...景div横铺float:left,然后指定显示div宽度并设置margin:auto。代码如下: <div class="testbg"> <div class="test"/> </div> <style> <!-- .testbg{ position:relative; width:100%; float:left; } .testbg .test{ position:relative; width:1000px; height:60px; margi...
https://www.tsingfun.com/it/cpp/1467.html 

php array为空的判断 - C/C++ - 清泛网 - 专注C/C++及内核技术

...断问题,个人一般用empty()来做数组非空判断,这样感觉代码看起来更容易理解。 转自: http://www.lutuzhi.com/theweb/433.html php array 数组 为空判断
https://www.tsingfun.com/it/cpp/1469.html 

MFC SysLink的使用方法 - C/C++ - 清泛网 - 专注C/C++及内核技术

...DR, LRESULT *pResult) { // TODO: 在此添加控件通知处理程序代码 PNMLINK pNMLink = (PNMLINK) pNMHDR; if (wcscmp(pNMLink->item.szUrl, L"https://www.tsingfun.com") == 0) { // 主要执行语句 ShellExecuteW(NULL, L"open", pNMLink->item.szUrl, NUL...
https://www.tsingfun.com/it/cpp/1493.html 

SHFileOperation 这个API函数怎么用起来结果飘忽不定? - C/C++ - 清泛网 -...

...决: 改用C++的FindNextFile,支持 * 通配符查找文件,核心代码如下: WIN32_FIND_DATA FindFileData; char szCurPath[MAX_PATH + 1] = { 0 }; GetCurrentDirectory(MAX_PATH, szCurPath); CString findFileName; findFileName.Format("%stest*.txt", szCurPath); HANDLE hFind = ::Find...
https://www.tsingfun.com/it/cpp/1503.html 

预编译头文件来自编译器的早期版本,或者预编译头为 C++ 而在 C 中使用它(...

...建预编译头。但是这样做在一定程度上需要被独立出来的代码在逻辑上是属于同一模中的,这样才便于维护。不过从设计的角度来说,这个要求一般是满足的,否则就应考虑下项目的总体设计了:P 最后别忘了设置原项目的依赖...