SCRIBBLE: Illustrates Use of Foundation Class Libraries

SCRIBBLE is the tutorial sample application discussed in Visual C++®Tutorials. The SCRIBBLE sample directory has seven subdirectories that correspond to different steps in the tutorial. Each subdirectory contains the complete sources for a given step.

SCRIBBLE provides simple illustrations of a wide breadth of MFC features. Step 1 through Step 6 of the give the best introduction to the following framework features.

  • Application objects

  • Documents, views, and document templates

  • Commands, message maps, and command user interface updating

  • MDI (multiple document interface) frame and child windows

  • Toolbars and status bars

  • Update hints from documents to views

  • Dialogs, data exchange, and validation

  • Scroll view

  • Splitter window

  • Printing and print preview

  • Context-sensitive Help

Refer to other samples for illustrations of advanced use of the above features, and for illustrations of many other features not covered in the tutorial.

Step 7, , of the Scribble Tutorial adds another step to the development of the SCRIBBLE application by introducing OLE Visual Editing server functionality.

The STEP1 sample demonstrates the following keywords:

CDC::LineTo; CDC::MoveTo; CDC::SelectObject; CDialog::DoModal; CDocument::DeleteContents; CDocument::OnNewDocument; CDocument::OnOpenDocument; CDocument::SetModifiedFlag; CFrameWnd::Create; CFrameWnd::DockControlBar; CFrameWnd::EnableDocking; CFrameWnd::LoadFrame; CObList::GetHeadPosition; CObList::GetNext; CObject::AssertValid; CObject::Dump; CObject::Serialize; CPen::CreatePen; CView::DoPreparePrinting; CView::GetDocument; CView::OnBeginPrinting; CView::OnDraw; CView::OnEndPrinting; CView::OnPreparePrinting; CWinApp::AddDocTemplate; CWinApp::Enable3dControls; CWinApp::EnableShellOpen; CWinApp::InitInstance; CWinApp::LoadStdProfileSettings; CWinApp::RegisterShellFileTypes; CWnd::DoDataExchange; CWnd::GetCapture; CWnd::OnCreate; CWnd::OnLButtonDown; CWnd::OnLButtonUp; CWnd::OnMouseMove; CWnd::PreCreateWindow; CWnd::SetCapture; CWnd::ShowWindow; CWnd::UpdateWindow; CreatePen; DragAcceptFiles; LineTo; MoveTo; RGB; ReleaseCapture; SelectObject

The STEP2 sample demonstrates the following keywords:

CDC::LineTo; CDC::MoveTo; CDC::SelectObject; CDialog::DoModal; CDocument::DeleteContents; CDocument::OnNewDocument; CDocument::OnOpenDocument; CDocument::SetModifiedFlag; CDocument::UpdateAllViews; CFrameWnd::Create; CFrameWnd::DockControlBar; CFrameWnd::EnableDocking; CFrameWnd::LoadFrame; CObList::GetHeadPosition; CObList::GetNext; CObject::AssertValid; CObject::Dump; CObject::Serialize; CPen::CreatePen; CView::DoPreparePrinting; CView::GetDocument; CView::OnBeginPrinting; CView::OnDraw; CView::OnEndPrinting; CView::OnPreparePrinting; CWinApp::AddDocTemplate; CWinApp::Enable3dControls; CWinApp::EnableShellOpen; CWinApp::InitInstance; CWinApp::LoadStdProfileSettings; CWinApp::RegisterShellFileTypes; CWnd::DoDataExchange; CWnd::GetCapture; CWnd::OnCreate; CWnd::OnLButtonDown; CWnd::OnLButtonUp; CWnd::OnMouseMove; CWnd::PreCreateWindow; CWnd::SetCapture; CWnd::ShowWindow; CWnd::UpdateWindow; CreatePen; DeleteObject; DragAcceptFiles; LineTo; MoveTo; RGB; ReleaseCapture; SelectObject

The STEP3 sample demonstrates the following keywords:

CDC::LineTo; CDC::MoveTo; CDC::SelectObject; CDialog::DoModal; CDocument::DeleteContents; CDocument::OnNewDocument; CDocument::OnOpenDocument; CDocument::SetModifiedFlag; CDocument::UpdateAllViews; CFrameWnd::Create; CFrameWnd::DockControlBar; CFrameWnd::EnableDocking; CFrameWnd::LoadFrame; CObList::GetHeadPosition; CObList::GetNext; CObject::AssertValid; CObject::Dump; CObject::Serialize; CPen::CreatePen; CView::DoPreparePrinting; CView::GetDocument; CView::OnBeginPrinting; CView::OnDraw; CView::OnEndPrinting; CView::OnPreparePrinting; CWinApp::AddDocTemplate; CWinApp::Enable3dControls; CWinApp::EnableShellOpen; CWinApp::InitInstance; CWinApp::LoadStdProfileSettings; CWinApp::RegisterShellFileTypes; CWnd::DoDataExchange; CWnd::GetCapture; CWnd::OnCreate; CWnd::OnLButtonDown; CWnd::OnLButtonUp; CWnd::OnMouseMove; CWnd::PreCreateWindow; CWnd::SetCapture; CWnd::ShowWindow; CWnd::UpdateWindow; CreatePen; DeleteObject; DragAcceptFiles; LineTo; MoveTo; RGB; ReleaseCapture; SelectObject

The STEP4 sample demonstrates the following keywords:

CArchive::IsStoring; CCmdUI::Enable; CCmdUI::SetCheck; CControlBar::EnableDocking; CControlBar::GetBarStyle; CControlBar::SetBarStyle; CDC::DPtoLP; CDC::GetClipBox; CDC::LPtoDP; CDC::LineTo; CDC::MoveTo; CDC::SelectObject; CDialog::DoModal; CDocument::DeleteContents; CDocument::OnNewDocument; CDocument::OnOpenDocument; CDocument::SetModifiedFlag; CDocument::UpdateAllViews; CFrameWnd::DockControlBar; CFrameWnd::EnableDocking; CFrameWnd::LoadFrame; CFrameWnd::OnCreateClient; CMDIChildWnd::Create; CObList::GetHeadPosition; CObList::GetNext; CObject::AssertValid; CObject::Dump; CObject::IsKindOf; CObject::Serialize; CPen::CreatePen; CRect::InflateRect; CRect::IntersectRect; CRect::SetRectEmpty; CScrollView::SetScrollSizes; CStatusBar::Create; CStatusBar::SetIndicators; CToolBar::Create; CView::DoPreparePrinting; CView::GetDocument; CView::OnBeginPrinting; CView::OnDraw; CView::OnEndPrinting; CView::OnInitialUpdate; CView::OnPrepareDC; CView::OnPreparePrinting; CView::OnUpdate; CWinApp::AddDocTemplate; CWinApp::Enable3dControls; CWinApp::EnableShellOpen; CWinApp::InitInstance; CWinApp::LoadStdProfileSettings; CWinApp::RegisterShellFileTypes; CWnd::DoDataExchange; CWnd::GetCapture; CWnd::Invalidate; CWnd::InvalidateRect; CWnd::OnCreate; CWnd::OnLButtonDown; CWnd::OnLButtonUp; CWnd::OnMouseMove; CWnd::PreCreateWindow; CWnd::SetCapture; CWnd::ShowWindow; CWnd::UpdateWindow; CreatePen; DeleteObject; DragAcceptFiles; RGB; ReleaseCapture; SetRectEmpty; max; min

The STEP5 sample demonstrates the following keywords:

CDC::DPtoLP; CDC::GetTextMetrics; CDC::LPtoDP; CDC::LineTo; CDC::MoveTo; CDC::SelectObject; CDC::SetTextAlign; CDC::SetWindowOrg; CDC::TextOut; CDialog::DoModal; CDocument::DeleteContents; CDocument::OnNewDocument; CDocument::OnOpenDocument; CDocument::SetModifiedFlag; CDocument::UpdateAllViews; CFont::CreateFontIndirect; CFrameWnd::Create; CFrameWnd::DockControlBar; CFrameWnd::EnableDocking; CFrameWnd::LoadFrame; CFrameWnd::OnCreateClient; CObList::GetHeadPosition; CObList::GetNext; CObject::AssertValid; CObject::Dump; CObject::IsKindOf; CObject::Serialize; CPen::CreatePen; CRect::InflateRect; CRect::IntersectRect; CScrollView::SetScrollSizes; CSplitterWnd::Create; CView::DoPreparePrinting; CView::GetDocument; CView::OnBeginPrinting; CView::OnDraw; CView::OnEndPrinting; CView::OnInitialUpdate; CView::OnPrepareDC; CView::OnPreparePrinting; CView::OnPrint; CView::OnUpdate; CWinApp::AddDocTemplate; CWinApp::Enable3dControls; CWinApp::EnableShellOpen; CWinApp::InitInstance; CWinApp::LoadStdProfileSettings; CWinApp::RegisterShellFileTypes; CWnd::DoDataExchange; CWnd::GetCapture; CWnd::Invalidate; CWnd::InvalidateRect; CWnd::OnCreate; CWnd::OnLButtonDown; CWnd::OnLButtonUp; CWnd::OnMouseMove; CWnd::PreCreateWindow; CWnd::SetCapture; CWnd::ShowWindow; CWnd::UpdateWindow; CreatePen; DeleteObject; DragAcceptFiles; GetClipBox; LPtoDP; LineTo; MoveTo; RGB; ReleaseCapture; SelectObject; SetRectEmpty; max; memset; min

The STEP6 sample demonstrates the following keywords:

CArchive::IsStoring; CCmdUI::Enable; CCmdUI::SetCheck; CControlBar::EnableDocking; CControlBar::GetBarStyle; CControlBar::SetBarStyle; CDC::DPtoLP; CDC::GetClipBox; CDC::LPtoDP; CDC::LineTo; CDC::MoveTo; CDC::SelectObject; CDialog::DoModal; CDocument::DeleteContents; CDocument::OnNewDocument; CDocument::OnOpenDocument; CDocument::SetModifiedFlag; CDocument::UpdateAllViews; CFont::CreateFontIndirect; CFrameWnd::DockControlBar; CFrameWnd::EnableDocking; CFrameWnd::LoadFrame; CFrameWnd::OnCreateClient; CMDIChildWnd::Create; CObList::GetHeadPosition; CObList::GetNext; CObject::AssertValid; CObject::Dump; CObject::IsKindOf; CObject::Serialize; CPen::CreatePen; CPrintInfo::SetMaxPage; CRect::InflateRect; CRect::IntersectRect; CRect::SetRectEmpty; CScrollView::SetScrollSizes; CStatusBar::Create; CStatusBar::SetIndicators; CToolBar::Create; CView::DoPreparePrinting; CView::GetDocument; CView::OnBeginPrinting; CView::OnDraw; CView::OnEndPrinting; CView::OnInitialUpdate; CView::OnPrepareDC; CView::OnPreparePrinting; CView::OnPrint; CView::OnUpdate; CWinApp::AddDocTemplate; CWinApp::Enable3dControls; CWinApp::EnableShellOpen; CWinApp::InitInstance; CWinApp::LoadStdProfileSettings; CWinApp::RegisterShellFileTypes; CWnd::DoDataExchange; CWnd::GetCapture; CWnd::Invalidate; CWnd::InvalidateRect; CWnd::OnCreate; CWnd::OnLButtonDown; CWnd::OnLButtonUp; CWnd::OnMouseMove; CWnd::PreCreateWindow; CWnd::SetCapture; CWnd::ShowWindow; CWnd::UpdateWindow; CreatePen; DeleteObject; DragAcceptFiles; GetTextMetrics; LineTo; MoveTo; RGB; ReleaseCapture; SelectObject; SetRectEmpty; SetTextAlign; SetWindowOrg; TextOut; max; memset; min

The STEP7 sample demonstrates the following keywords:

AfxMessageBox; AfxOleInit; CArchive::IsStoring; CCmdUI::Enable; CCmdUI::SetCheck; CControlBar::EnableDocking; CControlBar::GetBarStyle; CControlBar::SetBarStyle; CDC::DPtoLP; CDC::GetDeviceCaps; CDC::GetTextMetrics; CDC::LPtoDP; CDC::LPtoHIMETRIC; CDC::LineTo; CDC::MoveTo; CDC::SelectObject; CDC::SetMapMode; CDC::SetTextAlign; CDC::SetViewportExt; CDC::SetWindowExt; CDC::SetWindowOrg; CDC::TextOut; CDialog::DoModal; CDocTemplate::SetServerInfo; CDocument::DeleteContents; CDocument::GetFirstViewPosition; CDocument::GetNextView; CDocument::OnNewDocument; CDocument::OnOpenDocument; CDocument::SetModifiedFlag; CDocument::UpdateAllViews; CFont::CreateFontIndirect; CFrameWnd::Create; CFrameWnd::DockControlBar; CFrameWnd::EnableDocking; CFrameWnd::LoadFrame; CFrameWnd::OnCreateClient; CObList::GetHeadPosition; CObList::GetNext; CObject::AssertValid; CObject::Dump; CObject::IsKindOf; CObject::Serialize; COleDocument::EnableCompoundFile; COleIPFrameWnd::OnCreateControlBars; COleServerDoc::GetEmbeddedItem; COleServerDoc::GetZoomFactor; COleServerDoc::NotifyChanged; COleServerDoc::OnGetEmbeddedItem; COleServerDoc::OnSetItemRects; COleServerItem::CopyToClipboard; COleServerItem::GetDocument; COleServerItem::IsLinkedItem; COleServerItem::OnDraw; COleServerItem::OnGetExtent; COleTemplateServer::ConnectTemplate; COleTemplateServer::UpdateRegistry; CPen::CreatePen; CRect::InflateRect; CRect::IntersectRect; CRect::SetRectEmpty; CScrollView::SetScrollSizes; CSplitterWnd::Create; CStatusBar::Create; CStatusBar::SetIndicators; CToolBar::Create; CView::DoPreparePrinting; CView::GetDocument; CView::OnBeginPrinting; CView::OnDraw; CView::OnEndPrinting; CView::OnInitialUpdate; CView::OnPrepareDC; CView::OnPreparePrinting; CView::OnPrint; CView::OnUpdate; CWinApp::AddDocTemplate; CWinApp::Enable3dControls; CWinApp::InitInstance; CWinApp::LoadStdProfileSettings; CWnd::DoDataExchange; CWnd::GetCapture; CWnd::Invalidate; CWnd::InvalidateRect; CWnd::OnCreate; CWnd::OnLButtonDown; CWnd::OnLButtonUp; CWnd::OnMouseMove; CWnd::OnSize; CWnd::PreCreateWindow; CWnd::SetCapture; CWnd::SetOwner; CWnd::ShowWindow; CWnd::UpdateWindow; CreatePen; DeleteObject; DragAcceptFiles; GetClipBox; LPtoDP; RGB; ReleaseCapture; SetRectEmpty; max; memset; min

The STEP8 sample demonstrates the following keywords:

AfxMessageBox; AfxOleInit; CControlBar::EnableDocking; CControlBar::GetBarStyle; CControlBar::SetBarStyle; CDC::DPtoLP; CDC::GetClipBox; CDC::GetDeviceCaps; CDC::LPtoDP; CDC::LPtoHIMETRIC; CDC::LineTo; CDC::MoveTo; CDC::SelectObject; CDC::SetMapMode; CDC::SetViewportExt; CDC::SetWindowExt; CDialog::DoModal; CDocTemplate::SetServerInfo; CDocument::DeleteContents; CDocument::GetFirstViewPosition; CDocument::GetNextView; CDocument::OnNewDocument; CDocument::OnOpenDocument; CDocument::SetModifiedFlag; CDocument::UpdateAllViews; CFont::CreateFontIndirect; CFrameWnd::Create; CFrameWnd::DockControlBar; CFrameWnd::EnableDocking; CFrameWnd::LoadFrame; CFrameWnd::OnCreateClient; CMDIChildWnd::Create; CObList::GetHeadPosition; CObList::GetNext; CObject::AssertValid; CObject::Dump; CObject::IsKindOf; CObject::Serialize; COleDocument::EnableCompoundFile; COleDropTarget::Register; COleIPFrameWnd::OnCreateControlBars; COleResizeBar::Create; COleServerDoc::GetEmbeddedItem; COleServerDoc::GetZoomFactor; COleServerDoc::NotifyChanged; COleServerDoc::OnGetEmbeddedItem; COleServerDoc::OnSetItemRects; COleServerItem::CopyToClipboard; COleServerItem::GetDocument; COleServerItem::IsLinkedItem; COleServerItem::OnDraw; COleServerItem::OnGetExtent; COleTemplateServer::ConnectTemplate; COleTemplateServer::UpdateRegistry; CPen::CreatePen; CPrintInfo::SetMaxPage; CRect::InflateRect; CRect::IntersectRect; CScrollView::SetScrollSizes; CToolBar::Create; CView::DoPreparePrinting; CView::GetDocument; CView::OnBeginPrinting; CView::OnDraw; CView::OnEndPrinting; CView::OnInitialUpdate; CView::OnPrepareDC; CView::OnPreparePrinting; CView::OnPrint; CView::OnUpdate; CWinApp::AddDocTemplate; CWinApp::Enable3dControls; CWinApp::InitInstance; CWinApp::LoadStdProfileSettings; CWnd::DoDataExchange; CWnd::GetCapture; CWnd::Invalidate; CWnd::InvalidateRect; CWnd::OnCreate; CWnd::OnLButtonDown; CWnd::OnLButtonUp; CWnd::OnMouseMove; CWnd::OnSize; CWnd::PreCreateWindow; CWnd::SetCapture; CWnd::SetOwner; CWnd::ShowWindow; CWnd::UpdateWindow; CreatePen; DeleteObject; DragAcceptFiles; GetDeviceCaps; GetTextMetrics; LineTo; MoveTo; RGB; ReleaseCapture; SelectObject; SetMapMode; SetRectEmpty; SetTextAlign; SetViewportExt; SetWindowExt; SetWindowOrg; TextOut; max; memset; min