Wednesday, December 21, 2005

MFC

Basic classes

CObject - macros accompanying this class allow classes derived from CObject to
  • get their class' name at run time
  • get their class' object size at run time
  • create an object of this class without knowing the class' name
  • store and retrieve an instance of this class to an archive device without knowings its name
CCmdTarget - classes derived from this can receive and process command messages from the application's menu or toolbar(s)

CWnd - derived from CCmdTarget, and can perform it's functions too
all other MFC fn.s that control a window (creating, maintaining) are derived from CWnd

Application Classes

CWinApp (Application Class) - initializing and running the application

CFrameWnd (Frame Class) - display and route user's commands, display application's main window

CDocument (Document Class) - load and maintain a document

CView (View Class) - provide one or more views into the document

Types of Applications

  • Dialog Application - dialog box for UI, no frame, document or view class; derivation of CWinApp and created using CDialog class
  • SDI (Single Document Interface) - load and edit one application at a time + use all the four base classes
  • MDI ( Multiple Document Interface ) - load and edit several documents at once + use all four base classes + CMDIFrameWnd and CMDIChildWnd ( 2 derivations of CFrameWnd )

Document Template - defines what frame, document and view class to create when the application opens a document
create an object of CSingleDocTemplate / CMultiDocTemplate class and initialize with three class pointers
RUNTIME_CLASS() macro - returns a pointer to a class' CRuntimeClass structure

Threads

CWinThread -> parent of CWinApp (primary thread of execution)

Control Bar Classes (OCW)
  • CToolBar, CToolBarCtrl
  • CStatusBar, CStatusBarCtrl
  • CDialogBar
  • CRebar, CRebarCtrl

Property Classes
  • CPropertySheet (OCW)
  • CPropertyPage (OCW/Dialog)

Drawing Classes
  • CClientDC
  • CWindowDC
  • CPaintDC
  • CMetaFileDC

File Classes
  • CMemFile
  • CSharedFile
  • CStdioFile

ODBC Classes
  • CDatabase(0)
  • CRecordset
  • CDBVariant

DAO Classes
  • CDaoDatabase(0)
  • CDaoRecordSet(0)
  • COleVariant
  • CDaoWorkSpace(0)
  • CDaoQueryDef(0)
  • CDaoTableDef(0)

Data Collection Classes
  • CArray
  • CList
  • CMap

Communication Classes

2 Comments:

At 2:27 PM, Blogger Beef Jerky said...

are you a software developer?

 
At 4:19 PM, Blogger v_tel001 said...

yes

 

Post a Comment

<< Home