1、 class CWindowDC; / CDC for entire window class CPaintDC; / embeddable BeginPaint struct helper class CMenu; / a menu / HMENU wrapper class CCmdTarget; / a target for user commands class CWnd; / a window / HWND wrapper class CDialog; / a dialog / standard windows controls class CStatic; / Static con
2、trol class CButton; / Button control class CListBox; / ListBox control class CCheckListBox;/ special listbox with checks class CComboBox; / ComboBox control class CEdit; / Edit control class CScrollBar; / ScrollBar control / frame windows class CFrameWnd; / standard SDI frame class CMDIFrameWnd; / s
3、tandard MDI frame class CMDIChildWnd; / standard MDI child class CMiniFrameWnd;/ half-height caption frame wnd / views on a document class CView; / a view on a document class CScrollView; / a scrolling view class CWinThread; / thread base class class CWinApp; / application base class class CDocTempl
4、ate; / template for document creation class CSingleDocTemplate;/ SDI support class CMultiDocTemplate; / MDI support class CDocument; / main document abstraction/ Helper classesclass CCmdUI; / Menu/button enablingclass CDataExchange; / Data exchange and validation contextclass CCommandLineInfo; / Com
5、mandLine parsing helperclass CDocManager; / CDocTemplate manager object/ CPoint - A 2-D point, similar to Windows POINT structure.class CPoint : public tagPOINTpublic:/ Constructors / create an uninitialized point CPoint(); / create from two integers CPoint(int initX, int initY); / create from anoth
6、er point CPoint(POINT initPt); / create from a size CPoint(SIZE initSize); / create from a dword: x = LOWORD(dw) y = HIWORD(dw) CPoint(DWORD dwPoint);/ Operations/ translate the point void Offset(int xOffset, int yOffset); void Offset(POINT point); void Offset(SIZE size); BOOL operator=(POINT point)
7、 const; BOOL operator!=(POINT point) const; void operator+=(SIZE size); void operator-=(SIZE size); void operator+=(POINT point); void operator-=(POINT point);/ Operators returning CPoint values CPoint operator+(SIZE size) const; CPoint operator-(SIZE size) const; CPoint operator-() const; CPoint op
8、erator+(POINT point) const;/ Operators returning CSize values CSize operator-(POINT point) const;/ Operators returning CRect values CRect operator+(const RECT* lpRect) const; CRect operator-(const RECT* lpRect) const;/ CRect - A 2-D rectangle, similar to Windows RECT structure.typedef const RECT* LP
9、CRECT; / pointer to read/only RECTclass CRect : public tagRECT / uninitialized rectangle CRect(); / from left, top, right, and bottom CRect(int l, int t, int r, int b); / copy constructor CRect(const RECT& srcRect); / from a pointer to another rect CRect(LPCRECT lpSrcRect); / from a point and size C
10、Rect(POINT point, SIZE size); / from two points CRect(POINT topLeft, POINT bottomRight);/ Attributes (in addition to RECT members) / retrieves the width int Width() const; / returns the height int Height() const; / returns the size CSize Size() const; / reference to the top-left point CPoint& TopLef
11、t(); / reference to the bottom-right point BottomRight(); / const reference to the top-left point const CPoint& TopLeft() const; / const reference to the bottom-right point BottomRight() const; / the geometric center point of the rectangle CPoint CenterPoint() const; / swap the left and right void S
12、wapLeftRight(); static void SwapLeftRight(LPRECT lpRect); / convert between CRect and LPRECT/LPCRECT (no need for &) operator LPRECT(); operator LPCRECT() const; / returns TRUE if rectangle has no area BOOL IsRectEmpty() const; / returns TRUE if rectangle is at (0,0) and has no area BOOL IsRectNull(
13、) const; / returns TRUE if point is within rectangle BOOL PtInRect(POINT point) const; / set rectangle from left, top, right, and bottom void SetRect(int x1, int y1, int x2, int y2); void SetRect(POINT topLeft, POINT bottomRight); / empty the rectangle void SetRectEmpty(); / copy from another rectan
14、gle void CopyRect(LPCRECT lpSrcRect); / TRUE if exactly the same as another rectangle BOOL EqualRect(LPCRECT lpRect) const; / inflate rectangles width and height without / moving its top or left void InflateRect(int x, int y); void InflateRect(SIZE size); void InflateRect(LPCRECT lpRect); void Infla
15、teRect(int l, int t, int r, int b); / deflate the rectangle void DeflateRect(int x, int y); void DeflateRect(SIZE size); void DeflateRect(LPCRECT lpRect); void DeflateRect(int l, int t, int r, int b); / translate the rectangle by moving its top and left void OffsetRect(int x, int y); void OffsetRect
16、(SIZE size); void OffsetRect(POINT point); void NormalizeRect(); / set this rectangle to intersection of two others BOOL IntersectRect(LPCRECT lpRect1, LPCRECT lpRect2); / set this rectangle to bounding union of two others BOOL UnionRect(LPCRECT lpRect1, LPCRECT lpRect2); / set this rectangle to min
17、imum of two others BOOL SubtractRect(LPCRECT lpRectSrc1, LPCRECT lpRectSrc2);/ Additional Operations void operator=(const RECT& BOOL operator=(const RECT& rect) const;=(const RECT& void operator+=(LPCRECT lpRect); void operator-=(LPCRECT lpRect); void operator& rect); void operator|=(const RECT& CRe
18、ct operator+(POINT point) const; CRect operator-(POINT point) const; CRect operator+(LPCRECT lpRect) const; CRect operator+(SIZE size) const; CRect operator-(SIZE size) const; CRect operator-(LPCRECT lpRect) const; CRect operator&(const RECT& rect2) const; CRect operator|(const RECT& CRect MulDiv(in
19、t nMultiplier, int nDivisor) const;class CGdiObject : public CObject DECLARE_DYNCREATE(CGdiObject)/ Attributes HGDIOBJ m_hObject; / must be first data member operator HGDIOBJ() const; HGDIOBJ GetSafeHandle() const; static CGdiObject* PASCAL FromHandle(HGDIOBJ hObject); static void PASCAL DeleteTempM
20、ap(); BOOL Attach(HGDIOBJ hObject); HGDIOBJ Detach(); CGdiObject(); / must Create a derived class object BOOL DeleteObject(); int GetObject(int nCount, LPVOID lpObject) const; UINT GetObjectType() const; BOOL CreateStockObject(int nIndex); BOOL UnrealizeObject(); BOOL operator=(const CGdiObject& obj
21、) const;=(const CGdiObject&/ Implementation virtual CGdiObject();#ifdef _DEBUG virtual void Dump(CDumpContext& dc) const; virtual void AssertValid() const;#endif/ CGdiObject subclasses (drawing tools)class CPen : public CGdiObject DECLARE_DYNAMIC(CPen) static CPen* PASCAL FromHandle(HPEN hPen); CPen
22、(); CPen(int nPenStyle, int nWidth, COLORREF crColor); CPen(int nPenStyle, int nWidth, const LOGBRUSH* pLogBrush, int nStyleCount = 0, const DWORD* lpStyle = NULL); BOOL CreatePen(int nPenStyle, int nWidth, COLORREF crColor); BOOL CreatePen(int nPenStyle, int nWidth, const LOGBRUSH* pLogBrush, BOOL
23、CreatePenIndirect(LPLOGPEN lpLogPen); operator HPEN() const; int GetLogPen(LOGPEN* pLogPen); int GetExtLogPen(EXTLOGPEN* pLogPen); virtual CPen();class CBrush : DECLARE_DYNAMIC(CBrush) static CBrush* PASCAL FromHandle(HBRUSH hBrush); CBrush(); CBrush(COLORREF crColor); / CreateSolidBrush CBrush(int
24、nIndex, COLORREF crColor); / CreateHatchBrush CBrush(CBitmap* pBitmap); / CreatePatternBrush BOOL CreateSolidBrush(COLORREF crColor); BOOL CreateHatchBrush(int nIndex, COLORREF crColor); BOOL CreateBrushIndirect(const LOGBRUSH* lpLogBrush); BOOL CreatePatternBrush(CBitmap* pBitmap); BOOL CreateDIBPa
25、tternBrush(HGLOBAL hPackedDIB, UINT nUsage); BOOL CreateDIBPatternBrush(const void* lpPackedDIB, UINT nUsage); BOOL CreateSysColorBrush(int nIndex); operator HBRUSH() const; int GetLogBrush(LOGBRUSH* pLogBrush); virtual CBrush();class CFont : DECLARE_DYNAMIC(CFont) static CFont* PASCAL FromHandle(HFONT hFont); CFont(); BOOL CreateFontIndirect(const LOGFONT* lpLogFont); BOOL CreateFont(int nHeight, int nWidth, int nEscapement, int nOrientation, int nWeight, BYTE bItalic, BYTE bUnderline,
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1