亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
成人性生交大片免费看在线播放 | 国产在线播放一区三区四| 91麻豆免费观看| 9191成人精品久久| 亚洲免费观看高清完整| 亚洲二区在线观看| 99精品黄色片免费大全| 久久99深爱久久99精品| 亚洲成人一区二区在线观看| 国产精品色眯眯| 国产精品美日韩| 国产精品久久久久婷婷| 中文字幕亚洲在| 国产精品天美传媒| 亚洲精品五月天| 亚洲综合免费观看高清完整版在线| 亚洲免费观看在线观看| 一区二区三区日韩欧美精品| 精品成人佐山爱一区二区| 亚洲色图.com| 国产喷白浆一区二区三区| 中文字幕一区二区三区四区| 国产精品一区专区| 欧美视频一区在线观看| 亚洲精品免费一二三区| 韩国精品一区二区| 成人免费的视频| 日韩国产欧美在线观看| 国产999精品久久久久久| 国产精品免费视频观看| 激情图区综合网| 欧美精品久久99| 国产自产v一区二区三区c| 国产精品日日摸夜夜摸av| 色综合色综合色综合色综合色综合| 水蜜桃久久夜色精品一区的特点| 日韩免费看的电影| 97精品国产97久久久久久久久久久久| 亚洲一卡二卡三卡四卡| 欧美日韩一区二区三区在线| 欧美军同video69gay| 日韩欧美美女一区二区三区| 国产精品美女www爽爽爽| 日韩一区精品视频| 欧美亚日韩国产aⅴ精品中极品| 久久麻豆一区二区| 亚洲最大成人网4388xx| 国产主播一区二区三区| 欧美一级片在线观看| 亚洲色图欧洲色图| 成人美女视频在线观看18| 一区二区三区.www| 欧美国产一区视频在线观看| 国产精品久久久久久一区二区三区| 色哟哟在线观看一区二区三区| 午夜精品久久久久久不卡8050| 精品第一国产综合精品aⅴ| 91免费版在线看| 久久福利视频一区二区| 亚洲精品大片www| 欧美日韩国产一区| 成人性视频网站| 亚洲成人免费电影| 国产女人aaa级久久久级| 欧美老肥妇做.爰bbww视频| 国产东北露脸精品视频| 亚洲精品高清视频在线观看| 555www色欧美视频| 91香蕉视频在线| 精品亚洲porn| 亚洲国产精品久久久男人的天堂| 久久综合av免费| 7878成人国产在线观看| 色综合中文字幕国产| 国产91精品一区二区麻豆网站| 日日摸夜夜添夜夜添精品视频| 精品国产乱码久久久久久夜甘婷婷 | 亚洲电影你懂得| 国产精品国产馆在线真实露脸| 日韩亚洲欧美在线观看| 日韩网站在线看片你懂的| 欧美性受xxxx| 欧美精品粉嫩高潮一区二区| 欧美日韩激情一区二区| 国产精品88av| 国产69精品久久777的优势| 六月婷婷色综合| 免费精品99久久国产综合精品| 一区二区激情视频| 亚洲欧美偷拍另类a∨色屁股| 不卡一区中文字幕| 麻豆专区一区二区三区四区五区| 欧美mv日韩mv国产网站app| 成人一区二区在线观看| 麻豆成人免费电影| 免费在线观看精品| 亚洲伊人伊色伊影伊综合网| 欧美mv日韩mv| 欧美中文字幕一区| 99久久精品免费看国产免费软件| 蜜臀av一区二区三区| 亚洲男人的天堂在线aⅴ视频| 国产午夜三级一区二区三| 91精品国产全国免费观看| 欧美三区免费完整视频在线观看| 国产一区二区精品久久91| 国产精品第13页| 欧美一级片在线观看| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 久久久国产午夜精品 | 日韩欧美的一区二区| 国产精品私房写真福利视频| 欧美精品日韩精品| 91精品久久久久久久99蜜桃| 欧美性大战久久久久久久| 欧美喷潮久久久xxxxx| 亚洲精品一区二区三区四区高清| 日韩精品在线看片z| 日韩亚洲欧美综合| 亚洲天堂精品视频| 一区二区三区欧美久久| 亚洲女厕所小便bbb| 婷婷一区二区三区| 免费成人美女在线观看.| 五月天激情综合网| 一区二区三区欧美| 亚洲成av人片www| 精品中文字幕一区二区| 国产精品一区二区久久精品爱涩| 国产91精品久久久久久久网曝门| 色综合天天性综合| 91精品国产综合久久香蕉麻豆| 麻豆精品视频在线观看视频| 国产精品午夜在线| 久久亚洲精华国产精华液| 欧美日产国产精品| 久久久噜噜噜久久中文字幕色伊伊| 欧美韩国日本不卡| 亚洲成人动漫av| 国产凹凸在线观看一区二区| 日本福利一区二区| 久久一夜天堂av一区二区三区| 国产精品久久久久国产精品日日| 亚洲国产精品久久人人爱蜜臀| 国产一区二区三区黄视频 | 蜜桃av噜噜一区| bt欧美亚洲午夜电影天堂| 欧美日韩精品专区| 怡红院av一区二区三区| 国产精品66部| 欧美日韩国产美女| 亚洲一区免费在线观看| 成人综合在线观看| 日韩欧美aaaaaa| 亚洲成人福利片| 欧美性videosxxxxx| 亚洲精品国产a| 欧美怡红院视频| 亚洲一区二区三区四区的| 91一区二区三区在线观看| 国产精品成人在线观看| 高清不卡一区二区在线| 久久蜜桃一区二区| 国产一区二区伦理片| 精品国产123| 一区二区三区国产豹纹内裤在线| 国产精品毛片久久久久久| 欧美高清hd18日本| 男男gaygay亚洲| 国产精品毛片久久久久久| 91久久一区二区| 久久 天天综合| 日韩高清一区在线| 欧美极品另类videosde| 欧美亚洲禁片免费| 国产99久久精品| 午夜视频一区二区三区| 欧美美女一区二区三区| 激情五月婷婷综合网| 国产一区二区不卡老阿姨| 欧美日韩亚洲综合一区| 日韩一级免费一区| 精品国产免费一区二区三区四区| 玖玖九九国产精品| 精品国产123| 国产69精品久久久久毛片 | 4438x成人网最大色成网站| 亚洲成av人片在线观看| 欧美一区二区三区系列电影| 日韩黄色免费电影| 欧美精品一区二区三区视频 | 成人小视频在线| 亚洲黄色在线视频| 欧美一区二区视频在线观看2020 | 色88888久久久久久影院按摩| 亚洲黄色av一区| 欧美精品高清视频| 国产精华液一区二区三区| 亚洲视频你懂的| 日韩天堂在线观看|