刘华世的官方博客
摘要: void CSelRectDlg::OnPaint() { if (IsIconic()) { CPaintDC dc(this); // device context for painting SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); // Center icon in client rectangle int cxIcon = GetSystemMetrics(SM_CXICON); int cyIcon = GetSystemM... 阅读全文
posted @ 2012-11-21 17:09 pythonschool 阅读(456) 评论(0) 推荐(0) 编辑
摘要: WM_CTLCOLOR事件HBRUSH CFontDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); // TODO: Change any attributes of the DC here if(nCtlColor == CTLCOLOR_EDIT) //判断是否为编辑框控件 pDC->SetBkColor(m_Color); //设置文本背景颜色 //pDC->Se... 阅读全文
posted @ 2012-11-21 17:09 pythonschool 阅读(306) 评论(0) 推荐(0) 编辑
摘要: CString estr1 = "有志者,事竟成,破釜沉舟,百二秦关终属楚\r\n"; estr1 += "苦心人,天不负,卧薪尝胆,三千越甲可吞吴\r\n"; SetDlgItemText(IDC_EDIT1, estr1); SetDlgItemText(IDC_BUTTON1, "字体");void CFontDlg::OnFont() { // TODO: Add your control notification handler code here CFont * TempFont = m_Text.GetFont(); / 阅读全文
posted @ 2012-11-21 17:09 pythonschool 阅读(479) 评论(0) 推荐(0) 编辑
摘要: void CTestDlg::OnOpen() { // TODO: Add your control notification handler code here //bOpenFileDialog(TRUE):'打开'对话框 //lpszDefExt:扩展名 //lpszFileName:文件名称 //dwFlags:自定义文件对话框 //lpszFilte:用于指定对话框过滤的文件类型(文件类型说明和扩展名间用"|"分隔,每种文件类型间用"|"分隔,末尾用"||"结束.) //pParentWnd:标识文件对话框 阅读全文
posted @ 2012-11-21 17:09 pythonschool 阅读(1035) 评论(0) 推荐(0) 编辑
刘华世的官方博客