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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? ch03.htm

?? /// //Visual C++ 6.0 21天自學(xué)教程
?? HTM
字號(hào):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>

<HEAD>
	<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">
<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 += '</head>';
 zhtm += '<BODY bgcolor="#FFFFFF">
<!-- Spidersoft WebZIP Ad Banner Insert -->
<TABLE width=100% border="0" cellpadding="0" cellspacing="0">
<TR>
<TD>
<ILAYER id=ad1 visibility=hidden height=60></ILAYER>
<NOLAYER>
<IFRAME SRC="http://www.spidersoft.com/ads/bwz468_60.htm" width="100%" height="60" marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no></IFRAME>
</NOLAYER>
</TD>
</TR>
</TABLE>
<!-- End of Spidersoft WebZIP Ad Banner Insert-->
';
 zhtm += '<IMG SRC="' + fullPath + pPage + '">';
 zhtm += '<P><B>' + pPage + '</B>';
 zhtm += '
<layer src="http://www.spidersoft.com/ads/bwz468_60.htm" visibility=hidden id=a1 width=600 onload="moveToAbsolute(ad1.pageX,ad1.pageY); a1.clip.height=60;visibility='show';"></layer>
</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">

	<META NAME="GENERATOR" Content="Symantec Visual Page Mac 1.1.1">
	<TITLE>Teach Yourself Visual C++ 6 in 21 Days -- Ch 3 -- Allowing User Interaction--Integrating the Mouse and Keyboard in Your Application</TITLE>
</HEAD>

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

<H1 ALIGN="CENTER"><IMG SRC="../button/sams.gif" WIDTH="171" HEIGHT="66" ALIGN="BOTTOM"
BORDER="0"><BR>
Teach Yourself Visual C++ 6 in 21 Days</H1>
<CENTER>
<P><A HREF="../ch02/ch02.htm"><IMG SRC="../button/previous.gif" WIDTH="128" HEIGHT="28"
ALIGN="BOTTOM" ALT="Previous chapter" BORDER="0"></A><A HREF="../ch04/ch04.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>
<H1 ALIGN="CENTER">- 3 -<BR>
Allowing User Interaction--Integrating the Mouse and Keyboard in Your Application</H1>
<H1></H1>

<UL>
	<LI><A HREF="#Heading1">Understanding Mouse Events</A>
	<UL>
		<LI><A HREF="#Heading2">Drawing with the Mouse</A>
		<LI><A HREF="#Heading3">Improving the Drawing Program</A>
		<LI><A HREF="#Heading4">Adding the Finishing Touches</A>
	</UL>
	<LI><A HREF="#Heading5">Capturing Keyboard Events</A>
	<UL>
		<LI><A HREF="#Heading6">Changing the Drawing Cursor</A>
		<LI><A HREF="#Heading7">Making the Change Stick</A>
	</UL>
	<LI><A HREF="#Heading8">Summary</A>
	<LI><A HREF="#Heading9">Q&amp;A</A>
	<LI><A HREF="#Heading10">Workshop</A>
	<UL>
		<LI><A HREF="#Heading11">Quiz</A>
	</UL>
	<LI><A HREF="#Heading12">Exercises</A>
</UL>

<P>
<HR SIZE="4">
<BR>
Depending on the type of application you are creating, you might need to notice what
the user is doing with the mouse. You need to know when and where the mouse was clicked,
which button was clicked, and when the button was released. You also need to know
what the user did while the mouse button was being held down.</P>

<P>Another thing that you might need to do is read the keyboard events. As with the
mouse, you might need to know when a key was pressed, how long it was held down,
and when it was released.</P>
<P>Today you are going to learn</P>
<P>

<UL>
	<LI>What mouse events are available for use and how to determine which one is appropriate
	for your application's needs.
	<P>
	<LI>How you can listen to mouse events and how to react to them in your Visual C++
	application.
	<P>
	<LI>What keyboard events are available for use and what actions will trigger each
	of these events.
	<P>
	<LI>How to capture keyboard events and take action based on what the user pressed.
</UL>

<H2><A NAME="Heading1"></A>Understanding Mouse Events</H2>
<P>As you learned yesterday, when you are working with most controls, you are limited
to a select number of events that are available in the Class Wizard. When it comes
to mouse events, you are limited for the most part to click and double-click events.
Just looking at your mouse tells you that there must be more to capturing mouse events
than recognizing these two. What about the right mouse button? How can you tell if
it has been pressed? And what about drawing programs? How can they follow where you
drag the mouse?</P>
<P>If you open the Class Wizard in one of your projects, select the dialog in the
list of object IDs, and then scroll through the list of messages that are available,
you will find a number of mouse-related events, which are also listed in Table 3.1.
These event messages enable you to perform any task that might be required by your
application.</P>
<P>
<H4>TABLE 3.1. MOUSE EVENT MESSAGES.</H4>
<P>
<TABLE BORDER="1">
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT"><I>Message</I></TD>
		<TD ALIGN="LEFT"><I>Description</I></TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">WM_LBUTTONDOWN		</TD>
		<TD ALIGN="LEFT">The left mouse button has been pressed.		</TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">WM_LBUTTONUP		</TD>
		<TD ALIGN="LEFT">The left mouse button has been released.		</TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">WM_LBUTTONDBLCLK		</TD>
		<TD ALIGN="LEFT">The left mouse button has been double-clicked.		</TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">WM_RBUTTONDOWN		</TD>
		<TD ALIGN="LEFT">The right mouse button has been pressed.		</TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">WM_RBUTTONUP		</TD>
		<TD ALIGN="LEFT">The right mouse button has been released.		</TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">WM_RBUTTONDBLCLK		</TD>
		<TD ALIGN="LEFT">The right mouse button has been double-clicked.		</TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">WM_MOUSEMOVE		</TD>
		<TD ALIGN="LEFT">The mouse is being moved across the application window space.		</TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">WM_MOUSEWHEEL		</TD>
		<TD ALIGN="LEFT">The mouse wheel is being moved.		</TD>
	</TR>
</TABLE>

<H3><A NAME="Heading2"></A>Drawing with the Mouse</H3>
<P>Today you are going to build a simple drawing program that uses some of the available
mouse events to let the user draw simple figures on a dialog window. This application
depends mostly on the WM_MOUSEMOVE event message, which signals that the mouse is
being moved. You will look at how you can tell within this event function whether
the left mouse button is down or up. You will also learn how you can tell where the
mouse is on the window. Sound's fairly straight ahead, so let's get going by following
these steps:</P>
<P>

<DL>
	<DT></DT>
	<DD><B>1. </B>Create a new MFC AppWizard workspace project, calling the project <B>Mouse</B>.
	<P>
	<DT></DT>
	<DD><B>2. </B>Specify that this project will be a dialog-based application in the
	first AppWizard step.
	<P>
	<DT></DT>
	<DD><B>3. </B>Use the default settings in the AppWizard. In the second step, specify
	a suitable dialog title, such as <B>Mouse and Keyboard</B>.
	<P>
	<DT></DT>
	<DD><B>4. </B>After the application shell is created, remove all controls from the
	dialog window. This provides the entire dialog window surface for drawing. This step
	is also necessary for your application to capture any keyboard events.
	<P>
</DL>



<BLOCKQUOTE>
	<P>
<HR>
<STRONG>NOTE:</STRONG> If there are any controls on a dialog, all keyboard events are directed
	to the control that currently has input focus--the control that is highlighted or
	has the cursor visible in it. To capture any keyboard events in a dialog, you have
	to remove all controls from the dialog.
<HR>


</BLOCKQUOTE>


<DL>
	<DT><B></B></DT>
	<DD><B>5. </B>Open the Class Wizard. Select WM_MOUSEMOVE from the list of messages,
	and add a function by clicking the Add Function button. Click the OK button to accept
	the suggested function name.
	<P>
	<DT></DT>
	<DD><B>6. </B>Click the Edit Code button to edit the OnMouseMove function you just
	created, adding the code in Listing 3.1.
	<P>
</DL>

<H4>LISTING 3.1. THE OnMouseMove FUNCTION.</H4>
<PRE> 1: void CMouseDlg::OnMouseMove(UINT nFlags, CPoint point)
 2: {
 3:     // TODO: Add your message handler code here and/or call default
 4: 
 5:     ///////////////////////
 6:     // MY CODE STARTS HERE
 7:     ///////////////////////
 8: 
 9:     // Check to see if the left mouse button is down
10:     if ((nFlags &amp; MK_LBUTTON) == MK_LBUTTON)
11:     {
12:         // Get the Device Context
13:         CClientDC dc(this);
14: 
15:         // Draw the pixel
16:         dc.SetPixel(point.x, point.y, RGB(0, 0, 0));
17:     }
18: 
19:     ///////////////////////
20:     // MY CODE ENDS HERE
21:     ///////////////////////
22: 
23:     CDialog::OnMouseMove(nFlags, point);
24: }
</PRE>
<P>Look at the function definition at the top of the listing. You will notice that
two arguments are passed into this function. The first of these arguments is a set
of flags that can be used to determine whether a mouse button is depressed (and which
one). This determination is made in the first line of your code with the if statement:</P>
<P>
<PRE>if ((nFlags &amp; MK_LBUTTON) == MK_LBUTTON)
</PRE>
<P>In the first half of the condition being evaluated, the flags are filtered down
to the one that indicates that the left mouse button is down. In the second half,
the filtered flags are compared to the flag that indicates that the left mouse button
is down. If the two match, then the left mouse button is down.</P>
<P>The second argument to this function is the location of the mouse. This argument
gives you the coordinates on the screen where the mouse currently is. You can use
this information to draw a spot on the dialog window.</P>

<P>Before you can draw any spots on the dialog window, you need to get the device
context for the dialog window. This is done by declaring a new instance of the CClientDC
class. This class encapsulates the device context and most of the operations that
can be performed on it, including all the screen drawing operations. In a sense,
the device context is the canvas upon which you can draw with your application. Until
you have a canvas, you cannot do any drawing or painting. After the device context
object is created, you can call its SetPixel function, which colors the pixel at
the location specified in the first two arguments with the color specified in the
third argument. If you compile and run your program, you can see how it allows you
to draw on the window surface with the mouse, as shown in Figure 3.1.</P>

<P><A HREF="javascript

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美中文字幕精品| 国内成人精品2018免费看| 亚洲一区二区精品3399| 日韩精品一二三四| 国产精品亚洲成人| 欧美在线免费播放| 精品噜噜噜噜久久久久久久久试看| 久久先锋影音av鲁色资源网| 中文字幕在线观看不卡视频| 亚洲777理论| 国产精品1024| 欧美肥妇free| 亚洲欧洲精品一区二区精品久久久 | 久久久99精品久久| 亚洲女同ⅹxx女同tv| 青娱乐精品视频| 99精品国产91久久久久久 | 亚洲18色成人| 国产精品一区二区久久不卡| 在线视频一区二区三| 精品理论电影在线观看 | 欧美一区二区在线观看| 中文字幕精品一区二区精品绿巨人| 亚洲午夜久久久久中文字幕久| 激情深爱一区二区| 一本到三区不卡视频| 精品成人一区二区| 亚洲国产乱码最新视频| 粉嫩aⅴ一区二区三区四区 | 美女一区二区视频| 91欧美激情一区二区三区成人| 欧美成人vps| 亚洲成av人影院| 99精品久久99久久久久| 久久网这里都是精品| 亚洲v精品v日韩v欧美v专区| 99精品偷自拍| 国产清纯白嫩初高生在线观看91 | 精品国产123| 亚洲电影欧美电影有声小说| 成人精品免费看| 欧美岛国在线观看| 亚洲成av人综合在线观看| 94色蜜桃网一区二区三区| 久久久91精品国产一区二区三区| 五月婷婷色综合| 一本大道久久a久久综合婷婷 | 成人免费毛片嘿嘿连载视频| 欧美大胆人体bbbb| 偷拍一区二区三区四区| 色94色欧美sute亚洲线路二| 中国av一区二区三区| 国产一区二区三区四区五区美女 | 国产在线精品国自产拍免费| 欧美精品九九99久久| 亚洲国产综合在线| 一本久久a久久精品亚洲| 国产日韩影视精品| 国内精品久久久久影院薰衣草| 日韩视频在线一区二区| 午夜国产精品一区| 欧美精品1区2区3区| 亚洲一区二区高清| 欧美三区在线观看| 亚洲香肠在线观看| 欧美日韩精品欧美日韩精品| 亚洲一区二区欧美日韩| 欧美日韩综合色| 亚洲高清免费视频| 欧美日韩不卡在线| 日韩中文欧美在线| 欧美一区三区二区| 日韩国产一区二| 日韩一区二区电影| 久久国产麻豆精品| 精品日韩99亚洲| 国产成人免费在线观看不卡| 国产亚洲精久久久久久| 国产黄色91视频| 日本一区二区三区免费乱视频| 国产激情精品久久久第一区二区| 国产香蕉久久精品综合网| 国产999精品久久| 国产精品国产馆在线真实露脸| 不卡的电影网站| 亚洲激情自拍视频| 欧美色倩网站大全免费| 日韩精品欧美精品| 日韩免费高清视频| 高清不卡在线观看av| 亚洲欧美在线观看| 欧美亚洲国产一区二区三区va| 视频一区视频二区中文字幕| 欧美电影免费观看高清完整版在线观看| 久久er精品视频| 亚洲国产精品国自产拍av| 91蜜桃视频在线| 丝袜a∨在线一区二区三区不卡| 日韩一区二区在线播放| 国产伦精品一区二区三区视频青涩| 国产精品网友自拍| 欧美视频你懂的| 精品一区二区三区免费| 国产精品国产馆在线真实露脸 | 亚洲成国产人片在线观看| 日韩女同互慰一区二区| 国产成人亚洲综合a∨婷婷图片| 最新高清无码专区| 欧美精品xxxxbbbb| 国产成人av电影在线观看| 中文字幕视频一区| 欧美精品色综合| 国产精品一二三四| 一区二区免费视频| 欧美成人午夜电影| 成人av手机在线观看| 亚洲成人精品在线观看| 2020国产精品自拍| 欧美在线一二三四区| 精品一区二区av| 亚洲人成网站在线| 日韩一级片网址| va亚洲va日韩不卡在线观看| 五月综合激情网| 国产精品网站在线观看| 欧美一区二区三区性视频| av高清不卡在线| 秋霞影院一区二区| 成人欧美一区二区三区视频网页| 欧美一区二区视频在线观看2020| 粉嫩高潮美女一区二区三区| 日韩 欧美一区二区三区| 亚洲欧美在线视频观看| 精品人在线二区三区| 色菇凉天天综合网| 国产精品888| 视频在线观看91| 亚洲欧美偷拍三级| 久久精品网站免费观看| 欧美色中文字幕| 成人污污视频在线观看| 毛片av一区二区| 亚洲高清免费观看高清完整版在线观看| 国产拍欧美日韩视频二区 | 国产高清久久久| 日韩电影免费在线| 亚洲天堂a在线| 久久精品日产第一区二区三区高清版| 欧美午夜理伦三级在线观看| 成人毛片老司机大片| 久久精品国产一区二区三区免费看 | 国产精选一区二区三区| 天天做天天摸天天爽国产一区| 国产精品免费视频观看| 久久综合久久久久88| 在线不卡中文字幕播放| 在线观看视频欧美| 91浏览器在线视频| 99精品视频在线免费观看| 国产成人综合精品三级| 久久福利视频一区二区| 丝瓜av网站精品一区二区| 一级日本不卡的影视| 国产精品不卡视频| 亚洲国产成人午夜在线一区 | 国产精品99久| 久草这里只有精品视频| 欧美bbbbb| 午夜不卡av在线| 香蕉久久夜色精品国产使用方法| 亚洲乱码国产乱码精品精可以看 | 91在线观看免费视频| 波多野结衣一区二区三区 | 亚洲欧洲国产专区| 欧美国产日韩精品免费观看| 久久久精品国产99久久精品芒果| 日韩视频在线一区二区| 日韩欧美二区三区| 日韩欧美一区二区免费| 日韩欧美区一区二| www久久精品| 日本一区二区三区四区| 国产精品麻豆久久久| 国产精品久久久久久久久免费桃花| 国产精品久久久久久久蜜臀| 国产精品成人免费精品自在线观看| 国产精品国产精品国产专区不片| 日韩一区在线看| 一区二区在线观看不卡| 亚洲一区二区欧美激情| 日韩影视精彩在线| 捆绑调教一区二区三区| 国产露脸91国语对白| 国产成+人+日韩+欧美+亚洲| 成人一区二区在线观看| av动漫一区二区| 欧美午夜精品一区二区三区| 777色狠狠一区二区三区| 欧美精三区欧美精三区| 日韩视频不卡中文|