大约有 45,000 项符合查询结果(耗时:0.0354秒) [XML]
boost自定义composite_key_compare比较函数 - C/C++ - 清泛网 - 专注C/C++及内核技术
..."bb";
set.insert(p2);
TParamSetByID::iterator it = set.find("aa");
if (it != set.end())
printf("found.");
else
printf("not found");
return 0;
}
当然比较器使用std::less<std::string>也可以。
另外,上述例子仅作为验证Demo,实际代码中建议ID类型直...
Visul C++中CList用法 - C/C++ - 清泛网 - 专注C/C++及内核技术
...g str1="hello";
CString str2="world";
CString str3="my";
CString str4="life";
list.AddTail(str1);
list.AddTail(str2);
list.AddTail(str3);
list.AddTail(str4);
POSITION pos = list.GetHeadPosition();
while(pos!=NULL)
{
CString data = list.GetNext(pos);
//do something
}
这样就...
Win32 创建控件风格不是Win XP的解决方案 - C/C++ - 清泛网 - 专注C/C++及内核技术
...,下面说一下解决方案吧:
这个根本办法就是加一个manifest文件,其内容如下:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
name="XP style manifest"
...
VS2005中SetUnhandledExceptionFilter函数应用 - C/C++ - 清泛网 - 专注C/C++及内核技术
...r函数,使之无效。在X86平台下,可以使用以下代码。
#ifndef _M_IX86
#error "The following code only works for x86!"
#endif
void DisableSetUnhandledExceptionFilter()
{
void *addr = (void*)GetProcAddress(LoadLibrary(_T("kernel32.dll")),
...
向CListView控件发LVN_COLUMNCLICK消息 - C/C++ - 清泛网 - 专注C/C++及内核技术
...函数里向控件ListView发消息,让它根据指定列排序。WM_NOTIFY消息是控件发向窗体的,MFC窗体再向控件反射部分消息,让控件自己处理:...在窗体函数里向控件ListView发消息,让它根据指定列排序。
WM_NOTIFY消息是控件发向窗体的,...
MFC Telnet Application(mfc telnet 端口,代码实现、不调用telnet.exe) ...
...the INS key button in the text view, type in the command you want to send (if it won't fit in one single line, press ENTER to move the caret to the next line; also, in the multi-line text messages, end the last string you typed with an ENTER, and press ESC to send it), then press the ESC key to send...
MFC SysLink的使用方法 - C/C++ - 清泛网 - 专注C/C++及内核技术
...通知处理程序代码
PNMLINK pNMLink = (PNMLINK) pNMHDR;
if (wcscmp(pNMLink->item.szUrl, L"https://www.tsingfun.com") == 0)
{
// 主要执行语句
ShellExecuteW(NULL, L"open", pNMLink->item.szUrl, NULL, NULL, SW_SHOWNORMAL);
}
*pResult = 0;
}...
SHFileOperation 这个API函数怎么用起来结果飘忽不定? - C/C++ - 清泛网 -...
...CurPath);
HANDLE hFind = ::FindFirstFile(findFileName, &FindFileData);
if(INVALID_HANDLE_VALUE != hFind)
{
do {
findFileName.Format("%s%s", szCurPath, FindFileData.cFileName);
DeleteFile(findFileName);
} while(FindNextFile(hFin...
解决:Successful WSAStartup not yet performed. Error code : 10093. - C...
... WSADATA wsaData;
int res = WSAStartup(0x202, &wsaData);
if (res) {
AfxMessageBox("WSAStartup filed. [CxxxApp::InitInstance()]", 0);
return false;
}
...
}
WSAStartup 10093
控件不响应OWNERDRAW消息 - C/C++ - 清泛网 - 专注C/C++及内核技术
...lg::OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct)
{
if( nIDCtl == IDC_LIST_xxx ) //自绘
{
....
}
}
中自绘不生效,调用CListCtrl的RedrawItem后不触发OnDrawItem函数。
这是由于没有设置自绘项,...
