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

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

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

...map(::GetDC(NULL), bmp.bmWidth, bmp.bmHeight); ICONINFO ii = {0}; ii.fIcon = TRUE; ii.hbmColor = bitmap; ii.hbmMask = hbmMask; HICON hIcon = ::CreateIconIndirect(&ii);//一旦不再需要,注意用DestroyIcon函数释放占用的内存及资源 ::DeleteObjec...
https://www.tsingfun.com/it/cpp/925.html 

C语言判断文件是否存在 - C/C++ - 清泛网 - 专注C/C++及内核技术

...io.h,原型:int access(const char *filename, int amode);amode参数为0时表示检查文件的存在性,如果文件存...用函数access,头文件是io.h,原型: int access(const char *filename, int amode); amode参数为0时表示检查文件的存在性,如果文件存在,返...
https://www.tsingfun.com/it/cpp/1285.html 

STL:accumulate与自定义数据类型 - C/C++ - 清泛网 - 专注C/C++及内核技术

...器中C++内置数据类型,例如: #include <numeric> int arr[]={10,20,30,40,50}; vector<int> va(&arr[0],&arr[5]); int sum=accumulate(va.begin(),va.end(),0); //sum = 150 但是对于自定义数据类型,我们就需要自己动手写一个类来实现自定义数据的处理,然后...
https://www.tsingfun.com/it/cpp/1342.html 

libcurl网络连接使用tcp/ip - C/C++ - 清泛网 - 专注C/C++及内核技术

...url_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "127.0.0.1"); curl_easy_setopt(curl, CURLOPT_PORT, 7102); /* Do not do the transfer - only connect to host */ curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L); res = curl_easy_perform(curl); if(CURLE_OK != r...
https://www.tsingfun.com/it/cpp/1350.html 

c++获取windows程序的版本号 - C/C++ - 清泛网 - 专注C/C++及内核技术

...rsionInfoSize((LPTSTR)lpszModuleName, &dwHandle); if ( dwDataSize == 0 ) return FALSE; // Allocate buffer and retrieve version information LPBYTE lpVersionData = new BYTE[dwDataSize]; if (!::GetFileVersionInfo((LPTSTR)lpszModuleName, dwHandle, dwDataSize, ...
https://www.tsingfun.com/it/cpp/1351.html 

c++ 写日志通用类,可设置日志级别 - C/C++ - 清泛网 - 专注C/C++及内核技术

...#include <atlstr.h> #pragma warning(disable:4996) #define LEVEL_FATAL 0 #define LEVEL_ERROR 1 #define LEVEL_WARN 2 #define LEVEL_INFO 3 #define LEVEL_VERBOSE 4 #define LEVEL_DEBUG 5 static int nLoggerLevel = LEVEL_INFO; void SetLoggerLevel(int nLevel); void Log(int nLevel, LPCSTR ...
https://www.tsingfun.com/it/cpp/1440.html 

mfc从CImageList中获取CBitmap位图对象 - C/C++ - 清泛网 - 专注C/C++及内核技术

...map * pBmpOld = dcMemory.SelectObject(&Bitmap); dcMemory.FillSolidRect(0, 0, nWidth, nHeight, RGB(255,255,255)); ImageList.Draw(&dcMemory, nImageIdx, CPoint(0,0), ILD_NORMAL); dcMemory.SelectObject(pBmpOld); dcMemory.DeleteDC(); ::DeleteObject( ImageInfo.hbmImage ); ::DeleteObject( Ima...
https://www.tsingfun.com/it/cpp/1447.html 

WSAAsyncSelect模型 - C/C++ - 清泛网 - 专注C/C++及内核技术

...RD sockVersion = MAKEWORD(2, 2); if(WSAStartup(sockVersion, &wsaData) != 0) { return 0; } USHORT nPort=4567; SOCKET s=socket(AF_INET,SOCK_STREAM,0); sockaddr_in sin; sin.sin_family=AF_INET; sin.sin_port=ntohs(nPort); sin.sin_addr.S_un.S_addr=INADDR_ANY; if(bind(s,(sockaddr*)&s...
https://www.tsingfun.com/it/cpp/1492.html 

vc/mfc *通配符 批量删除文件 - C/C++ - 清泛网 - 专注C/C++及内核技术

...me; FileOp.pTo = NULL; if (SHFileOperation(&FileOp) != 0) printf("删除文件:%S失败(Error:%d)\n", delFileName, GetLastError()); return 0; } 经过测试,文件路径必须为绝对路径,相对路径会操作失败。 获取当前路径拼...
https://www.tsingfun.com/it/cpp/1558.html 

MFC 设置控件字体,颜色,大小,粗体,下划线等 - C/C++ - 清泛网 - 专注C/...

...码:CFont *f = new CFont; f->CreateFont(16, nHeight 0, nWidth ...参考代码: CFont *f = new CFont; f->CreateFont(16, // nHeight 0, // nWidth 0, // nEscapement 0, // nOrientation FW_BOLD, //...