⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 appendxc.txt

📁 API经典入门
💻 TXT
字号:
Appendix C : Use The Source

One of the most valuable lessons to learn about programming the MFC (or
programming  in general for that matter) is the how's and where's of looking up
information.  This book  is a good start, but it's  more along the lines of a
tutorial.  When you are working on a  large program you will invariably need
facts on how to do a specific task.  This kind of  computer lore is typically
found in the references that come with your compiler.  But the  references are
big, dense and usually lacking in concrete examples.  When such a  circumstance
arises, we are usually in to much of a hurry to pour over the references  hoping
for a glimmer of understanding.  Don't get me wrong, the references are 
irreplaceable resources for your programming work.  It's just sometimes they are
too  general to be of much help; they are worthless in certain circumstances. 
What should you  do?  Of course, if you are programming at work there are 
usually a number of computer  wizards roaming around looking for someone, such 
as yourself, to inundate with their  guru-ness.  You used to be able to find a 
guru very easily.  They left a trail of Cheese Doodle wrappers behind them and 
made a very distinctive laughing sound whenever a Star  Trek faupaux was made.
You would find them hacking away through the night on software only guru's 
would understand.  Sadly times have changed.  I have seen guru's in suits. 
They drive "beamers" now and have 2.3 kids.  Some even go home to their families
at night. It's tragic. So what if you can't find your neighborhood computer 
genius, or worse, you are the local guru; how do you find the answers to your 
problem?  Use the Source, Duke!

When in doubt as to what a particular MFC function does or, more importantly,
how it does what it is supposed to do, go to the source.  All the foundation
classes are represented with source code in the MSVC\MFC\SRC directory.  Notice
I didn't say that  all the source for the MFC is contained in the specified 
directory. That's because the  actual source code for the MFC may differ from that provided. 

In other words, there is no  guarantee that the source code supplied is the same
source code used in generating the  libraries.  The supplied code is for
instructional purposes only!  But that's okay, that's  really the only reason we
would want it anyway.  Surely you don't want to recompile the  MFC libraries,
when you can use inheritance to get the same utility!  Don't recompile the  MFC
in any case.  Take advantage of the MFC as a stable, maintained platform.  But
also  take advantage of the educational opportunities afforded by the supplied
MFC code.  The  remainder of this appendix is an index to the supplied MFC
source.

All interface files are held in the MSVC\MFC\INCLUDE directory and all
implementation  source code files are contained in the MSVC\MFC\SRC directory.

MFC Name				Interface	Implementation
-----------------		----------	-----------------------
CArchive				afx.h		ARCCORE.CPP, ACROBJ.CPP
CArchiveException		afx.h		ARCEX.CPP
CBEdit				afxpen.h		PENCTRL.CPP
CBitmap				afxwin.h		WINGDI.CPP
CBitmapButton			afxext.h		WINBTN.CPP
CBrush				afxwin.h		WINGDI.CPP
CButton				afxwin.h		WINCTRL.CPP
CByteArray			afxcoll.h	ARRAY_B.CPP
CClientDC			afxwin.h		WINGDI.CPP
CCmdTarget			afxwin.h		CMDTARG.CPP, OLEDISP1.CPP,
CCmdUI				afxwin.h		CMDTARG.CPP, OLEUNK.CPP
CColorDialog			afxdlgs.h	DLGCLR.CPP
CComboBox			afxwin.h		WINCTRL.CPP
CControlBar			afxext.h		BARCORE.CPP
CCreateContext		afxext.h		
CDatabase			afxdb.h		DBCORE.CPP
CDataExchange			afxwin.h		DLGDATA.CPP, WINCORE.CPP
CDBException			afxdb.h		DBCORE.CPP
CDC					afxwin.h		WINGDI.CPP, WINGDIX.CPP
CDialog				afxwin.h		DLGCORE.CPP
CDialogBar			afxext.h		BARDLG.CPP
CDocItem				afxole.h		OLEDOC1.CPP
CDocTemplate			afxwin.h		DOCTEMPL.CPP
CDocument			afxwin.h		DOCCORE.CPP, CDOCMAPI.CPP
CDumpContext			afx.h		DUMPCONT.CPP, DUMPFLT.CPP
CDWordArray			afxcoll.h	ARRAY_D.CPP
CEdit				afxwin.h		WINCTRL.CPP
CEditView			afxext.h		VIEWEDIT.CPP
CException			afx.h		EXCEPT.CPP
CFieldExchange		afxdb.h		DBRFX.CPP
CFieldInfo			afxdb.h			
CFile				afx.h		FILECORE.CPP, FILEX.CPP,
					FILEST.CPP
CFileDialog			afxdlgs.h	DLGFILE.CPP
CFileException		afx.h		FILEX.CPP
CFileStatus			AFX.H		FILEST.CPP
CFindReplaceDialog	afxdlgs.h	DLGFR.CPP
CFont				afxwin.h		WINGDI.CPP
CFontDialog			afxdlgs.h	DLGFNT.CPP
CFormView			afxext.h		VIEWFORM.CPP
CFrameWnd			afxwin.h		WINFRM.CPP, WINFRMX.CPP,
								WINCORE.CPP
CGdiObject			afxwin.h		WINGDI.CPP
CHEdit				afxpen.h		PENCTRL.CPP
CListBox				afxwin.h		WINCTRL.CPP
CLongBinary			afxdb.h		DBRFX.CPP
CMapPtrToPtr			afxcoll.h	MAP_PP.CPP
CMapPtrToWord			afxcoll.h	MAP_PW.CPP
CMapStringToOb		afxcoll.h	MAP_SO.CPP
CMapStringToPtr		afxcoll.h	MAP_SP.CPP
CMapStringToString	afxcoll.h	MAP_SS.CPP
CMapWordToOb			afxcoll.h	MAP_WO.CPP
CMapWordToPtr			afxcoll.h	MAP_WP.CPP
CMDIChildWnd			afxwin.h		WINMDI.CPP
CMDIFrameWnd			afxwin.h		WINMDI.CPP
CMemFile				afx.h		FILEMEM.CPP, FILEST.CPP
CMemoryException		afx.h		EXCEPT.CPP
CMemoryState			afx.h		AFXMEM.CPP
CMenu				afxwin.h		WINMENU.CPP, WINCORE.CPP
CMetaFileDC			afxext.h		DCMETA.CPP
CMultiDocTemplate		afxwin.h		DOCMULTI.CPP
CNotSupportedException	afx.h		EXCEPT.CPP
CObArray				afxcoll.h	ARRAY_O.CPP
CObject				afx.h		OBJCORE.CPP, DLLINIT.CPP, AFXMEM.CPP
CObList				afxcoll.h	LIST_O.CPP
COleBusyDialog		afxodlgs.h	OLEDLGS2.CPP
COleChangeIconDialog	afxodlgs.h	OLEDLGS1.CPP
COleClientItem		afxole.h		OLECLI1.CPP, OLECLI2.CPP,
					OLECLI3.CPP, OLEUI1.CPP
COleConvertDialog		afxodlgs.h	OLEDLGS1.CPP
COleDataObject		afxole.h		OLEDOBJ1.CPP
COleDataSource		afxole.h		OLEDOBJ2.CPP
COleDialog			afxodlgs.h	OLEDLGS2.CPP
COleDispatchDriver	afxdisp.h	OLEDISP2.CPP
COleDispatchException	afxdisp.h	OLEDISP1.CPP
COleDispatchImpl		afxwin.h		OLEDISP1.CPP
COleDocument			afxole.h		OLEDOC1.CPP, OLEDOC2.CPP,
								OLEUI1.CPP, OLEUI2.CPP, DOCMAPI.CPP
COleDropSource		afxole.h		OLEDROP1.CPP
COleDropTarget		afxole.h		OLEDROP2.CPP
COleException			afxole.h		OLEMISC.CPP
COleFrameHook			AFXOLE.H		OLECLI2.CPP
COleInsertDialog		afxodlgs.h	OLEDLGS1.CPP
COleIPFrameWnd		afxole.h		OLEIPFRM.CPP
COleLinkingDoc		afxole.h		OLELINK.CPP
COleLinksDialog		afxodlgs.h	OLEDLGS1.CPP
COleMessageFilter		afxole.h		OLEMSGF.CPP
COleObjectFactory		afxdisp.h	OLEFACT.CPP
COlePasteSpecialDialog	afxodlgs.h	OLEDLGS1.CPP
COleResizeBar			afxole.h		OLEBAR.CPP
COleServerDoc			afxole.h		OLESVR1.CPP
COleServerItem		afxole.h		OLESVR2.CPP, OLESVR1.CPP
COleStreamFile		afxole.h		OLESTRM.CPP
COleTemplateServer	afxdisp.h	OLETSVR.CPP
COleUpdateDialog		afxdlgs.h	OLEDLGS1.CPP
COleRectTracker		afxext.h		TRCKRECT.CPP
CPaintDC				afxwin.h		WINGDI.CPP
CPalette				afxwin.h		WINGDI.CPP
CPen					afxwin.h		WINGDI.CPP
CPoint				afxwin.h		
CPreviewDC			AFXPRIV.H	DCPREV.CPP
CPreviewView			AFXPRIV.H	VIEWPREV.CPP		
CPrintDialog			afxdlgs.h	DLGPRNT.CPP
CPrintInfo			afxext.h		VIEWPRNT.CPP
CPrintPreviewState	afxext.h		VIEWPREV.CPP
CPtrArray			afxcoll.h	ARRAY_P.CPP
CPtrList				afxcoll.h	LIST_P.CPP
CRecordset			afxdb.h		DBCORE.CPP
CRecordsetStatus		afxdb.h			
CRecordView			afxdb.h		DBVIEW.CPP
CRect				afxwin.h		WINGDIX.CPP
CRectTracker			afxext.h		TRCKRECT.CPP
CResourceException	afxwin.h		WINGDI.CPP
CRgn					afxwin.h		WINGDI.CPP
CRuntimeClass			afx.h		ARCCORE.CPP, OBJCORE.CPP
CScrollBar			afxwin.h		WINCTRL.CPP
CScrollView			afxwin.h		VIEWSCRL.CPP
CSharedFile			AFXPRIV.H	FILESHRD.CPP
CSingleDocTemplate	afxwin.h		DOCSINGL.CPP
CSize				afxwin.h		
CSplitterWnd			afxext.h		WINSPLIT.CPP
CStatic				afxwin.h		WINCTRL.CPP
CStatusBar			afxext.h		BARCORE.CPP
CStdioFile			afx.h		FILETXT.CPP
CString				afx.h		STRCORE1.CPP, STRCORE2.CPP,
								WINSTR.CPP, STREX.CPP, OLEDISP1.CPP
CStringArray			afxcoll.h	ARRAY_S.CPP
CStringList			afxcoll.h	LIST_S.CPP
CTime				afx.h		TIMECORE.CPP
CTimeSpan			afx.h		TIMECORE.CPP
CToolBar				afxext.h		BARTOOL.CPP
CUIntArray			afxcoll.h	ARRAY_U.CPP
CUserException		afxwin.h		WINGDI.CPP
CVBControl			afxext.h		VBCTRL.CPP, VBFLOAT.CPP,
								VBDDX.CPP
CView				afxwin.h		VIEWCORE.CPP, VIEWPRNT.CPP,
								VIEWPREV.CPP
CWinApp				afxwin.h		APPCORE.CPP, APPDLG.CPP, APPGRAY.CPP,
								APPHELPX.CPP, APPPRNT.CPP, APPINIT.CPP,
								APPUI.CPP, APPUI2.CPP
CWindowDC			afxwin.h		WINGDI.CPP
CWnd					afxwin.h		WINCORE.CPP, WINFRMX.CPP,
								WINCTRL.CPP, DLGCORE.CPP
CWordArray			afxcoll.h	ARRAY_W.CPP

*end*

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -