亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ch06.htm

?? Learning language of Visual C++6
?? HTM
?? 第 1 頁 / 共 3 頁
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>

<HEAD>
<SCRIPT LANGUAGE="JavaScript">

<!--

function popUp(pPage) {
 var fullURL = document.location;
 var textURL = fullURL.toString();
 var URLlen = textURL.length;
 var lenMinusPage = textURL.lastIndexOf("/");
 lenMinusPage += 1;
 var fullPath = textURL.substring(0,lenMinusPage);
 popUpWin = window.open('','popWin','resizable=yes,scrollbars=no,width=525,height=394');
 figDoc= popUpWin.document;
 zhtm= '<HTML><HEAD><TITLE>' + pPage + '</TITLE>';
 zhtm += '<link rel="stylesheet" href="/includes/stylesheets/ebooks.css"></head>';
 zhtm += '<BODY bgcolor="#FFFFFF">';
 zhtm += '<IMG SRC="' + fullPath + pPage + '">';
 zhtm += '<P><B>' + pPage + '</B>';
 zhtm += '</BODY></HTML>';
 window.popUpWin.document.write(zhtm);
 window.popUpWin.document.close();
 // Johnny Jackson 4/28/98
 }

//-->
                                                                
</SCRIPT>
<link rel="stylesheet" href="/includes/stylesheets/ebooks.css">

	
	<TITLE>Special Edition Using Visual C++ 6 -- Ch 6 -- Printing and Print Preview</TITLE>
</HEAD>

<BODY TEXT="#000000" BGCOLOR="#FFFFFF">

<CENTER>
<H1><IMG SRC="../button/que.gif" WIDTH="171" HEIGHT="66" ALIGN="BOTTOM" BORDER="0"><BR>
Special Edition Using Visual C++ 6</H1>
</CENTER>
<CENTER>
<P><A HREF="../ch05/ch05.htm"><IMG SRC="../button/previous.gif" WIDTH="128" HEIGHT="28"
ALIGN="BOTTOM" ALT="Previous chapter" BORDER="0"></A><A HREF="../ch07/ch07.htm"><IMG
SRC="../button/next.gif" WIDTH="128" HEIGHT="28" ALIGN="BOTTOM" ALT="Next chapter"
BORDER="0"></A><A HREF="../index.htm"><IMG SRC="../button/contents.gif" WIDTH="128"
HEIGHT="28" ALIGN="BOTTOM" ALT="Contents" BORDER="0"></A> 
<HR>

</CENTER>
<CENTER>
<H1>- 6 -</H1>
</CENTER>
<CENTER>
<H1>Printing and Print Preview</H1>
</CENTER>

<UL>
	<LI><A HREF="#Heading1">Understanding Basic Printing and Print Preview with MFC</A>
	<LI><A HREF="#Heading2">Scaling</A>
	<LI><A HREF="#Heading3">Printing Multiple Pages</A>
	<LI><A HREF="#Heading4">Setting the Origin</A>
	<LI><A HREF="#Heading5">MFC and Printing</A>
</UL>

<P>
<HR SIZE="4">

<CENTER>
<H1></H1>
</CENTER>
<H2><A NAME="Heading1"></A>Understanding Basic Printing and Print Preview with MFC</H2>
<P>If you brought together 10 Windows programmers and asked them what part of creating
Windows applications they thought was the hardest, probably at least half of them
would choose printing documents. Although the device-independent nature of Windows
makes it easier for users to get peripherals working properly, programmers must take
up some of the slack by programming all devices in a general way. At one time, printing
from a Windows application was a nightmare that only the most experienced programmers
could handle. Now, however, thanks to application frameworks such as MFC, the job
of printing documents from a Windows application is much simpler.</P>
<P>MFC handles so much of the printing task for you that, when it comes to simple
one-page documents, you have little to do on your own. To see what I mean, follow
these steps to create a basic MFC application that supports printing and print preview:</P>

<DL>
	<DT></DT>
	<DD><B>1. </B>Choose File, New; select the Projects tab and start a new AppWizard
	project workspace called Print1 (see Figure 6.1).
</DL>

<P><A HREF="javascript:popUp('06uvc01.gif')"><B>FIG. 6.1</B></A><B> </B><I>Start
an AppWizard project workspace called Print1.</I></P>

<DL>
	<DD><B>2. </B>Give the new project the following settings in the AppWizard dialog
	boxes. The New Project Information dialog box should then look like Figure 6.2.
</DL>



<BLOCKQUOTE>
	<P>Step 1: Choose Single Document.</P>
	<P>Step 2: Don't change the defaults presented by AppWizard.</P>
	<P>Step 3: Don't change the defaults presented by AppWizard.</P>
	<P>Step 4: Turn off all features except Printing and Print Preview.</P>
	<P>Step 5: Don't change the defaults presented by AppWizard.</P>
	<P>Step 6: Don't change the defaults presented by AppWizard.</P>

</BLOCKQUOTE>

<P><A HREF="javascript:popUp('06uvc02.gif')"><B>FIG. 6.2</B></A><B> </B><I>The New
Project Information dialog box.</I></P>

<DL>
	<DD><B>3.</B> Expand the classes in ClassView, expand CPrint1View, double-click the
	OnDraw() function, and add the following line of code to it, right after the comment
	TODO: add draw code for native data here:
</DL>



<BLOCKQUOTE>
	<PRE>pDC-&gt;Rectangle(20, 20, 220, 220);</PRE>

</BLOCKQUOTE>

<PRE></PRE>
<P>You've seen the Rectangle() function twice already: in the Recs app of Chapter
4, &quot;Documents and Views,&quot; and the Paint1 app of Chapter 5, &quot;Drawing
on the Screen.&quot; Adding this function to the OnDraw() function of an MFC program's
view class causes the program to draw a rectangle. This one is 200 pixels by 200
pixels, located 20 pixels down from the top of the view and 20 pixels from the left
edge.</P>


<BLOCKQUOTE>
	<P>
<HR>
<strong>TIP:</strong> If you haven't read Chapter 5 and aren't comfortable with device contexts,
	go back and read it now. Also, if you didn't read Chapter 4 and aren't comfortable
	with the document/view paradigm, you should read it, too. In this chapter, you override
	a number of virtual functions in your view class and work extensively with device
	contexts. 
<HR>


</BLOCKQUOTE>

<P>Believe it or not, you've just created a fully print-capable application that
can display its data (a rectangle) not only in its main window but also in a print
preview window and on the printer. To run the Print1 application, first compile and
link the source code by choosing Build, Build or by pressing F7. Then, choose Build,
Execute to run the program. You will see the window shown in Figure 6.3. This window
contains the application's output data, which is simply a rectangle. Next, choose
File, Print Preview. You see the print preview window, which displays the document
as it will appear if you print it (see Figure 6.4). Go ahead and print the document
(choose File, Print). These commands have been implemented for you because you chose
support for printing and print preview when you created this application with AppWizard.</P>
<P><A HREF="javascript:popUp('06uvc03.gif')"><B>FIG. 6.3</B></A><B> </B><I>Print1
displays a rectangle when you first run it.</I></P>
<P><A HREF="javascript:popUp('06uvc04.gif')"><B>FIG. 6.4</B></A><B> </B><I>The Print1
application automatically handles print previewing, thanks to the MFC AppWizard.</I></P>
<H2><A NAME="Heading2"></A>Scaling</H2>
<P>One thing you may notice about the printed document and the one displayed onscreen
is that, although the screen version of the rectangle takes up a fairly large portion
of the application's window, the printed version is tiny. That's because the pixels
onscreen and the dots on your printer are different sizes. Although the rectangle
is 200 dots square in both cases, the smaller printer dots yield a rectangle that
appears smaller. This is how the default Windows MM_TEXT graphics mapping mode works.
If you want to scale the printed image to a specific size, you might want to choose
a different mapping mode. Table 6.1 lists the mapping modes from which you can choose.</P>
<P>
<H4>Table 6.1&#160;&#160;Mapping Modes</H4>
<P>
<TABLE BORDER="1">
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT"><B>Mode</B></TD>
		<TD ALIGN="LEFT"><B>Unit</B></TD>
		<TD ALIGN="LEFT"><B>X</B></TD>
		<TD ALIGN="LEFT"><B>Y</B></TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">MM_HIENGLISH</TD>
		<TD ALIGN="LEFT">0.001 inch</TD>
		<TD ALIGN="LEFT">Increases right</TD>
		<TD ALIGN="LEFT">Increases up</TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">MM_HIMETRIC</TD>
		<TD ALIGN="LEFT">0.01 millimeter</TD>
		<TD ALIGN="LEFT">Increases right</TD>
		<TD ALIGN="LEFT">Increases up</TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">MM_ISOTROPIC</TD>
		<TD ALIGN="LEFT">User-defined</TD>
		<TD ALIGN="LEFT">User-defined</TD>
		<TD ALIGN="LEFT">User-defined</TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">MM_LOENGLISH</TD>
		<TD ALIGN="LEFT">0.01 inch</TD>
		<TD ALIGN="LEFT">Increases right</TD>
		<TD ALIGN="LEFT">Increases up</TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">MM_LOMETRIC</TD>
		<TD ALIGN="LEFT">0.1 millimeter</TD>
		<TD ALIGN="LEFT">Increases right</TD>
		<TD ALIGN="LEFT">Increases up</TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">MM_TEXT</TD>
		<TD ALIGN="LEFT">Device pixel</TD>
		<TD ALIGN="LEFT">Increases right</TD>
		<TD ALIGN="LEFT">Increases down</TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">MM_TWIPS</TD>
		<TD ALIGN="LEFT">1/1440 inch</TD>
		<TD ALIGN="LEFT">Increases right</TD>
		<TD ALIGN="LEFT">Increases up</TD>
	</TR>
</TABLE>
</P>
<P>Working with graphics in MM_TEXT mode causes problems when printers and screens
can accommodate a different number of pixels per page. A better mapping mode for
working with graphics is MM_LOENGLISH, which uses a hundredth of an inch, instead
of a dot or pixel, as a unit of measure. To change the Print1 application so that
it uses the MM_LOENGLISH mapping mode, replace the line you added to the OnDraw()
function with the following two lines:</P>
<P>
<PRE>pDC-&gt;SetMapMode(MM_LOENGLISH);
pDC-&gt;Rectangle(20, -20, 220, -220);
</PRE>
<P>The first line sets the mapping mode for the device context. The second line draws
the rectangle by using the new coordinate system. Why the negative values? If you
look at MM_LOENGLISH in Table 6.1, you see that although X coordinates increase to

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆国产精品777777在线| 中文字幕精品综合| 在线免费观看日本欧美| 成人av在线一区二区| 国产成人夜色高潮福利影视| 国产精品中文字幕一区二区三区| 日本va欧美va精品| 加勒比av一区二区| 国产另类ts人妖一区二区| 丁香一区二区三区| 成人99免费视频| 99re视频这里只有精品| 欧美亚洲综合网| 91精品一区二区三区久久久久久| 日韩欧美色综合网站| 久久精品人人做| 亚洲精品高清在线观看| 午夜日韩在线电影| 国产美女在线精品| av不卡免费在线观看| 在线一区二区三区四区五区 | 91网站在线播放| 欧美怡红院视频| 精品成人在线观看| 中文子幕无线码一区tr| 一区二区三区四区不卡视频| 蜜臀久久久久久久| 国产成人精品免费网站| 精品视频一区二区三区免费| 欧美大片一区二区| 亚洲另类色综合网站| 麻豆精品视频在线观看| 99久久伊人网影院| 日韩视频不卡中文| 亚洲伦理在线精品| 激情综合五月婷婷| 精品视频一区二区不卡| 久久青草国产手机看片福利盒子| 亚洲另类春色校园小说| 国产最新精品免费| 91麻豆精品久久久久蜜臀| 日本一区二区久久| 久久99最新地址| 欧美色视频一区| 中文字幕一区二区三区在线不卡| 午夜影院在线观看欧美| 色综合色狠狠天天综合色| 精品国产乱码久久久久久蜜臀| 亚洲美女视频在线观看| 大胆亚洲人体视频| 精品国产一区二区三区久久久蜜月 | 色综合天天综合色综合av| 色综合色狠狠天天综合色| 日韩网站在线看片你懂的| 亚洲毛片av在线| 国产.欧美.日韩| 久久亚洲欧美国产精品乐播| 日本美女视频一区二区| 欧美日韩综合在线| 亚洲一级二级在线| 在线看国产日韩| 亚洲你懂的在线视频| 99vv1com这只有精品| 久久久久99精品一区| 黄一区二区三区| 日韩美一区二区三区| 免费在线视频一区| 欧美一级片在线看| 日av在线不卡| 91麻豆精品国产91久久久| 亚洲国产一区二区在线播放| 色域天天综合网| 亚洲午夜精品一区二区三区他趣| 一本大道久久a久久综合| 亚洲精品国产精华液| 色婷婷激情久久| 午夜影视日本亚洲欧洲精品| 欧美日本一道本| 日本伊人色综合网| 欧美刺激午夜性久久久久久久 | 久久免费视频一区| 国产精品原创巨作av| 欧美高清在线视频| 一本色道久久综合亚洲91| 亚洲精品精品亚洲| 3atv在线一区二区三区| av资源站一区| 亚洲精品乱码久久久久久日本蜜臀| 色综合亚洲欧洲| 手机精品视频在线观看| 欧美一级二级三级蜜桃| 国产综合色精品一区二区三区| 国产欧美一区二区在线观看| 91色婷婷久久久久合中文| 亚洲h精品动漫在线观看| 欧美一区三区二区| 国产精一区二区三区| 18成人在线视频| 在线播放亚洲一区| 韩国成人在线视频| 亚洲青青青在线视频| 欧美人妖巨大在线| 国产白丝精品91爽爽久久| 亚洲女人****多毛耸耸8| 在线综合亚洲欧美在线视频| 国产福利一区在线观看| 亚洲一区二区四区蜜桃| 精品毛片乱码1区2区3区| 99国内精品久久| 日本va欧美va精品| 自拍偷拍亚洲综合| 日韩欧美色电影| 北岛玲一区二区三区四区| 天天做天天摸天天爽国产一区| 国产欧美精品日韩区二区麻豆天美| 91九色02白丝porn| 国产乱妇无码大片在线观看| 一区二区三区四区高清精品免费观看| 91精品国产福利在线观看 | 午夜精品久久久久久久| 国产午夜精品福利| 日韩欧美亚洲国产另类| 在线观看视频91| 高清久久久久久| 日韩国产在线观看| 亚洲免费在线观看视频| 欧美激情在线免费观看| 欧美videossexotv100| 欧美色综合久久| 不卡一二三区首页| 国产成人免费视| 麻豆免费精品视频| 男女男精品视频网| 亚洲成av人片一区二区梦乃| 国产精品久久久久久久浪潮网站| 精品美女在线播放| 日韩三级.com| 欧美不卡在线视频| 欧美一级欧美一级在线播放| 91国产免费观看| 色先锋资源久久综合| 白白色亚洲国产精品| 国产盗摄精品一区二区三区在线| 久久国产精品99久久久久久老狼| 视频一区二区中文字幕| 亚洲成人av电影在线| 亚洲自拍与偷拍| 亚洲最大成人综合| 一区二区三区中文字幕精品精品| 亚洲人成人一区二区在线观看| 亚洲少妇中出一区| 亚洲欧美日韩成人高清在线一区| 亚洲丝袜美腿综合| 亚洲精品福利视频网站| 亚洲综合在线观看视频| 亚洲一区二区三区自拍| 国产一区二区免费看| 在线观看一区二区精品视频| 成人va在线观看| 成人小视频在线| 成人永久aaa| 色综合天天性综合| 91在线视频在线| 色综合亚洲欧洲| 欧美日韩一区二区在线观看视频| 色成人在线视频| 欧美日韩免费观看一区三区| 色婷婷激情久久| 7777精品伊人久久久大香线蕉 | 日本伊人色综合网| 精品一区二区日韩| 成人黄色在线看| 91久久精品网| 日韩精品在线一区二区| 国产女同互慰高潮91漫画| 国产精品成人一区二区三区夜夜夜 | 国产三级精品三级| 中文字幕在线一区| 亚洲最新视频在线观看| 老司机午夜精品| 91在线观看视频| 欧美日本一道本| 日本一区二区久久| 午夜一区二区三区在线观看| 久久不见久久见免费视频1| 99这里都是精品| 欧美一区二区三区四区高清| 欧美激情中文字幕一区二区| 午夜视频在线观看一区| 国产综合色产在线精品| 色婷婷精品久久二区二区蜜臀av| 日韩欧美国产三级| 亚洲桃色在线一区| 国产乱淫av一区二区三区| 欧美亚洲一区二区在线| 国产欧美日韩一区二区三区在线观看| 亚洲午夜电影在线| 国产高清不卡二三区| 日韩一区二区精品葵司在线| 亚洲免费观看高清|