dcmacro.h
来自「这是一个提供给使用遥控器的嵌入式设备开发的一个中文拼音输入法」· C头文件 代码 · 共 57 行
H
57 行
// DCMacro.h: interface for the CDCMacro class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_DCMACRO_H__6A4EA726_2EB9_11D4_A2D1_DAD3B5000000__INCLUDED_)
#define AFX_DCMACRO_H__6A4EA726_2EB9_11D4_A2D1_DAD3B5000000__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CDCMacro
{
public:
static void CircleTrans(CDC* pDC, POINT c, int r, int w, COLORREF clr, COLORREF clrInner = RGB(255, 255, 255));
static void DrawPolygon(CDC* pDC, POINT* pp, int nSum, COLORREF rgbInner, COLORREF rgbOutner);
static BOOL LineInRect(CPoint p1, CPoint p2, CRect& r) {
return ( r.PtInRect(p1) && r.PtInRect(p2));
};
static BOOL RectInRect(CRect& r1, CRect& r2) {
CRect r;
r.IntersectRect(&r1, &r2);
return r == r1;
};
static void DrawSolidRect(CDC* pDC, CRect r, COLORREF cf);
static void DrawText(CDC* pDC, CString& s, CPoint& p, UINT nFormat = DT_CENTER|DT_NOCLIP);
static void DrawRect(CDC* pDC, CRect r, BOOL bSunken);
static void CrossLine(CDC* pDC, CRect r);
static void Line(CDC *pDC, int x1, int y1, int x2, int y2);
static void TextIntOut(CDC *pDC, int x, int y, int n) {
TCHAR s[32];
::wsprintf(s, TEXT("%d"), n);
CPoint p(x, y);
CDCMacro::TextOut(pDC, p, s);
}
static void TextOut(CDC* pDC, CPoint p, CString s) {
pDC->ExtTextOut(p.x, p.y, 0, NULL, s, s.GetLength(), 0);
}
static void TextIntOut(CDC* pDC, CPoint p, int n) {
CDCMacro::TextIntOut(pDC, p.x, p.y, n);
}
static BOOL IntersectLine(int x1, int y1, int x2, int y2, CRect& r);
static void RectDiv(CRect& r, double scale);
static void Circle(CDC* pDC, POINT p, int r);
static void Line(CDC* pDC, POINT p1, POINT p2);
static BOOL IntersectLine(CPoint p1, CPoint p2, CRect r);
CDCMacro();
virtual ~CDCMacro();
};
#endif // !defined(AFX_DCMACRO_H__6A4EA726_2EB9_11D4_A2D1_DAD3B5000000__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?