2011年9月19日

为窗口增加上下文菜单

摘要: 思路:1.在资源里新建菜单2.在类CMSPMSApp里载入3.在菜单的父窗口里添加消息:WM_CONTEXTMENU的响应函数.代码:载入:void CMSPMSApp::PreLoadState (){ GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU); // TODO: add another context menus here GetContextMenuManager()->AddMenu (_T("video channel"), IDR_CONT 阅读全文

posted @ 2011-09-19 18:11 LateStop 阅读(475) 评论(0) 推荐(0)

修改控件上字体的颜色

摘要: 思路:为包含该控件的对话框添加:WM_CTLCOLOR消息的响应函数HBRUSH CDialogColor::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pDC,pWnd, nCtlColor); // TODO: Change any attributes of theDC here //设置显示字体 CFont * cFont=new CFont; cFont->CreateFont(16,0,0,0,FW_SEMIBOLD,FALSE,... 阅读全文

posted @ 2011-09-19 18:06 LateStop 阅读(2351) 评论(0) 推荐(0)

导航