摘要: 工程名: ColorChange 1.在原来基础上添加个ShowColorValue函数 CRect rc; GetDlgItem(IDC_xxx)->GetWindowRect(rc); //得到的是屏幕坐标 ScreenToClient(rc); //转化为客户区坐标 CBrush brush; 阅读全文
posted @ 2016-05-24 09:47 SylarLiang_VC 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 一般是在控件里添加,一般做法是继承某个控件,然后在里面加。 使用: 阅读全文
posted @ 2016-05-20 11:30 SylarLiang_VC 阅读(317) 评论(0) 推荐(0) 编辑
摘要: 1. 简单加载BITMAP显示,缺点是:图片固定大小,不会自动拉伸 效果如图: 简单加载 ICON文件,显示在Button上: //资源文件 添加一个 ICON,ID为 IDI_ICON1,并设置Icon属性为TRUE .h定义一个 HICON m_hIcon1; .cpp m_hIcon1 = A 阅读全文
posted @ 2016-05-19 00:28 SylarLiang_VC 阅读(1985) 评论(0) 推荐(0) 编辑
摘要: 在程序的InitInstance()函数里添加如下内容: 阅读全文
posted @ 2016-05-18 16:23 SylarLiang_VC 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 1.头文件添加如下内容: 2.cpp文件添加: 3.上面涉及到弹出菜单, m_trayPopupMenu未定义,添加如下定义及内容: //资源文件添加Menu,如 IDR_MENU1 显示主程序 --> ID_SHOW_MENU 退出 --> ID_EXIT_MENU //.h添加 CMenu m_ 阅读全文
posted @ 2016-05-18 11:04 SylarLiang_VC 阅读(519) 评论(0) 推荐(0) 编辑
摘要: 1.打开文件/保存文件 对话框: 1>打开文件对话框 LPCTSTR lpszFilter 参数格式如: "Chart Files (*.xlc)|*.xlc|Worksheet Files (*.xls)|*.xls|Data Files (*.xlc;*.xls)|*.xlc;*.xls|All 阅读全文
posted @ 2016-05-18 10:29 SylarLiang_VC 阅读(822) 评论(0) 推荐(0) 编辑