Specify the Mapping Mode

This topic describes how to specify MM_LOENGLISH as the new mapping mode.

You specify the mapping mode in Scribble when you call the SetScrollSizes member function defined by CScrollView. Recall from Add Scrolling to Scribble, in Lesson 8, that this function sets the view’s scrolling limits. SetScrollSizes is called from the OnInitialUpdate member function of CScribbleView.

To specify the mapping mode

  1. Use WizardBar to jump to the OnInitialUpdate function in class CScribbleView.

  2. Replace MM_TEXT with MM_LOENGLISH as illustrated below.
    SetScrollSizes( MM_LOENGLISH, GetDocument()->GetDocSize() );
    

    Recall that OnInitialUpdate is called immediately after the view is attached to the document. This lets the view set its mapping mode before OnDraw is called.