Dec 292017
 
Microsoft C++ source code to view a file in WIndows 3.x. Downloaded from the Microsoft BBS.
File MSTEXT2.ZIP from The Programmer’s Corner in
Category C++ Source Code
Microsoft C++ source code to view a file in WIndows 3.x. Downloaded from the Microsoft BBS.
File Name File Size Zip Size Zip Type
FILELIST.TXT 4508 1565 deflated
LEGAL.TXT 1889 916 deflated
MAINFRM.CPP 3919 1277 deflated
MAINFRM.H 1262 583 deflated
METRICS.CPP 20490 5008 deflated
METRICS.H 10586 2651 deflated
README.TXT 1613 575 deflated
RESOURCE.H 568 282 deflated
STDAFX.CPP 204 127 deflated
STDAFX.H 299 174 deflated
TEXT.CPP 5017 1763 deflated
TEXT.DEF 344 237 deflated
TEXT.H 1125 504 deflated
TEXT.ICO 768 205 deflated
TEXT.MAK 4055 1116 deflated
TEXT.RC 9710 2260 deflated
TEXT.RC2 1533 654 deflated
TEXTDOC.CPP 5784 1900 deflated
TEXTDOC.H 1302 597 deflated
TEXTDOC.ICO 768 183 deflated
TEXTVIEW.CPP 13848 3956 deflated
TEXTVIEW.H 4127 1316 deflated
TOOLBAR.BMP 598 217 deflated

Download File MSTEXT2.ZIP Here

Contents of the README.TXT file



This sample demonstrates how to display and print text using a CScrollView
derived class. It is possible to implement text output in a CScrollView
class by overriding OnDraw, and drawing the entire document using TextOut.
However, further steps are required to draw the text efficiently, and to
include support for multipage documents. Here are the features implemented
in this sample, and the locations:


Feature Locations(s)
------- ------------

Calculation of various metrics necessary METRICS.CPP:
for text output: CViewMetrics::Compute

Optimized screen and printer output for TEXTVIEW.CPP:
multipage documents: OnDraw (two overrides)
OnPrint
ComputeVisibleLines
ComputePrintableLines

Calculation of page count: METRICS.CPP:
CPageMetrics::Compute

Visual indication of pagination: METRICS.CPP (Calculation)
CPageMetrics::IsPageBreak

TEXTVIEW.CPP (Display)
OnDraw
DrawPageBreak


User defined margins: METRICS.CPP (Calculation)
CMargins::Compute

METRICS.CPP (Validation)
CMargins::IsInvalid

TEXTVIEW.CPP (Display)
OnPrint

Loading text files into a document. TEXTDOC.CPP
OnOpenDocument








 December 29, 2017  Add comments

Leave a Reply