mfc绘图库Word文档格式.docx
《mfc绘图库Word文档格式.docx》由会员分享,可在线阅读,更多相关《mfc绘图库Word文档格式.docx(26页珍藏版)》请在冰豆网上搜索。
classCWindowDC;
//CDCforentirewindow
classCPaintDC;
//embeddableBeginPaintstructhelper
classCMenu;
//amenu/HMENUwrapper
classCCmdTarget;
//atargetforusercommands
classCWnd;
//awindow/HWNDwrapper
classCDialog;
//adialog
//standardwindowscontrols
classCStatic;
//Staticcontrol
classCButton;
//Buttoncontrol
classCListBox;
//ListBoxcontrol
classCCheckListBox;
//speciallistboxwithchecks
classCComboBox;
//ComboBoxcontrol
classCEdit;
//Editcontrol
classCScrollBar;
//ScrollBarcontrol
//framewindows
classCFrameWnd;
//standardSDIframe
classCMDIFrameWnd;
//standardMDIframe
classCMDIChildWnd;
//standardMDIchild
classCMiniFrameWnd;
//half-heightcaptionframewnd
//viewsonadocument
classCView;
//aviewonadocument
classCScrollView;
//ascrollingview
classCWinThread;
//threadbaseclass
classCWinApp;
//applicationbaseclass
classCDocTemplate;
//templatefordocumentcreation
classCSingleDocTemplate;
//SDIsupport
classCMultiDocTemplate;
//MDIsupport
classCDocument;
//maindocumentabstraction
//Helperclasses
classCCmdUI;
//Menu/buttonenabling
classCDataExchange;
//Dataexchangeandvalidationcontext
classCCommandLineInfo;
//CommandLineparsinghelper
classCDocManager;
//CDocTemplatemanagerobject
//CPoint-A2-Dpoint,similartoWindowsPOINTstructure.
classCPoint:
publictagPOINT
{
public:
//Constructors
//createanuninitializedpoint
CPoint();
//createfromtwointegers
CPoint(intinitX,intinitY);
//createfromanotherpoint
CPoint(POINTinitPt);
//createfromasize
CPoint(SIZEinitSize);
//createfromadword:
x=LOWORD(dw)y=HIWORD(dw)
CPoint(DWORDdwPoint);
//Operations
//translatethepoint
voidOffset(intxOffset,intyOffset);
voidOffset(POINTpoint);
voidOffset(SIZEsize);
BOOLoperator==(POINTpoint)const;
BOOLoperator!
=(POINTpoint)const;
voidoperator+=(SIZEsize);
voidoperator-=(SIZEsize);
voidoperator+=(POINTpoint);
voidoperator-=(POINTpoint);
//OperatorsreturningCPointvalues
CPointoperator+(SIZEsize)const;
CPointoperator-(SIZEsize)const;
CPointoperator-()const;
CPointoperator+(POINTpoint)const;
//OperatorsreturningCSizevalues
CSizeoperator-(POINTpoint)const;
//OperatorsreturningCRectvalues
CRectoperator+(constRECT*lpRect)const;
CRectoperator-(constRECT*lpRect)const;
};
/////////////////////////////////////////////////////////////////////////////
//CRect-A2-Drectangle,similartoWindowsRECTstructure.
typedefconstRECT*LPCRECT;
//pointertoread/onlyRECT
classCRect:
publictagRECT
//uninitializedrectangle
CRect();
//fromleft,top,right,andbottom
CRect(intl,intt,intr,intb);
//copyconstructor
CRect(constRECT&
srcRect);
//fromapointertoanotherrect
CRect(LPCRECTlpSrcRect);
//fromapointandsize
CRect(POINTpoint,SIZEsize);
//fromtwopoints
CRect(POINTtopLeft,POINTbottomRight);
//Attributes(inadditiontoRECTmembers)
//retrievesthewidth
intWidth()const;
//returnstheheight
intHeight()const;
//returnsthesize
CSizeSize()const;
//referencetothetop-leftpoint
CPoint&
TopLeft();
//referencetothebottom-rightpoint
BottomRight();
//constreferencetothetop-leftpoint
constCPoint&
TopLeft()const;
//constreferencetothebottom-rightpoint
BottomRight()const;
//thegeometriccenterpointoftherectangle
CPointCenterPoint()const;
//swaptheleftandright
voidSwapLeftRight();
staticvoidSwapLeftRight(LPRECTlpRect);
//convertbetweenCRectandLPRECT/LPCRECT(noneedfor&
)
operatorLPRECT();
operatorLPCRECT()const;
//returnsTRUEifrectanglehasnoarea
BOOLIsRectEmpty()const;
//returnsTRUEifrectangleisat(0,0)andhasnoarea
BOOLIsRectNull()const;
//returnsTRUEifpointiswithinrectangle
BOOLPtInRect(POINTpoint)const;
//setrectanglefromleft,top,right,andbottom
voidSetRect(intx1,inty1,intx2,inty2);
voidSetRect(POINTtopLeft,POINTbottomRight);
//emptytherectangle
voidSetRectEmpty();
//copyfromanotherrectangle
voidCopyRect(LPCRECTlpSrcRect);
//TRUEifexactlythesameasanotherrectangle
BOOLEqualRect(LPCRECTlpRect)const;
//inflaterectangle'
swidthandheightwithout
//movingitstoporleft
voidInflateRect(intx,inty);
voidInflateRect(SIZEsize);
voidInflateRect(LPCRECTlpRect);
voidInflateRect(intl,intt,intr,intb);
//deflatetherectangle'
voidDeflateRect(intx,inty);
voidDeflateRect(SIZEsize);
voidDeflateRect(LPCRECTlpRect);
voidDeflateRect(intl,intt,intr,intb);
//translatetherectanglebymovingitstopandleft
voidOffsetRect(intx,inty);
voidOffsetRect(SIZEsize);
voidOffsetRect(POINTpoint);
voidNormalizeRect();
//setthisrectangletointersectionoftwoothers
BOOLIntersectRect(LPCRECTlpRect1,LPCRECTlpRect2);
//setthisrectangletoboundingunionoftwoothers
BOOLUnionRect(LPCRECTlpRect1,LPCRECTlpRect2);
//setthisrectangletominimumoftwoothers
BOOLSubtractRect(LPCRECTlpRectSrc1,LPCRECTlpRectSrc2);
//AdditionalOperations
voidoperator=(constRECT&
BOOLoperator==(constRECT&
rect)const;
=(constRECT&
voidoperator+=(LPCRECTlpRect);
voidoperator-=(LPCRECTlpRect);
voidoperator&
rect);
voidoperator|=(constRECT&
CRectoperator+(POINTpoint)const;
CRectoperator-(POINTpoint)const;
CRectoperator+(LPCRECTlpRect)const;
CRectoperator+(SIZEsize)const;
CRectoperator-(SIZEsize)const;
CRectoperator-(LPCRECTlpRect)const;
CRectoperator&
(constRECT&
rect2)const;
CRectoperator|(constRECT&
CRectMulDiv(intnMultiplier,intnDivisor)const;
classCGdiObject:
publicCObject
DECLARE_DYNCREATE(CGdiObject)
//Attributes
HGDIOBJm_hObject;
//mustbefirstdatamember
operatorHGDIOBJ()const;
HGDIOBJGetSafeHandle()const;
staticCGdiObject*PASCALFromHandle(HGDIOBJhObject);
staticvoidPASCALDeleteTempMap();
BOOLAttach(HGDIOBJhObject);
HGDIOBJDetach();
CGdiObject();
//mustCreateaderivedclassobject
BOOLDeleteObject();
intGetObject(intnCount,LPVOIDlpObject)const;
UINTGetObjectType()const;
BOOLCreateStockObject(intnIndex);
BOOLUnrealizeObject();
BOOLoperator==(constCGdiObject&
obj)const;
=(constCGdiObject&
//Implementation
virtual~CGdiObject();
#ifdef_DEBUG
virtualvoidDump(CDumpContext&
dc)const;
virtualvoidAssertValid()const;
#endif
//CGdiObjectsubclasses(drawingtools)
classCPen:
publicCGdiObject
DECLARE_DYNAMIC(CPen)
staticCPen*PASCALFromHandle(HPENhPen);
CPen();
CPen(intnPenStyle,intnWidth,COLORREFcrColor);
CPen(intnPenStyle,intnWidth,constLOGBRUSH*pLogBrush,
intnStyleCount=0,constDWORD*lpStyle=NULL);
BOOLCreatePen(intnPenStyle,intnWidth,COLORREFcrColor);
BOOLCreatePen(intnPenStyle,intnWidth,constLOGBRUSH*pLogBrush,
BOOLCreatePenIndirect(LPLOGPENlpLogPen);
operatorHPEN()const;
intGetLogPen(LOGPEN*pLogPen);
intGetExtLogPen(EXTLOGPEN*pLogPen);
virtual~CPen();
classCBrush:
DECLARE_DYNAMIC(CBrush)
staticCBrush*PASCALFromHandle(HBRUSHhBrush);
CBrush();
CBrush(COLORREFcrColor);
//CreateSolidBrush
CBrush(intnIndex,COLORREFcrColor);
//CreateHatchBrush
CBrush(CBitmap*pBitmap);
//CreatePatternBrush
BOOLCreateSolidBrush(COLORREFcrColor);
BOOLCreateHatchBrush(intnIndex,COLORREFcrColor);
BOOLCreateBrushIndirect(constLOGBRUSH*lpLogBrush);
BOOLCreatePatternBrush(CBitmap*pBitmap);
BOOLCreateDIBPatternBrush(HGLOBALhPackedDIB,UINTnUsage);
BOOLCreateDIBPatternBrush(constvoid*lpPackedDIB,UINTnUsage);
BOOLCreateSysColorBrush(intnIndex);
operatorHBRUSH()const;
intGetLogBrush(LOGBRUSH*pLogBrush);
virtual~CBrush();
classCFont:
DECLARE_DYNAMIC(CFont)
staticCFont*PASCALFromHandle(HFONThFont);
CFont();
BOOLCreateFontIndirect(constLOGFONT*lpLogFont);
BOOLCreateFont(intnHeight,intnWidth,intnEscapement,
intnOrientation,intnWeight,BYTEbItalic,BYTEbUnderline,