摘要: 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)
摘要: #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)
摘要: 程序调用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)
摘要: 今天看到有人说20211202这一天很特殊,想起刚学编程那会求某一范围内的回文数。今天闲来无事,计算了一下本世纪的回文日期,发现只有12个,今天已经是第5个了。 实现思路,由于年份是回文,因此最后两位是月份,前两位是日期,为了分析方便,我们将年份的四位分别提取出来,从左到右依次为n1~n4,分析如下 阅读全文
posted @ 2021-12-02 13:22 快雪 阅读(176) 评论(0) 推荐(0)
摘要: // roptestView.h : CroptestView 类的接口 // #pragma once class CroptestView : public CView { protected: // 仅从序列化创建 CroptestView(); DECLARE_DYNCREATE(Cropt 阅读全文
posted @ 2021-09-18 17:24 快雪 阅读(168) 评论(0) 推荐(0)
摘要: ON_NOTIFY(HDN_DIVIDERDBLCLICK, 0, &CXXX::OnHdnDividerdblclickListData) void CXXX::OnHdnDividerdblclickListData(NMHDR *pNMHDR, LRESULT *pResult) { LPNM 阅读全文
posted @ 2021-09-17 16:14 快雪 阅读(210) 评论(0) 推荐(0)
摘要: 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)
摘要: 1.查一下m_pszAppName是否有被修改 2.看下紧接着是否有这样一句代码: AfxGetModuleState()->m_lpszCurrentAppName = m_pszAppName; 没有的话加上就好。 修改AppName很多人参考MSDN,可MSDN上的例子有缺陷! 原因大概如下: 阅读全文
posted @ 2021-09-03 16:01 快雪 阅读(785) 评论(0) 推荐(1)
摘要: 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)
摘要: 做Win32或MFC开发,有不清楚的问题一定记得先查MSDN! 做Win32或MFC开发,有不清楚的问题一定记得先查MSDN! 做Win32或MFC开发,有不清楚的问题一定记得先查MSDN! CEdit控件有个Clear方法,之前我一直以为是清除文本的,有点像SetWindowText(_T("") 阅读全文
posted @ 2021-07-02 13:43 快雪 阅读(701) 评论(1) 推荐(1)