摘要: 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 快雪 阅读(587) 评论(0) 推荐(0)
摘要: 做Win32或MFC开发,有不清楚的问题一定记得先查MSDN! 做Win32或MFC开发,有不清楚的问题一定记得先查MSDN! 做Win32或MFC开发,有不清楚的问题一定记得先查MSDN! CEdit控件有个Clear方法,之前我一直以为是清除文本的,有点像SetWindowText(_T("") 阅读全文
posted @ 2021-07-02 13:43 快雪 阅读(730) 评论(1) 推荐(1)
摘要: 双缓冲说白就是贴图,将数据全部绘制在缓冲兼容DC上,再将兼容DC的数据一次全部绘制在屏幕上。相较直接在DC上绘图,双缓冲是将绘制数据全部输出,而非分步绘制,并且,可以避免Windows刷新背景色避免闪烁问题。示例如下: 双缓冲: //在缓冲区作图,最后将缓冲区数据一次全部拷贝至目标DC void C 阅读全文
posted @ 2021-06-24 13:13 快雪 阅读(363) 评论(1) 推荐(0)
摘要: CWnd::SendMessage 将指定的消息发送到此窗口。 LRESULT SendMessage( UINT message, WPARAM wParam = 0, LPARAM lParam = 0); 参数 message指定要发送的消息。 wParam指定其他消息相关的信息。 lPara 阅读全文
posted @ 2021-06-22 11:39 快雪 阅读(179) 评论(0) 推荐(0)
摘要: 最近发生了一件有意思的事,MFC工程中有一个CEdit控件,控件绑定了一个double变量,当double变量的值变化时通过UpdateData可以直接展示到控件上。然后,有一个CListCtrl,需要将CEdit的值做展示。重点来了,当CEdit的值较小时,一切都很正常,当CEdit值比较大时或者 阅读全文
posted @ 2021-06-02 13:17 快雪 阅读(842) 评论(0) 推荐(0)
摘要: static void SuppressedAllConstraintAndFeature(bool bSuppress) { try { Session theSession = Session.GetSession(); UFSession theUfSession = UFSession.Ge 阅读全文
posted @ 2021-03-03 17:13 快雪 阅读(284) 评论(0) 推荐(0)
摘要: /// <summary> /// 替换组件 /// </summary> /// <param name="replacedInstance">被替换的组件实例</param> /// <param name="part">目标组件</param> static void ReplaceCompo 阅读全文
posted @ 2021-01-25 09:56 快雪 阅读(470) 评论(0) 推荐(0)
摘要: bool trim_strcmp(const char* s1, const char* s2) { if (s1 == s2) { return true; } if ((NULL == s1) || (NULL == s2)) { return false; } int s_s1 = -1; i 阅读全文
posted @ 2020-12-29 12:11 快雪 阅读(730) 评论(0) 推荐(0)
摘要: void GetAllItemData(const CTreeCtrl& tree, HTREEITEM hItem, map<HTREEITEM,DWORD_PTR>& itmData) { if (NULL == hItem) { return ; } itmData.insert(make_p 阅读全文
posted @ 2020-12-16 15:48 快雪 阅读(536) 评论(0) 推荐(0)
摘要: 最近在项目中碰到移动并旋转组件的问题,移动和旋转的输入条件是6个参数,分别是X、Y、Z轴的坐标和角度(6自由度)。例如,组件初始位置在绝对坐标系的(0,0,0)点,当输入[300,300,300,0,90,0],即将组件移动至(300,300,300)点并绕Y轴正向(所谓正向反向,遵守的是右手定则, 阅读全文
posted @ 2020-12-15 16:01 快雪 阅读(3803) 评论(1) 推荐(1)