会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
快雪的博客主页
至人无己,神人无功,圣人无名
博客园
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
下一页
2022年12月5日
MFC获取一年中所有周信息
摘要: std::vector<std::pair<CTime, CTime>> YearOfWeek(int year) { std::vector<std::pair<CTime, CTime>> weekInfo; weekInfo.reserve(60); CTime time(year, 1, 1
阅读全文
posted @ 2022-12-05 10:55 快雪
阅读(90)
评论(0)
推荐(0)
2022年7月25日
unicode下使用wofstream无法写入中文问题
摘要: #ifdef _UNICODE std::wofstream os; #else std::ofstream os; #endif 请设置: os.imbue(std::locale("chs")); 或存为utf-8: std::locale utf8(std::locale("C"), new
阅读全文
posted @ 2022-07-25 18:06 快雪
阅读(283)
评论(0)
推荐(0)
2022年4月16日
执行CreateProcess报非法访问
摘要: 程序调用CreateProcess总是报非法访问,类似这样调用: BOOL fSuccess = CreateProcess(NULL, command, NULL, NULL, TRUE, CREATE_NEW_CONSOLE, NULL, NULL, &si, &pi); 调了半天不知道什么原因
阅读全文
posted @ 2022-04-16 02:09 快雪
阅读(102)
评论(0)
推荐(0)
2021年12月2日
20211202
摘要: 今天看到有人说20211202这一天很特殊,想起刚学编程那会求某一范围内的回文数。今天闲来无事,计算了一下本世纪的回文日期,发现只有12个,今天已经是第5个了。 实现思路,由于年份是回文,因此最后两位是月份,前两位是日期,为了分析方便,我们将年份的四位分别提取出来,从左到右依次为n1~n4,分析如下
阅读全文
posted @ 2021-12-02 13:22 快雪
阅读(176)
评论(0)
推荐(0)
2021年9月18日
MFC 橡皮筋
摘要: // roptestView.h : CroptestView 类的接口 // #pragma once class CroptestView : public CView { protected: // 仅从序列化创建 CroptestView(); DECLARE_DYNCREATE(Cropt
阅读全文
posted @ 2021-09-18 17:24 快雪
阅读(168)
评论(0)
推荐(0)
2021年9月17日
双击CListCtrl列分割条调整宽度
摘要: ON_NOTIFY(HDN_DIVIDERDBLCLICK, 0, &CXXX::OnHdnDividerdblclickListData) void CXXX::OnHdnDividerdblclickListData(NMHDR *pNMHDR, LRESULT *pResult) { LPNM
阅读全文
posted @ 2021-09-17 16:14 快雪
阅读(210)
评论(0)
推荐(0)
MFC Dialog Box非常好用的函数
摘要: Dialog-Box Item Functions CheckDlgButton Places a check mark next to or removes a check mark from a button control. CheckRadioButton Checks the specif
阅读全文
posted @ 2021-09-17 15:34 快雪
阅读(113)
评论(0)
推荐(0)
2021年9月3日
MessageBox标题乱码
摘要: 1.查一下m_pszAppName是否有被修改 2.看下紧接着是否有这样一句代码: AfxGetModuleState()->m_lpszCurrentAppName = m_pszAppName; 没有的话加上就好。 修改AppName很多人参考MSDN,可MSDN上的例子有缺陷! 原因大概如下:
阅读全文
posted @ 2021-09-03 16:01 快雪
阅读(785)
评论(0)
推荐(1)
2021年7月13日
字符串匹配通配符"*、?"
摘要: bool IsMatch(CString s, CString p) { int j = 0; for (int i = 0, last_p = 0, s_start = 0; i < s.GetLength();) { if (j < p.GetLength() && (s[i] == p[j]
阅读全文
posted @ 2021-07-13 12:45 快雪
阅读(571)
评论(0)
推荐(0)
2021年7月2日
CEdit的Clear方法
摘要: 做Win32或MFC开发,有不清楚的问题一定记得先查MSDN! 做Win32或MFC开发,有不清楚的问题一定记得先查MSDN! 做Win32或MFC开发,有不清楚的问题一定记得先查MSDN! CEdit控件有个Clear方法,之前我一直以为是清除文本的,有点像SetWindowText(_T("")
阅读全文
posted @ 2021-07-02 13:43 快雪
阅读(701)
评论(1)
推荐(1)
上一页
1
2
3
4
5
6
7
8
下一页
公告