C++
Jane_Yih
人生皆无常,云起云落,云淡风轻。
展开
-
C++ std::list的merge()使用与分析
C++ std::list的merge()使用与分析原创 2024-03-12 11:53:27 · 1554 阅读 · 0 评论 -
C++11的函数对象、Lambda表达式、函数适配器bind()、函数类模板function<T>介绍与使用
C++11的函数对象、Lambda表达式、函数适配器std::tr1::bind()、函数类模板std::tr1::function<T>介绍与使用原创 2024-03-06 14:44:34 · 1256 阅读 · 0 评论 -
日常技术积累
C++ 日常技术积累原创 2023-03-08 17:20:40 · 75 阅读 · 0 评论 -
C#dll封装为c++接口
C#dll封装为c++接口原创 2023-02-11 16:15:11 · 952 阅读 · 0 评论 -
基础类型的转换方法(持续更新...)
【代码】基础类型的转换方法(持续更新...)原创 2022-11-24 10:10:00 · 113 阅读 · 0 评论 -
VS编译的应用程序主题风格实现
解决XP风格的极老式的主题,换成稍微时尚点而命不久矣的Win7主题。微软官网-MSDN-启用视觉样式。原创 2022-11-04 21:25:33 · 176 阅读 · 0 评论 -
fatal error C1083: 无法打开预编译头文件
选中pch.cpp或者stdafx.cpp文件右键——属性,预编译头选“创建”,其它cpp选“使用”原创 2022-05-12 17:17:28 · 125 阅读 · 0 评论 -
C++ string文本格式化函数
【代码】C++ string文本格式化函数。原创 2021-12-14 14:14:12 · 50 阅读 · 0 评论 -
类成员函数指针的使用
声明class CMyClass; //要先声明类typedef BOOL (CMyClass::*TestFun)(const CString&, CString&); //定义函数指针TestFun类型class CMyClass{public: CMyClass(){} ~CMyClass(){}public: BOOL Test1(const CString& str1, CString& str2原创 2021-12-09 08:54:32 · 367 阅读 · 0 评论 -
获取本应用程序exe名称
CString GetExeName(){ CString strTemp = ""; TCHAR exeFullPath[_MAX_PATH]; GetModuleFileName(NULL, exeFullPath, _MAX_PATH); strTemp = exeFullPath; int index = 0; while (true) { index = strTemp.Find("\\"); if (index != -1) { strTemp = str..原创 2021-10-25 13:57:30 · 619 阅读 · 0 评论 -
创建指定路径的所有文件夹
/*创建指定路径的所有文件夹strFileDir:文件夹路径:例如:D:\\TestLog\\*/bool AutoCreateDir(const CString& strFileDir){ CString strSubDir(""); CString strTemp(strFileDir); int iFileDirLen = strFileDir.GetLength(); int iFindIndex = strTemp.Find("\\"); while (iFindIn.原创 2021-10-25 13:55:25 · 245 阅读 · 0 评论 -
CString转std::string
std::string CString2String(CString cstr){ std::string strTemp = CT2A(cstr); return strTemp;}原创 2021-10-25 13:53:50 · 1856 阅读 · 0 评论 -
CString转换
CString 转 Char*void fun(){ char c_psw[60] = { 0 }; //申请c_psw内存 CString psw = "AAA"; strcpy(c_psw, (LPCTSTR)psw); //函数退出,释放c_psw内存}原创 2021-10-22 16:56:27 · 94 阅读 · 0 评论 -
C++捕获全屏(截全屏)
函数:捕获全屏图片参数:LPRECT lpRect 图片大小返回:HBITMAP hBitmapHBITMAP CopyScreenToBitmap(LPRECT lpRect){ HDC hScrDC, hMemDC; HBITMAP hBitmap, hOldBitmap; int nX, nY, nX2, nY2; int nWidth, nHeight; int xScrn, yScrn; if (IsRectEmpty(lpRect..原创 2021-10-18 11:28:59 · 430 阅读 · 0 评论