BANNER

The BANNER sample demonstrates how to print using MFC for Windows CE. The application creates a menu which allows you to input the text to be printed and to modify its appearance by changing its font, size, or other characteristics.

When you select print, the application creates a CPrintDialog object to initiate printing.

Windows CE does not support graphics device interface (GDI) functions for transforming screen metrics to printer metrics. In order to modify screen output so that it will appear correctly when printed, you must either include separate code for screen and printer, or you must create your own printer matrix class. The BANNER sample combines these approaches. Most of the needed printer matrix methods are contained in the CBannerMatrix class.

The BANNER sample demonstrates how to derive a class from the CComboBox class and add it to the command bar. The CComboBox derivative is called CZoomList in this sample.

This sample demonstrates the following keywords:

CComboBox::AddString CObject::Serialize
CComboBox::SelectString CPen::CreatePen
CComboBox::SetCurSel CPrintDialog::GetDefaults
CDC::Attach CPrintDialog::m_pd
CDC::DeleteDC CPrintInfo::m_pPD
CDC::DrawText CRect::OffsetRect
CDC::GetDeviceCaps CString::FindOneOf
CDC::IsPrinting CView::OnEndPrinting
CDC::m_hDC CWinApp::LoadStdProfileSettings
CDC::Rectangle CWnd::CenterWindow
CDC::SelectObject CWnd::Detach
CDC::SetBkMode CWnd::DoDataExchange
CDC::SetROP2 CWnd::GetParentFrame
CDialog::DoModal CWnd::GetScrollBarCtrl
CDialog::OnInitDialog CWnd::GetScrollPos
CDocument::UpdateAllViews CWnd::InvalidateRect
CFont::CreateFont CWnd::m_hWnd
CFrameWnd::SetActiveView CWnd::PreCreateWindow
CGDIObject::CreateStockObject CWnd::SetScrollPos
CGdiObject::DeleteObject CWnd::ShowWindow
CGdiObject::m_hObject CWnd::UpdateData
CMenu::CheckMenuItem CWnd::UpdateWindow
CObject::AssertValid  

You can find the BANNER project files in the Wce\Samples\Mfc\BANNER directory.

For information on the Windows CE platforms that support this sample, see MFC for Windows CE Samples.