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

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

?? ch02.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 2 -- Dialogs and Controls</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="../ch01/ch01.htm"><IMG SRC="../button/previous.gif" WIDTH="128" HEIGHT="28"
ALIGN="BOTTOM" ALT="Previous chapter" BORDER="0"></A><A HREF="../ch03/ch03.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>- 2 -</H1>

<H1>Dialogs and Controls</H1>
</CENTER>

<UL>
	<LI><A HREF="#Heading1">Understanding Dialog Boxes</A>
	<LI><A HREF="#Heading2">Creating a Dialog Box Resource</A>
	<UL>
		<LI><A HREF="#Heading3">Defining Dialog Box and Control IDs</A>
		<LI><A HREF="#Heading4">Creating the Sample Dialog Box</A>
	</UL>
	<LI><A HREF="#Heading5">Writing a Dialog Box Class</A>
	<LI><A HREF="#Heading6">Using the Dialog Box Class</A>
	<UL>
		<LI><A HREF="#Heading7">Arranging to Display the Dialog Box</A>
		<LI><A HREF="#Heading8">Behind the Scenes</A>
		<LI><A HREF="#Heading9">Using a List Box Control</A>
		<LI><A HREF="#Heading10">Using Radio Buttons</A>
	</UL>
</UL>

<P>
<HR SIZE="4">

<CENTER>
<H1><B></B></H1>
</CENTER>
<H2><A NAME="Heading1"></A>Understanding Dialog Boxes</H2>
<P>Windows programs have a graphical user interface. In the days of DOS, the program
could simply print a prompt onscreen and direct the user to enter whatever value
the program needed. With Windows, however, getting data from the user is not as simple,
and most user input is obtained from dialog boxes. For example, a user can give the
application details about a request by typing in edit boxes, choosing from list boxes,
selecting radio buttons, checking or unchecking check boxes, and more. These components
of a dialog box are called <I>controls</I>.</P>
<P>Chances are that your Windows application will have several dialog boxes, each
designed to retrieve a specific type of information from your user. For each dialog
box that appears onscreen, there are two entities you need to develop: a <I>dialog
box resource</I> and a <I>dialog box</I> <I>class</I>.</P>
<P>The dialog box resource is used to draw the dialog box and its controls onscreen.
The class holds the values of the dialog box, and it is a member function of the
class that causes the dialog box to be drawn onscreen. They work together to achieve
the overall effect: making communication with the program easier for your user.</P>
<P>You build a dialog box resource with the resource editor, adding controls to it
and arranging them to make the control easy to use. Class Wizard then helps you to
create a dialog box class, typically derived from the MFC class CDialog, and to connect
the resource to the class. Usually, each control on the dialog box resource corresponds
to one member variable in the class. To display the dialog box, you call a member
function of the class. To set the control values to defaults before displaying the
dialog box, or to determine the values of the controls after the user is finished
with the box, you use the member variables of the class.</P>
<P>
<H2><A NAME="Heading2"></A>Creating a Dialog Box Resource</H2>
<P>The first step in adding a dialog box to your MFC application is creating the
dialog box resource, which acts as a sort of template for Windows. When Windows sees
the dialog box resource in your program, it uses the commands in the resource to
construct the dialog box for you.</P>
<P>In this chapter you learn to work with dialog boxes by adding one to a simple
application. Create an SDI application just as you did in Chapter 1, &quot;Building
Your First Windows Application,&quot; calling it simply SDI. You will create a dialog
box resource and a dialog box class for the application, write code to display the
dialog box, and write code to use the values entered by the user.</P>
<P>To create a dialog box resource, first open the application. Choose Insert, Resource
from Developer Studio's menu bar. The Insert Resource dialog box, shown in Figure
2.1, appears. Double-click Dialog in the Resource Type box. The dialog box editor
appears, as shown in Figure 2.2.</P>
<P>Bring up the Properties dialog box for the new dialog box by choosing View, Properties.
Change the caption to <B>Sample Dialog</B>, as shown in Figure 2.3. You'll be using
the Properties dialog box quite a lot as you work on this dialog box resource, so
pin it to the screen by clicking the pushpin in the upper-left corner.</P>
<P><A HREF="javascript:popUp('02uvc01.gif')"><B>FIG. 2.1</B></A><B> </B><I>Double-click
Dialog on the Insert Resource dialog box.</I></P>

<P><A HREF="javascript:popUp('02uvc02.gif')"><B>FIG. 2.2</B></A><B> </B><I>A brand
new dialog box resource has a title, an OK button, and a Cancel button.</I></P>

<P><A HREF="javascript:popUp('02uvc03.gif')"><B>FIG. 2.3</B></A><B> </B><I>Use the
Dialog Properties dialog box to change the title of the new dialog box.</I></P>

<P>The control palette shown at the far right of Figure 2.2 is used to add controls
to the dialog box resource. Dialog boxes are built and changed with a very visual
WYSIWYG interface. If you need a button on your dialog box, you grab one from the
control palette, drop it where you want it, and change the caption from Button1 to
Lookup, or Connect, or whatever you want the button to read. All the familiar Windows
controls are available for your dialog boxes:</P>
<P>

<UL>
	<LI><I>Static text. </I>Not really a control, this is used to label other controls
	such as edit boxes.
	<P>
	<LI><I>Edit box.</I> Single line or multiline, this is a place for users to type
	strings or numbers as input to the program. Read-only edit boxes are used to display
	text.
	<P>
	<LI><I>Button. </I>Every dialog box starts with OK and Cancel buttons, but you can
	add as many of your own as you want.
	<P>
	<LI><I>Check box.</I> You use this control to set options on or off; each option
	can be selected or deselected independently.
	<P>
	<LI><I>Radio button. </I>You use this to select only one of a number of related options.
	Selecting one button deselects the rest.
	<P>
	<LI><I>List box.</I> You use this box type to select one item from a list hardcoded
	into the dialog box or filled in by the program as the dialog box is created. The
	user cannot type in the selection area.
	<P>
	<LI><I>Combo box.</I> A combination of an edit box and a list box, this control enables
	users to select from a list or type their response, if the one they want isn't on
	the list.
</UL>

<P>The sample application in this chapter is going to have a dialog box with a selection
of controls on it, to demonstrate the way they are used.</P>
<P>
<H3><A NAME="Heading3"></A>Defining Dialog Box and Control IDs</H3>
<P>Because dialog boxes are often unique to an application (with the exception of
the common dialog boxes), you almost always create your own IDs for both the dialog
box and the controls it contains. You can, if you want, accept the default IDs that
the dialog box editor creates for you. However, these IDs are generic (for example,
IDD_DIALOG1, IDC_EDIT1, IDC_RADIO1, and so on), so you'll probably want to change
them to something more specific. In any case, as you can tell from the default IDs,
a dialog box's ID usually begins with the prefix IDD, and control IDs usually begin
with the prefix IDC. You change these IDs in the Properties dialog box: Click the
control (or the dialog box background to select the entire background), and choose
View, Properties unless the Properties dialog box is already pinned in place; then
change the resource ID to a descriptive name that starts with IDD for a dialog and
IDC for a control.</P>
<P>
<H3><A NAME="Heading4"></A>Creating the Sample Dialog Box</H3>
<P>Click the Edit box button on the control palette, and then click in the upper-left
corner of the dialog box to place the edit box. If necessary, grab a moving handle
and move it until it is in approximately the same place as the edit box in Figure
2.4. Normally, you would change the ID from Edit1, but for this sample leave it unchanged.</P>
<P><A HREF="javascript:popUp('02uvc04.gif')"><B>FIG. 2.4</B></A><B> </B><I>You can
build a simple dialog box quickly in the resource editor.</I></P>

<P><I></I>


<BLOCKQUOTE>
	<P>
<HR>
<strong>TIP:</strong> If you aren't sure which control palette button inserts an edit box
	(or any other type of control), just hold the pointer still over one of the buttons
	for a short time. A ToolTip will appear, reminding you of the name of the control
	associated with the button. Move the pointer from button to button until you find
	the one for the edit box.
<HR>


</BLOCKQUOTE>

<P>Add a check box and three radio buttons to the dialog box so that it resembles
Figure 2.4. Change the captions on the radio buttons to <B>One</B>, <B>Two</B>, and
<B>Three</B>. To align all these controls, click one, and then while holding down
the Ctrl key, click each of the rest of them. Choose Layout, Align, Left, and if
necessary drag the stack of controls over with the mouse while they are all selected.
Then choose Layout, Space Evenly, Down, to adjust the vertical spacing.</P>


<BLOCKQUOTE>
	<P>
<HR>
<strong>TIP:</strong> The commands on the Layout menu are also on the Dialog toolbar, which
	appears at the bottom of your screen while you are using the resource editor. The
	toolbar symbols are repeated on the menu to help you learn which button is associated
	with each menu item.
<HR>


</BLOCKQUOTE>

<P>Click the One radio button again and bring up the Properties dialog box. Select
the Group check box. This indicates that this is the first of a group of buttons.
When you select a radio button, all the other buttons in the group are deselected.</P>
<P>Add a list box to the dialog box, to the right of the radio buttons, and resize
it to match Figure 2.4. With the list box highlighted, choose View, Properties to
bring up the Properties dialog box if it is not still pinned in place. Select the
Styles tab and make sure that the Sort box is not selected. When this box is selected,
the strings in your list box are automatically presented in alphabetical order. For
this application, they should be presented in the order that they are added.</P>
<P>
<H2><A NAME="Heading5"></A>Writing a Dialog Box Class</H2>
<P>When the resource is complete, bring up ClassWizard by choosing View, ClassWizard.
ClassWizard recognizes that this new dialog box resource does not have a class associated
with it and offers to build one for you, as shown in Figure 2.5. Leave the Create
a New Class radio button selected, and click OK. The New Class dialog box appears,
as shown in Figure 2.6. Fill in the classname as <B>CSdiDialog</B> and click OK.
ClassWizard creates a new class, prepares the source file (SdiDialog.cpp) and header
file (SdiDialog.h), and adds them to your project.</P>
<P><A HREF="javascript:popUp('02uvc05.gif')"><B>FIG. 2.5</B></A><B> </B><I>ClassWizard
makes sure you don't forget to create a class to go with your new dialog box resource.</I></P>

<P>You connect the dialog box resources to your code with the Member Variables tab
of ClassWizard, shown in Figure 2.7. Click IDC_CHECK1 and then click the Add Variable
button. This brings up the Add Member Variable dialog box, shown in Figure 2.8.</P>
<P><A HREF="javascript:popUp('02uvc06.gif')"><B>FIG. 2.6</B></A><B> </B><I>Creating
a dialog box class is simple with ClassWizard.</I></P>

<P><A HREF="javascript:popUp('02uvc07.gif')"><B>FIG. 2.7</B></A><B> </B><I>The Member
Variables tab of ClassWizard connects dialog box controls to dialog box class member
variables.</I></P>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本道色综合久久| 欧美日韩极品在线观看一区| 日韩黄色小视频| 婷婷综合另类小说色区| 一级精品视频在线观看宜春院| 国产精品视频线看| 成人欧美一区二区三区1314 | 一区二区三区四区中文字幕| 欧美激情在线一区二区三区| 国产精品久久久久天堂| 亚洲欧美一区二区三区久本道91| 亚洲欧美日韩综合aⅴ视频| 一区二区三区av电影| 亚洲香蕉伊在人在线观| 午夜免费久久看| 免费xxxx性欧美18vr| 精品一区二区三区久久| 成人国产亚洲欧美成人综合网| 成人免费不卡视频| 欧美在线高清视频| 欧美电影免费观看高清完整版在线观看| 欧美美女激情18p| www久久久久| 亚洲精品一卡二卡| 蜜臀av在线播放一区二区三区| 国产原创一区二区| 91久久国产最好的精华液| 欧美一区二区视频网站| 国产午夜精品美女毛片视频| 日韩理论在线观看| 美女视频黄a大片欧美| 成人一区二区视频| 欧美亚洲动漫精品| 国产亚洲精品超碰| 亚洲成人免费看| 国产91在线观看丝袜| 欧美亚洲国产一区在线观看网站| 日韩精品一区二区三区在线观看| 国产精品婷婷午夜在线观看| 亚洲成av人影院在线观看网| 国产剧情一区在线| 欧美日韩视频不卡| 国产精品日韩成人| 久久精品国产99久久6| 99精品久久久久久| 337p粉嫩大胆噜噜噜噜噜91av| 日本va欧美va精品| 99久久精品免费观看| 欧美tickle裸体挠脚心vk| 日韩美女精品在线| 国产精品18久久久久久vr| 欧美日韩综合在线| 国产夜色精品一区二区av| 亚洲尤物在线视频观看| voyeur盗摄精品| 久久精品人人做人人爽人人| 午夜成人免费电影| 91色视频在线| 国产精品视频一区二区三区不卡| 久久99久国产精品黄毛片色诱| 色婷婷av一区二区三区软件| 国产精品色眯眯| 国产成人午夜视频| 久久综合九色综合97_久久久| 丝袜亚洲另类丝袜在线| 91国产免费看| 一区二区三区在线观看欧美| 91美女在线视频| ...xxx性欧美| 91色porny| 亚洲视频在线一区二区| 91亚洲精品一区二区乱码| 中文字幕精品三区| 成人aa视频在线观看| 国产欧美一区二区精品婷婷| 开心九九激情九九欧美日韩精美视频电影 | 欧美日韩亚洲高清一区二区| 一二三区精品视频| 欧美日韩亚洲综合一区 | 日韩一区二区三区视频| 日本欧美久久久久免费播放网| 在线成人免费视频| 日本一不卡视频| 精品乱人伦一区二区三区| 国产一区二区调教| 国产精品乱码一区二三区小蝌蚪| 成人免费av资源| 亚洲精品老司机| 7777精品伊人久久久大香线蕉的 | 五月婷婷激情综合| 欧美精品久久久久久久多人混战| 五月天中文字幕一区二区| 7777精品伊人久久久大香线蕉 | 久久99久久久久| 久久精品亚洲国产奇米99| 国产盗摄精品一区二区三区在线| 国产喂奶挤奶一区二区三区 | 亚洲va在线va天堂| 日韩一区二区三区视频在线 | 亚洲精品欧美在线| 91麻豆精品国产无毒不卡在线观看| 欧美a级理论片| 国产精品情趣视频| 欧美亚洲一区二区在线| 久久超碰97中文字幕| 国产精品久久久久久久久搜平片 | 欧美一区二区三区视频在线观看| 国产在线视频精品一区| 日韩理论片在线| 欧美一区二区美女| 成人涩涩免费视频| 亚洲gay无套男同| 中文字幕av不卡| 欧美激情一区在线观看| 色噜噜夜夜夜综合网| 麻豆久久久久久| 亚洲女同ⅹxx女同tv| 日韩免费观看高清完整版| 国产a久久麻豆| 亚洲成a人v欧美综合天堂下载| 精品国产乱码久久久久久图片| 99riav久久精品riav| 久久国产乱子精品免费女| 亚洲免费观看高清完整版在线观看熊 | 欧美影院精品一区| 成人影视亚洲图片在线| 午夜不卡av免费| 亚洲欧美乱综合| 亚洲国产精品激情在线观看| 欧美男生操女生| 在线免费不卡视频| 成人短视频下载| 激情丁香综合五月| 日韩avvvv在线播放| 亚洲女人****多毛耸耸8| 国产亲近乱来精品视频| 精品福利一区二区三区 | 国产成人免费高清| 蜜桃精品视频在线观看| 亚洲成人免费在线观看| 亚洲人妖av一区二区| 国产精品久久久久久久久图文区| 久久老女人爱爱| 久久久久国产精品厨房| 日韩欧美亚洲另类制服综合在线| 欧美四级电影在线观看| 91浏览器打开| 91香蕉视频mp4| 不卡视频一二三| 不卡av在线网| 91免费观看视频在线| 成人午夜精品在线| 成人免费va视频| 色综合天天综合网国产成人综合天| 暴力调教一区二区三区| 成人三级在线视频| aaa国产一区| 色综合久久六月婷婷中文字幕| 国产成人在线视频网址| 国产成a人无v码亚洲福利| 国产一区二区三区在线观看免费视频 | 国产精品国产自产拍在线| 国产精品久久久久久久久免费桃花 | 91精品福利在线| 日本道精品一区二区三区| 在线看国产一区| 8v天堂国产在线一区二区| 制服视频三区第一页精品| 日韩一级完整毛片| 国产亚洲视频系列| 中文字幕五月欧美| 一区二区免费看| 亚洲午夜电影网| 蜜臀久久99精品久久久久宅男 | 亚洲视频在线一区观看| 一区二区三区不卡视频在线观看| 午夜婷婷国产麻豆精品| 久久国产欧美日韩精品| 成人动漫av在线| 欧美视频日韩视频| 91精品福利在线一区二区三区| 国产亚洲欧美色| 亚洲一区二区三区四区中文字幕 | 不卡视频免费播放| 欧美性色欧美a在线播放| 日韩欧美卡一卡二| 国产精品电影一区二区| 午夜精品久久久久久久| 激情综合色丁香一区二区| 99在线视频精品| 日韩欧美在线观看一区二区三区| 日本一区二区三区dvd视频在线| 亚洲综合一区二区三区| 韩国一区二区在线观看| 色婷婷狠狠综合| 久久久久成人黄色影片| 五月婷婷色综合| 粉嫩aⅴ一区二区三区四区| 9191成人精品久久| 中文无字幕一区二区三区|