MFC 画笔CPen、画刷CBrush 新建单个文档的MFC应用程序,类视图——View项的属性——消息,WM_PAINT,创建OnPaint()函数 dc默认有一个画笔(实心1像素宽黑线)。 CPen画笔非实心线像素宽必须为1,否则膨胀接到一起,与实心线没有差异。 CBrush画刷,用来填充封闭区域,默认白色填充。 voidCMFCApplication27View::OnPaint(...
GDI对象 在MFC中,CGdiObject类是GDI对象的基类,通过查阅MSDN我们可以看到,CGdiObject类有六个直接的派生类,GDI对象主要也是这六个,分别是:CBitmap、CBrush、CFont、CPalette、CPen和CRgn。 在这六个GDI对象中,最常用的莫过于画笔和画刷了,即CPen类和CBrush类。本文就主要讲解画笔的使用。 画笔的应用实例 在这里直...
1.CreateSysColorBrush Creates a brush that is the default system color. CBrush brush; brush.CreateSysColorBrush(COLOR_BTNFACE); 2.CreateSolidBrush Initializes a brush with the specified solid color. CBrush brush; brush.CreateSolidBrush(RGB(255,0,0)); 3.CreatePatternBrush(ImageBrush) Initialize...
C-Pen is the original high-quality state-of-the-art pen scanner for school, home and work usage. Created to scan, built to last – and designed to empower.
上一节中讲了MFC异常处理,本节的主要内容是字体CFont类。 字体简介 GDI(Graphics Device Interface),图形设备接口,是Windows提供的一些函数和结构,用于在显示器和打印机上显示图形。我们在MFC开发中经常会使用GDI来输出文本或图形图像(当然现在也有了GDI+,本教程主要讲解GDI)。文本实际上就是一种特殊的图形,它只不过...
1. Install the C-Pen 3.5 Core Software Download C-Pen 3.5 core software for your operating system for free:https://cpen.com/kb-article/software-downloads/ Install the software on your system.2. Execute C-Pen core software.Do not close the software as long as you are working with C-...
CPen class CPictureHolder class CPrintDialog class CPrintDialogEx class CPrintInfo structure CProgressCtrl class CPropertyPage class CPropertySheet class CPropExchange class CPtrArray class CPtrList class CReBar class CReBarCtrl class CRecentDockSiteInfo class CRecentFileList class CRecordset class CRecordView clas...
CPen penRed1(PS_SOLID,1,RGB(255,0,0)); pOldPen = pDC->SelectObject(&penRed1); pDC->MoveTo(m_nLeft+3*m_ndx, m_nTop); pDC->LineTo(m_nLeft+5*m_ndx, m_nTop+2*m_ndy); pDC->MoveTo(m_nLeft+3*m_ndx, m_nTop+2*m_ndy); ...
HPEN hPenCPen* pPen HBRUSH hBrushCBrush* pBrush HFONT hFontCFont* pFont HBITMAP hBitmapCBitmap* pBitmap HPALETTE hPaltteCPalette* pPalette HRGN hRgnCRgn* pRgn HMENU hMenuCMenu* pMenu HWND hCtl CState* pState HWND hCtl CButton* pButton ...
CPen class CPictureHolder class CPrintDialog class CPrintDialogEx class CPrintInfo structure CProgressCtrl class CPropertyPage class CPropertySheet class CPropExchange class CPtrArray class CPtrList class CReBar class CReBarCtrl class CRecentDockSiteInfo class CRecentFileList class CRecordset class CRecordView clas...