📄 memdc.h
字号:
// MemDC.h: interface for the CMemDC class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_MEMDC_H__134051AE_CDFC_4330_8C74_C0CD361B49C6__INCLUDED_)
#define AFX_MEMDC_H__134051AE_CDFC_4330_8C74_C0CD361B49C6__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CMemDC : public CDC
{
public:
CMemDC(CDC* pDC, CRect* pRect=NULL, CBitmap* pBitmap=NULL);
CMemDC() : m_bPrinting(TRUE), m_Offset(0, 0) {};
virtual ~CMemDC();
void FillSolidRect(LPCRECT lpRect, COLORREF clr);
int DrawText(LPCTSTR lpszString, int nCount, LPRECT lpRect, UINT nFormat);
int DrawText(const CString& str, LPRECT lpRect, UINT nFormat) {return CMemDC::DrawText((LPCTSTR)str, str.GetLength(), lpRect, nFormat);};
BOOL TextOut(int x, int y, LPCTSTR lpszString, int nCount);
BOOL TextOut(int x, int y, const CString& str) {return CMemDC::TextOut(x, y, (LPCTSTR)str, str.GetLength());};
CPoint MoveTo(POINT point) {return CMemDC::MoveTo(point.x, point.y);};
CPoint MoveTo(int x, int y);
CPoint LineTo(POINT point) {return CMemDC::LineTo(point.x, point.y);};
CPoint LineTo(int x, int y);
BOOL FillRgn(CRgn* pRgn, CBrush* pBrush);
BOOL Polygon(LPPOINT lpPoints, int nCount);
BOOL Polyline(LPPOINT lpPoints, int nCount);
BOOL Ellipse(int x1, int y1, int x2, int y2);
BOOL Ellipse(LPCRECT lpRect) {return CMemDC::Ellipse(lpRect->left, lpRect->top, lpRect->right, lpRect->bottom);};
BOOL Pie(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4);
BOOL Pie(LPCRECT lpRect, POINT ptStart, POINT ptEnd) {return CMemDC::Pie(lpRect->left, lpRect->top, lpRect->right, lpRect->bottom, ptStart.x, ptStart.y, ptEnd.x, ptEnd.y);};
BOOL DrawIcon(int x, int y, HICON hIcon);
BOOL DrawIcon(POINT point, HICON hIcon) {return CMemDC::DrawIcon(point.x, point.y, hIcon);};
BOOL BitBlt(int x, int y, int nWidth, int nHeight, CDC* pSrcDC, int xSrc, int ySrc, DWORD dwRop);
CPen* SelectObject(CPen* pPen);
CBrush* SelectObject(CBrush* pBrush);
CFont* SelectObject(CFont* pFont);
CBitmap* SelectObject(CBitmap* pBitmap);
int SelectObject(CRgn* pRgn);
private:
COLORREF m_crBG;
COLORREF m_crTX;
CPen* m_pPen;
CBrush* m_pBrush;
CFont* m_pFont;
CBitmap* m_pBitmap;
BOOL m_bPrinting;
public:
CPoint m_Offset;
};
#endif // !defined(AFX_MEMDC_H__134051AE_CDFC_4330_8C74_C0CD361B49C6__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -