大约有 45,000 项符合查询结果(耗时:0.0419秒) [XML]
C++ HICON与HBITMAP相互转换 - C/C++ - 清泛网 - 专注C/C++及内核技术
...
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))
{
DWORD dwWidth = csII.xHotspot*2;
...
fstream默认不支持中文路径和输出整数带逗号的解决办法 - C/C++ - 清泛网 -...
...
ofstream outfile( "测试/test.txt", ios::out ); //创建文件
if( !outfile )
{
cout << "Failed to create file!";
return ;
}
outfile.close();
}
程序将输出创建文件夹失败的信息。
一个解决办法是:在中文操作系统下,调用locale::global(std...
CDHtmlDialog的基本使用(C++调用JS函数的实现) - C/C++ - 清泛网 - 专注IT技能提升
... = NULL;
HRESULT hResult;
hResult = pDoc2->get_Script(&pDispScript);
if(FAILED(hResult))
{
return S_FALSE;
}
DISPID dispid;
CComBSTR objbstrValue = strFunctionName;
BSTR bstrValue = objbstrValue.Copy();
OLECHAR *pszFunct = bstrValue ;
hResult = pDispScript->GetIDsOfNam...
C语言判断文件是否存在 - C/C++ - 清泛网 - 专注C/C++及内核技术
...clude <stdlib.h>
void main( void )
{
/* Check for existence */
if( (_access( "ACCESS.C", 0 )) != -1 )
{
printf( "File ACCESS.C exists\n" );
/* Check for write permission */
if( (_access( "ACCESS.C", 2 )) != -1 )
printf( "File ACCESS.C has write permissi...
cmake与autoconf+automake的对比 - C/C++ - 清泛网 - 专注C/C++及内核技术
...stall(DIRECTORY dirs..)
条件语句
使用Make的条件语句
if()
endif
if(my)
else(my)
endif(my)
while(condition)
endwhile(condition)
执行外部命令
exec_program(commd )
子模块
include()
信息输出
messge(STATUS "messge")
...
解决:Run-Time Check Failure #0,The value of ESP was not properly sav...
...lared with one calling convention with a function pointer declared with a different calling convention.
错误原因:
你定义函数指针原型时出错。
其实你定义的没有错,但是编译器不认识而已,因为你调用的dll函数是一个远函数,而且是一个C函数,...
MFC CSplitterWnd的用法详解 - C/C++ - 清泛网 - 专注C/C++及内核技术
...// TODO: Add your specialized code here and/or call the base class
if (!m_wndSplitter.CreateStatic(this, 1, 2))
return FALSE;
if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CLeftView), CSize(160, 200), pContext) ||
!m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(...
CMap用法 - C/C++ - 清泛网 - 专注C/C++及内核技术
...; //把str1覆盖了
//查找(方法一:Lookup)
CString str;
if (map.Lookup(1, str))
{
printf("find:%s\n", str);
}
//查找(方法二:PLookup)
CMapInt::CPair* pPair = map.PLookup(1);
if (pPair)
{
printf("find:%s\n", pPair->value);
}
//遍历
CMapInt::C...
c++ boost库 序列化与反序列化 - C/C++ - 清泛网 - 专注C/C++及内核技术
...
BOOST_SERIALIZATION_SHARED_PTR(TestStruct);
2、save、load函数:
#ifndef STRUCT_SAVE_LOAD_H_
#define STRUCT_SAVE_LOAD_H_
//
#include <string>
#include <fstream>
//
#include "boost/archive/text_iarchive.hpp"
#include "boost/archive/text_oarchive.hpp"
#include "boost/archive/xml_iarch...
vc/mfc *通配符 批量删除文件 - C/C++ - 清泛网 - 专注C/C++及内核技术
... FileOp.pFrom = delFileName;
FileOp.pTo = NULL;
if (SHFileOperation(&FileOp) != 0)
printf("删除文件:%S失败(Error:%d)\n", delFileName, GetLastError());
return 0;
}
经过测试,文件路径必须为绝对路径,相对路径会操作...
