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

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

?? ch05.htm

?? 英文VC快速教程,手把手教學,真的24節課程可以完全自學VC,達到入門級水平
?? HTM
?? 第 1 頁 / 共 3 頁
字號:
<H3><FONT COLOR="#000077"><B>What Are Radio Buttons?</B></FONT></H3>
<P>Radio buttons are used when a selection must be made from several mutually exclusive
options, such as a user's gender. Only one of the radio buttons, which usually are
grouped together, is checked at any particular time.
<H3><FONT COLOR="#000077"><B>What Are Check Boxes?</B></FONT></H3>
<P>Check boxes are used as Boolean flags that indicate whether a particular condition
is <TT>true</TT> or <TT>false</TT>. Unlike radio buttons, several check boxes in
a group can be checked. Optionally, a check box can support a third state--disabled--meaning
that the control is neither <TT>true</TT> nor <TT>false</TT>.
<H3><FONT COLOR="#000077"><B>What Are Group Boxes?</B></FONT></H3>
<P>A group box logically groups controls that are used for similar purposes. This
helps the user understand the relationships between controls and makes a dialog box
easier to use. Radio buttons are almost always enclosed in a group box so that it's
obvious which controls are associated with each other.
<H3><FONT COLOR="#000077"><B>MFC Support for Buttons</B></FONT></H3>
<P>Button controls normally are created as part of a dialog box. After you add a
button to a dialog box, you can use ClassWizard to add functions that can be used
to handle events created when the button is pressed, checked, or selected. You also
use ClassWizard to create <TT>CButton</TT> objects that are associated with individual
button controls.</P>
<P>You can use the MFC class <TT>CButton</TT> to interact with button controls--both
buttons that have been added to a dialog box resource and buttons that have been
created dynamically. Use ClassWizard to associate a button control with a specific
<TT>CButton</TT> object.
<H3><FONT COLOR="#000077"><B>A Sample Project Using Buttons</B></FONT></H3>
<P>In order to see how button controls can be used with dialog boxes, create a dialog
box-based project named Button using AppWizard, following the steps provided in Hour
4, &quot;Dialog Boxes and C++ Classes.&quot; You will use this project for the rest
of this hour as an example of how to use buttons in a dialog box.</P>
<P>Click the ResourceView tab in the project workspace. Open the dialog box editor
by double-clicking the <TT>IDD_BUTTON_DIALOG</TT> icon in the Dialog resource folder.</P>
<P>The <TT>IDD_BUTTON_DIALOG</TT> dialog box is displayed in the dialog box editor,
along with a dockable control toolbar or palette. The floating control palette contains
all the controls available for a dialog box, as shown in Figure 5.1.</P>
<P><A NAME="01"></A><A HREF="01.htm" tppabs="http://www.mcp.com/824169600/0-672/0-672-31242-5/ch05/01.htm"><B>Figure 5.1.</B></A> <I><BR>
The floating control palette, showing the buttons and boxes needed to create basic
dialog boxes.</I></P>
<P>There are four different icons on the control palette for buttons, each used for
a particular button type. Use one of the following steps to add a button control
to a dialog box:

<UL>
	<LI>Drag a button control from the palette to the dialog box by pressing the left
	mouse button while over the control button, then dragging the mouse cursor to the
	dialog box with the left mouse button still pressed. Release the mouse button when
	the cursor is over the desired spot in the dialog box.<BR>
	<BR>
	
	<LI>Select a button control by clicking a control in the control palette. Click the
	desired location for the control in the dialog box, and the dialog box editor creates
	a control for you in that location.
</UL>

<P>These steps apply for all controls in the control palette. After you've added
a control to the dialog box, you can use the mouse to reposition and resize it.</P>
<P>As a demonstration, add several buttons to the main dialog box used in the Button
project. You will use these controls later this hour to demonstrate button events.
Refer to Figure 5.2 for the location of the added buttons.</P>
<P><A NAME="02"></A><A HREF="02.htm" tppabs="http://www.mcp.com/824169600/0-672/0-672-31242-5/ch05/02.htm"><B>Figure 5.2.</B></A> <I><BR>
The main dialog box used by the Button project.</I></P>
<P>A total of five buttons are added to <TT>IDD_BUTTON_DIALOG</TT>. Use the values
from Table 5.1 to set the properties for each control. Except for the ID and caption,
all controls use the default set of properties.
<H4><FONT COLOR="#000077">Table 5.1. Values used for controls in IDD_BUTTON_DIALOG.</FONT></H4>
<P>
<TABLE BORDER="1">
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT"><B>Control ID</B></TD>
		<TD ALIGN="LEFT"><B>Button Type</B></TD>
		<TD ALIGN="LEFT"><B>Caption</B></TD>
	</TR>
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT"><TT>IDC_BTN_TEST</TT></TD>
		<TD ALIGN="LEFT">Pushbutton</TD>
		<TD ALIGN="LEFT">&amp;Test</TD>
	</TR>
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT"><TT>IDC_RADIO_HIGH</TT></TD>
		<TD ALIGN="LEFT">Radio button</TD>
		<TD ALIGN="LEFT">&amp;High</TD>
	</TR>
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT"><TT>IDC_RADIO_LOW</TT></TD>
		<TD ALIGN="LEFT">Radio button</TD>
		<TD ALIGN="LEFT">&amp;Low</TD>
	</TR>
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT"><TT>IDC_GROUP_VOLUME</TT></TD>
		<TD ALIGN="LEFT">Group control</TD>
		<TD ALIGN="LEFT">&amp;Volume</TD>
	</TR>
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT"><TT>IDC_CHECK_AMP</TT></TD>
		<TD ALIGN="LEFT">Check box</TD>
		<TD ALIGN="LEFT">&amp;Amplified</TD>
	</TR>
</TABLE>

<H4><FONT COLOR="#000077">Button Control Properties</FONT></H4>
<P>Like all controls, buttons have a set of properties that define the behavior of
each control. Although there are four different types of button controls, they share
a common set of properties. You can display the properties for a particular control
by selecting Properties from the menu displayed when you right-click the control.
These properties are shared by all button controls:

<UL>
	<LI>ID: Used for the button's resource ID. A default resource ID, such as <TT>IDC_BUTTON1</TT>,
	is supplied by Developer Studio. Using <TT>IDC_</TT> as a prefix for control resource
	IDs is a Microsoft naming convention.<BR>
	<BR>
	
	<LI>Caption: Indicates the text that appears as the button's label. Developer Studio
	supplies a default name, such as Button. To make one of the letters in the caption
	of a control the mnemonic key, precede it with an ampersand (&amp;).<BR>
	<BR>
	
	<LI>Visible: Indicates that the button is initially visible. This check box is normally
	checked.<BR>
	<BR>
	
	<LI>Disabled: Indicates that the button should be initially disabled. This check
	box is normally cleared.<BR>
	<BR>
	
	<LI>Group: Marks the first control in a group. All controls following a control with
	this attribute are considered part of the same group if this check box is cleared.
	A user can move between controls in the same group using the arrow keys.<BR>
	<BR>
	
	<LI>Tab Stop: Indicates that this control can be reached by pressing Tab on the keyboard.
	This check box is normally checked.<BR>
	<BR>
	
	<LI>Default Button: Marks this control as the dialog box's default button. There
	can be only one default button in a dialog box, and it is executed if the user presses
	Enter without using any other controls in the dialog box. This check box is normally
	cleared.<BR>
	<BR>
	
	<LI>Owner Draw: Indicates that the button will be drawn by the button's owner; in
	this case, the dialog box. In most cases, this check box is cleared.
</UL>

<P>Group boxes support the fewest properties of any button control. All button properties
are supported except <TT>Default Button</TT> and <TT>Owner Draw</TT>.</P>
<P>Radio buttons do not use the default button property because they aren't used
as default buttons. However, radio buttons do support two properties not used by
pushbutton controls:

<UL>
	<LI>Auto: Automatically changes the state of the control when it is selected. This
	check box is normally selected.<BR>
	<BR>
	
	<LI>Left Text: Places the control's label on the left side of the check box instead
	of the right. This check box is normally cleared.
</UL>

<P>Check boxes support the same properties as radio controls, except that they are
used with one additional attribute:

<UL>
	<LI>Tri-state: The check box can have three states instead of two. In addition to
	<TT>true</TT> and <TT>false</TT>, the control can be disabled, meaning that the value
	is neither <TT>true</TT> nor <TT>false</TT>.
</UL>

<P>In addition, all controls have a property page that is labeled Extended Styles.
These styles are rarely used, and aren't discussed in this book.
<H4><FONT COLOR="#000077">Using Standard Pushbutton Layouts in Your Dialog Boxes</FONT></H4>
<P>Several pushbuttons are commonly used in dialog boxes that contain controls. Because
each of these pushbuttons carries a specific meaning, you should try to use the standard
terminology whenever possible because it minimizes the amount of work required for
users of your programs. Here are the standard meanings for these buttons:

<UL>
	<LI>OK: Used to close and accept any information that is present in the dialog box.
	Any user-supplied information in the dialog box is used by the program. Note that
	the OK pushbutton is the only button spelled with all capital letters.<BR>
	<BR>
	
	<LI>Cancel: Used to close the dialog box and remove any changes that might have been
	performed while the dialog box was open. If there are changes that cannot be reversed,
	the label for this button should be changed to read Close. Changing the label for
	a button is discussed later in this hour.<BR>
	<BR>
	
	<LI>Close: Used to close the dialog box. It does not necessarily imply that any action
	is taken by the program. Close is most often used when a Cancel button cannot be
	used to remove changes made while the dialog box is open. Many programs change a
	Cancel button into a Close button.<BR>
	<BR>
	
	<LI>Help: Used to request context-sensitive help for the open dialog box.<BR>
	<BR>
	
	<LI>Apply: Used to perform changes based on data that has been entered in the dialog
	box. Unlike the OK button, the dialog box should remain open after the Apply button
	is pressed.
</UL>

<H2><FONT COLOR="#000077"><B>Binding a Button Control to a <TT>CButton</TT> Object</B></FONT></H2>
<P>The easiest way to set or retrieve the value of a control is to associate it with
a class-member variable using ClassWizard. When associating a member variable with
a control, you can associate the member variable either with the control or with
the control's value. Member variables representing buttons are rarely associated
by value; instead, the <TT>CButton</TT> class is used to represent most button controls.
You will learn about associating member variables by value with dialog box controls
in Hour 6, &quot;Using Edit Controls.&quot;</P>
<P>To add a member variable to a <TT>CDialog</TT>-derived class, follow these steps:

<DL>
	<DD>1. Open ClassWizard.<BR>
	<BR>
	2. Select the tab labeled Member Variables.<BR>
	<BR>
	3. Select the <TT>CDialog</TT>-derived class that manages the dialog box; in this
	case, <TT>CButtonDlg</TT>.<BR>
	<BR>
	4. Select the control ID representing the control associated with the new member
	variable.<BR>
	<BR>
	5. Press the button labeled Add Variable. An Add Member Variable dialog box appears.
	<BR>
	Enter the control's name, category, and variable type, then press OK.<BR>
	<BR>
	6. Close ClassWizard.
</DL>

<P>Follow these steps for all controls added to the <TT>IDD_BUTTON_DIALOG</TT> earlier.
Use the values from Table 5.2 for each new member variable added to <TT>CButtonDlg</TT>.
<H4><FONT COLOR="#000077">Table 5.2. Values used to add member variables for CButtonDlg.</FONT></H4>
<P>
<TABLE BORDER="1">
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT"><B>Control ID</B></TD>
		<TD ALIGN="LEFT"><B>Variable Name</B></TD>
		<TD ALIGN="LEFT"><B>Category</B></TD>
		<TD ALIGN="LEFT"><B>Type</B></TD>
	</TR>
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT"><TT>IDC_BTN_TEST</TT></TD>
		<TD ALIGN="LEFT"><TT>m_btnTest</TT></TD>
		<TD ALIGN="LEFT">Control</TD>
		<TD ALIGN="LEFT"><TT>CButton</TT></TD>
	</TR>
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT"><TT>IDC_GROUP_VOLUME</TT></TD>
		<TD ALIGN="LEFT"><TT>m_btnVolume</TT></TD>
		<TD ALIGN="LEFT">Control</TD>
		<TD ALIGN="LEFT"><TT>CButton</TT></TD>
	</TR>
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT"><TT>IDC_CHECK_AMP</TT></TD>
		<TD ALIGN="LEFT"><TT>m_btnAmp</TT></TD>
		<TD ALIGN="LEFT">Control</TD>
		<TD ALIGN="LEFT"><TT>CButton</TT></TD>
	</TR>
</TABLE>
</P>
<P>ClassWizard automatically adds the member variables to the <TT>CButtonDlg</TT>
class declaration for you.
<H3><FONT COLOR="#000077"><B>Adding Button Events to a Dialog Box Class</B></FONT></H3>
<P>Although the buttons are part of the dialog box resource and appear whenever the

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色婷婷国产精品久久包臀| 自拍偷在线精品自拍偷无码专区 | 看电影不卡的网站| www.欧美色图| 欧美精品一区二区高清在线观看 | 91成人在线精品| www国产成人| 蜜桃视频在线观看一区二区| 色综合久久88色综合天天免费| 欧美成人r级一区二区三区| 亚洲国产精品人人做人人爽| www.欧美日韩| 国产视频一区在线观看| 老司机免费视频一区二区| 欧美女孩性生活视频| 亚洲精品中文在线影院| 成人免费毛片片v| 久久九九久久九九| 狠狠色丁香久久婷婷综合_中 | 久久精品夜夜夜夜久久| 老汉av免费一区二区三区| 337p亚洲精品色噜噜狠狠| 一区二区视频免费在线观看| www.日韩av| 国产精品伦理在线| 成人性生交大片| 日本一区二区三区在线观看| 国产精品一区二区91| 久久婷婷国产综合国色天香| 久久精品国产亚洲a| 日韩免费成人网| 久久电影网站中文字幕| 精品美女在线观看| 久久91精品国产91久久小草| 日韩欧美美女一区二区三区| 青青草97国产精品免费观看无弹窗版 | 欧美性一二三区| 亚洲电影欧美电影有声小说| 欧美精品黑人性xxxx| 蜜桃视频免费观看一区| 欧美精品一区二区三区久久久| 国产在线视频一区二区三区| 久久亚洲春色中文字幕久久久| 国产一区二区三区蝌蚪| 中文字幕高清不卡| 91国偷自产一区二区使用方法| 亚洲成人中文在线| 日韩视频免费观看高清在线视频| 久久国产欧美日韩精品| 中文字幕精品一区二区精品绿巨人| 99精品国产视频| 亚洲欧美色一区| 欧美一级午夜免费电影| 高清不卡一二三区| 亚洲欧美偷拍卡通变态| 日韩一区二区在线播放| 国产老妇另类xxxxx| 亚洲精品国产第一综合99久久| 欧美性三三影院| 国产美女在线观看一区| 亚洲图片欧美激情| 欧美一级一级性生活免费录像| 懂色av一区二区夜夜嗨| 亚洲午夜在线电影| 久久久精品综合| 欧美视频一区在线| 国产·精品毛片| 午夜精品123| 中文在线资源观看网站视频免费不卡 | 精品一区二区日韩| 亚洲精品视频在线观看网站| 日韩午夜在线观看| 99re热这里只有精品免费视频| 日韩中文字幕不卡| 亚洲欧洲av色图| 欧美v国产在线一区二区三区| 91一区一区三区| 极品美女销魂一区二区三区 | 国产视频在线观看一区二区三区| 91精品福利视频| 国产专区欧美精品| 日韩电影在线观看电影| 中文字幕一区三区| 久久这里都是精品| 欧美日韩高清一区二区| av综合在线播放| 国内成人自拍视频| 日韩精品视频网站| 怡红院av一区二区三区| 久久精品一区二区三区不卡牛牛| 欧美精品粉嫩高潮一区二区| 99re这里只有精品视频首页| 国产一区在线观看麻豆| 日韩在线观看一区二区| 一区二区三区欧美亚洲| 国产精品国产三级国产专播品爱网| 日韩一区国产二区欧美三区| 欧美体内she精视频| 99久久亚洲一区二区三区青草| 久久99热这里只有精品| 日韩高清一级片| 亚洲午夜激情av| 一区二区三区免费网站| 亚洲色图在线视频| 国产精品网站在线观看| 国产欧美日韩另类视频免费观看| 日韩欧美在线综合网| 8x8x8国产精品| 精品视频全国免费看| 色av一区二区| 在线免费精品视频| 在线欧美小视频| 欧美亚洲国产bt| 欧美日韩一卡二卡| 欧美mv日韩mv国产网站app| 欧亚洲嫩模精品一区三区| 一本色道a无线码一区v| 色呦呦国产精品| 91黄色小视频| 欧美日本乱大交xxxxx| 4438成人网| 亚洲精品一区二区三区在线观看 | 欧美日韩国产一二三| 欧美人xxxx| 日韩一区二区三区电影在线观看 | 成人午夜精品在线| av男人天堂一区| 日本道色综合久久| 51精品久久久久久久蜜臀| 日韩欧美在线网站| 国产日韩欧美电影| 伊人一区二区三区| 日日夜夜免费精品| 国产精品亚洲一区二区三区妖精 | 欧美精品一卡两卡| 2020国产精品| 国产精品毛片无遮挡高清| 专区另类欧美日韩| 婷婷久久综合九色国产成人| 奇米色一区二区| 国产成人亚洲精品青草天美| 91老司机福利 在线| 欧美视频在线播放| 久久中文字幕电影| 亚洲老妇xxxxxx| 久久69国产一区二区蜜臀| aa级大片欧美| 欧美一区二区三区四区久久| 亚洲国产成人午夜在线一区| 亚洲第一会所有码转帖| 国产福利精品一区| 欧美视频一二三区| 久久久精品日韩欧美| 亚洲第一成年网| 国产69精品久久99不卡| 欧美卡1卡2卡| 国产精品美女久久福利网站| 奇米精品一区二区三区四区| 99久久er热在这里只有精品15| 欧美一区二区视频免费观看| 综合久久给合久久狠狠狠97色| 日韩精品午夜视频| 色婷婷精品大在线视频| 久久久久久久久久久黄色| 亚洲永久精品国产| 成人黄色免费短视频| 精品国产伦理网| 亚洲第四色夜色| 91麻豆免费观看| 国产精品网站导航| 美腿丝袜亚洲综合| 欧美在线视频不卡| 国产精品久久久久婷婷| 精品一区中文字幕| 51精品视频一区二区三区| 国产精品福利一区二区| 免费黄网站欧美| 欧美一区永久视频免费观看| 一区二区三区欧美久久| av一区二区三区在线| 欧美国产日韩在线观看| 国产精品99久久久久久有的能看| 欧美日韩卡一卡二| 亚洲综合在线电影| 91丨porny丨国产| 欧美韩日一区二区三区| 国产精品一卡二| 久久夜色精品国产欧美乱极品| 蜜臀久久99精品久久久久宅男| 制服丝袜av成人在线看| 亚洲一区二区精品久久av| 色欲综合视频天天天| 亚洲三级电影网站| 91丨porny丨蝌蚪视频| 中文字幕一区二区三区色视频| 高清不卡在线观看| 亚洲三级在线免费观看| 91在线观看美女| 亚洲欧美日韩精品久久久久| 91在线视频免费观看|