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

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

?? ch16.htm

?? 一天之內(nèi)學(xué)會VC#. 主要介紹VC#的各種應(yīng)用和示例
?? HTM
?? 第 1 頁 / 共 2 頁
字號:
16.2 shows the Controls dialog box after you add the slider control.</P><P><A NAME="02"></A><A HREF="02.htm"><B>Figure 16.2.</B></A> <I><BR>The main dialog box from the Controls project after you add a slider.</I></P><P>Open the properties dialog box for the slider control and change the resourceID to <TT>IDC_SLIDER</TT>. All other properties can remain set to their default valuesfor now. In the next section, you learn about the properties offered for slider controls.<H3><FONT COLOR="#000077"><B>Slider Control Properties</B></FONT></H3><P>The Properties dialog box for a slider control contains many of the same optionsoffered for up-down controls, as well as a few that are exclusive to slider controls.The available options include the following:<UL>	<LI><I>ID</I> is used for the slider's resource ID. A default resource ID, such as	<TT>IDC_SLIDER1</TT>, is supplied by Developer Studio.<BR>	<BR>		<LI><I>Visible</I> is used to indicate that the control is initially visible. This	check box is usually checked.<BR>	<BR>		<LI><I>Disabled</I> is used to indicate the control should be initially disabled.	This check box is usually cleared.<BR>	<BR>		<LI><I>Group </I>is used to mark the first control in a group. This check box is	usually cleared.<BR>	<BR>		<LI><I>Tab Stop </I>indicates that this control can be reached by pressing Tab on	the keyboard. This check box is usually checked.<BR>	<BR>		<LI><I>Help ID </I>indicates that a context-sensitive help ID should be generated	for this control.<BR>	<BR>		<LI><I>Orientation</I> is used to specify if the slider is vertical or horizontal.	The default value is vertical.<BR>	<BR>		<LI><I>Point</I> is used to indicate the position of optional tick marks. There are	three options: Top/Left, Bottom/Right, or Both. The default value is Bottom/Right.<BR>	<BR>		<LI><I>Tick Marks</I> indicates that tick marks should be drawn for the slider. This	check box is usually cleared.<BR>	<BR>		<LI><I>Auto Ticks</I> indicates that tick marks should be drawn at intervals along	the slider control. This option check box is usually cleared.<BR>	<BR>		<LI><I>Enable Selection</I> enables the slider to be used to select a range of values.	This check box is usually cleared.<BR>	<BR>		<LI><I>Border</I> is used to specify that a border should be drawn around the control.	This check box is usually checked.</UL><P>In the next section, you use a slider to control a progress control. To preparefor that example, open the properties dialog box and make sure the following sliderproperties are selected:<UL>	<LI>Tick Marks	<LI>Auto Ticks	<LI>Enable Selection</UL><H2><FONT COLOR="#000077"><B>Using the Progress Control</B></FONT></H2><P>A progress control, also known as a progress bar, is commonly used to indicatethe progress of an operation and is usually filled from left to right as the operationis completed. You can also use progress controls to indicate temperature, water level,or similar measurements. In fact, an early term for this type of control was &quot;GasGauge,&quot; back in the old days when programmers had mules and most Windows programswere written in C.</P><P>Progress controls are used in Developer Studio to indicate the progress of savingor loading a project workspace. Progress controls are also used by the Windows Explorerwhen copying or moving files.<BLOCKQUOTE>	<P><HR><B> </B><FONT COLOR="#000077"><B>Just a Minute:</B></FONT><B> </B>Progress controls	are an easy way to give feedback to the user about the status of a task. Instead	of waiting an unknown length of time, the user can see what portion of a job has	yet to be completed. <HR></BLOCKQUOTE><P>A progress control is added to a dialog box in the same way as the up-down andslider controls discussed earlier. Using the Developer Studio dialog box editor,add a progress control to the Controls project main dialog box. Figure 16.3 showsthe main dialog box from the Controls project after the progress control has beenadded.</P><P><A NAME="03"></A><A HREF="03.htm"><B>Figure 16.3.</B> </A><I><BR>The Controls dialog box after adding the progress control.</I></P><P>After you add the control, open the properties dialog box and change the resourceID to <TT>IDC_PROGRESS</TT>. A progress control doesn't have optional propertiesother than those available on all controls:<UL>	<LI><I>ID</I> is used for the progress control's resource ID. A default resource	ID, such as <TT>IDC_PROGRESS1</TT>, is supplied by Developer Studio.<BR>	<BR>		<LI><I>Visible</I> is used to indicate that the control is initially visible. This	check box is usually checked.<BR>	<BR>		<LI><I>Disabled</I> is used to indicate the control should be initially disabled.	This check box is usually cleared.<BR>	<BR>		<LI><I>Group</I> is used to mark the first control in a group. This check box is	usually cleared.<BR>	<BR>		<LI><I>Tab Stop</I> indicates that this control can be reached by pressing Tab on	the keyboard. This check box is usually checked.<BR>	<BR>		<LI><I>Help ID</I> indicates that a context-sensitive help ID should be generated	for this control.<BR>	<BR>		<LI><I>Border</I> is used to specify that a border should be drawn around the control.	This check box is usually checked.</UL><P>For this example, you can set the progress control properties to their defaultvalues.<H3><FONT COLOR="#000077"><B>Using a Slider to Update a Progress Control</B></FONT></H3><P>In this section, you use the <TT>IDC_SLIDER</TT> slider control to change thevalue displayed by the progress control. Using ClassWizard, add two new member variablesassociated with the slider and progress controls to the <TT>CControlsDlg</TT> class.Use the values from Table 16.3 for the new controls.<H4><FONT COLOR="#000077">Table 16.3. Values for slider and progress control membervariables.</FONT></H4><P><TABLE BORDER="1">	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP"><B>Control ID</B></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><B>Variable Name</B></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><B>Category</B></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><B>Type</B></TD>	</TR>	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP"><TT>IDC_SLIDER</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>m_slider</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>Control</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>CSliderCtrl</TT></TD>	</TR>	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP"><TT>IDC_PROGRESS</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>m_progress</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>Control</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>CProgressCtrl</TT></TD>	</TR></TABLE><H3><FONT COLOR="#000077"><B>Initializing the Slider and Progress Controls</B></FONT></H3><P>The slider and progress controls must be initialized before you can use them.The <TT>CProgressCtrl</TT> and <TT>CSliderCtrl</TT> classes each provide a <TT>SetRange</TT>function that is used to set minimum and maximum values for their respective controls.</P><PRE><FONT COLOR="#0066FF"><TT>m_slider.SetRange( 0, 100 );</TT></FONT></PRE><P>The slider also enables tick marks to be placed along the slider control if theAutoticks check box has been selected. Use the <TT>SetTicFreq</TT> function to specifythe distance between each tick mark. To add tick marks every 10 positions, pass avalue of 10 to <TT>SetTicFreq</TT>.</P><PRE><FONT COLOR="#0066FF"><TT>m_slider.SetTicFreq( 10 );</TT></FONT></PRE><P>Listing 16.2 contains new source code for the initialization section of <TT>OnInitDialog</TT>.Add this source code just after the <TT>// TODO</TT> comment.<H4><FONT COLOR="#000077">TYPE: Listing 16.2. Initializing the controls in CControlsDlg::OnInitDialog.</FONT></H4><PRE><FONT COLOR="#0066FF"><TT>// TODO: Add extra initialization here</TT><TT>m_spin.SetRange( 0, 100 );</TT><TT>m_slider.SetRange( 0, 100 );</TT><TT>m_slider.SetTicFreq( 10 );</TT></FONT></PRE><P><TT>m_progress.SetRange( 0, 100 );</TT><H3><FONT COLOR="#000077"><B>Handling Messages from the Slider to the Progress Control</B></FONT></H3><P>When a slider is moved, it notifies its parent using <TT>WM_SCROLL</TT> and <TT>WM_HSCROLL</TT>messages. Because the slider in this example is a horizontal slider, it sends <TT>WM_HSCROLL</TT>messages to the main dialog box. Using ClassWizard, add a message-handling functionto the <TT>CControlsDlg</TT> class for the <TT>WM_HSCROLL</TT> message. The sourcecode for the <TT>OnHScroll</TT> function is provided in Listing 16.3.<H4><FONT COLOR="#000077">TYPE: Listing 16.3. Using slider scroll messages to updatethe progress control.</FONT></H4><PRE><FONT COLOR="#0066FF"><TT>void CControlsDlg::OnHScroll(UINT nSBCode, UINT nPos,</TT><TT>                             CScrollBar* pScrollBar )</TT><TT>{</TT><TT>    int nSliderPos = m_slider.GetPos();</TT><TT>    m_progress.SetPos( nSliderPos );</TT></FONT></PRE><P><TT>}</TT> The code in Listing 16.3 is called whenever the trackbar position ischanged. The <TT>CSliderCtrl::GetPos</TT> function is used to collect the currentslider position, which is then used to update the progress control using the <TT>CProgressCtrl::SetPos</TT>function.<BLOCKQUOTE>	<P><HR><B> </B><FONT COLOR="#000077"><B>Just a Minute:</B></FONT><B> </B>There are many	ways to use the progress control. Many times, you will update the progress control	after receiving events that you don't have direct control over. For example, when	copying a large number of files, your program might update a progress control after	copying each file. During an installation, you might want to update a progress control	after each phase of the installation is complete. <HR></BLOCKQUOTE><P>Compile and run the Controls project. You can adjust the value displayed in theprogress control by moving the slider control. The completed project is shown inFigure 16.4.</P><P><A NAME="04"></A><A HREF="04.htm"><B>Figure 16.4.</B> </A><BR><I>The finished Controls project.</I><H2><FONT COLOR="#000077"><B>Summary</B></FONT></H2><P>In this hour, you looked at up-down, slider, and progress controls, three of thesimpler controls offered by Windows. You examined the uses for each control and theMFC classes used to interact with them and created a small dialog box-based projectthat used all three controls.<H2><FONT COLOR="#000077"><B>Q&amp;A</B></FONT></H2><DL>	<DD><B>Q The up-down control is paired with the wrong control when I run my program--what's	wrong?</B><BR>	<BR>	<B>A</B> The up-down control must immediately follow the buddy control in the tab	order. If the tab order isn't set correctly, the up-down control will latch on to	whatever control precedes it. When you are working with your dialog box in Developer	Studio, press Ctrl+D to see the tab order.<BR>	<BR>	<B>Q Is there an easy way to increase the value displayed in the progress control	by a specific amount, rather than setting a new value?</B><BR>	<BR>	<B>A</B> Use <TT>CProgressCtrl</TT>'s <TT>OffsetPos</TT> function:</DL><BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF"><TT>void CMyDlg::OnBump()</TT><TT>{</TT><TT>    m_progress.OffsetPos(5);</TT><TT>}</TT></FONT></PRE></BLOCKQUOTE><PRE><FONT COLOR="#0066FF"><TT></TT></FONT></PRE><H2><FONT COLOR="#000077"><B>Workshop</B></FONT></H2><P>The Workshop is designed to help you anticipate possible questions, review whatyou've learned, and begin thinking ahead to putting your knowledge into practice.The answers to the quiz are in Appendix B, &quot;Quiz Answers.&quot;<H3><FONT COLOR="#000077"><B>Quiz</B></FONT></H3><DL>	<DD>1. What property is used to change the up-down control arrows to left-right instead	of up-down?<BR>	<BR>	2. What property is used to indicate that the up-down control is associated with	a buddy control?<BR>	<BR>	3. What function is used to set the limits of the up-down control?<BR>	<BR>	4. How do you specify which control is the buddy control?<BR>	<BR>	5. What property is used to add division lines on the slider control?<BR>	<BR>	6. What function is used to set the limits of the slider control?<BR>	<BR>	7. What function is used to set the limits of the progress control?</DL><H3><FONT COLOR="#000077"><B>Exercises</B></FONT></H3><DL>	<DD>1. Change the Controls project so that the value of the up-down control controls	the progress control.<BR>	<BR>	2. Experiment with changing the up-down control's alignment and orientation from	right to left, and from vertical to horizontal.<FONT COLOR="#000077"></FONT></DL><CENTER><P><HR><A HREF="../ch15/ch15.htm"><IMG SRC="../button/previous.gif" WIDTH="128" HEIGHT="28"ALIGN="BOTTOM" ALT="Previous chapter" BORDER="0"></A><A HREF="../ch17/ch17.htm"><IMGSRC="../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> <BR><BR><BR><IMG SRC="../button/corp.gif" WIDTH="284" HEIGHT="45" ALIGN="BOTTOM" ALT="Macmillan Computer Publishing USA"BORDER="0"></P><P>&copy; <A HREF="../copy.htm">Copyright</A>, Macmillan Computer Publishing. Allrights reserved.</CENTER></BODY></HTML>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品中文字幕一区| 欧美va亚洲va香蕉在线| 国产一区二区伦理片| 日本午夜一本久久久综合| 亚洲制服丝袜av| 最新国产成人在线观看| 亚洲人精品一区| 日韩一区欧美一区| 成人欧美一区二区三区小说| 国产精品毛片无遮挡高清| 国产精品美女久久久久久久久| 欧美激情一区不卡| 亚洲三级理论片| 亚洲国产精品综合小说图片区| 亚洲高清不卡在线| 美女久久久精品| 国产在线播放一区| 91网上在线视频| 欧美日韩一区小说| 日韩视频免费观看高清在线视频| 精品国产伦一区二区三区观看方式 | 亚洲成人免费影院| 日本不卡一区二区三区高清视频| 美国精品在线观看| 国产91精品一区二区麻豆网站 | 日产国产欧美视频一区精品| 日韩在线a电影| 九九视频精品免费| 国产一区二区不卡老阿姨| 成a人片亚洲日本久久| 欧洲亚洲精品在线| 精品99久久久久久| 夜夜操天天操亚洲| 黑人精品欧美一区二区蜜桃 | 1区2区3区国产精品| 亚洲一区二区三区三| 日韩不卡一区二区| eeuss影院一区二区三区| 欧美亚洲国产一区二区三区va| 日韩免费电影一区| 亚洲人成网站色在线观看| 久久激情五月激情| 99国产精品久久久久| 欧美一级欧美三级| 亚洲女同一区二区| 国产在线视视频有精品| 欧美日韩在线播| 中文字幕中文字幕中文字幕亚洲无线| 亚洲国产成人porn| av一区二区不卡| 精品国产乱码久久久久久图片| 一区二区国产盗摄色噜噜| 国产v综合v亚洲欧| 在线观看91av| 亚洲二区在线观看| 色哟哟亚洲精品| 中文字幕第一页久久| 国产在线精品不卡| 555夜色666亚洲国产免| 樱花影视一区二区| fc2成人免费人成在线观看播放| 精品99久久久久久| 欧美aa在线视频| 91精品国产综合久久久久久久 | 欧美视频你懂的| 亚洲精品视频免费观看| 成人免费精品视频| 国产免费成人在线视频| 国产一区二区三区精品欧美日韩一区二区三区 | 在线影院国内精品| 中文字幕在线观看不卡| 成人精品免费看| 欧美韩日一区二区三区| 国内精品伊人久久久久av影院| 欧美日韩国产小视频在线观看| 亚洲人xxxx| 99精品视频在线免费观看| 精品国产一区二区三区不卡| 亚洲乱码国产乱码精品精98午夜| av不卡一区二区三区| 亚洲国产精品黑人久久久| 国产激情一区二区三区四区| 日韩午夜激情av| 国内精品自线一区二区三区视频| 欧美mv日韩mv| 国产一区二区不卡老阿姨| 久久久久久久久久久久久久久99| 国产在线播放一区二区三区| 欧美变态tickle挠乳网站| 国产一区二区三区av电影 | 97久久精品人人澡人人爽| 国产精品久线观看视频| 99久久综合狠狠综合久久| 亚洲人成人一区二区在线观看| 色欧美88888久久久久久影院| 亚洲色图清纯唯美| 欧美美女bb生活片| 久久成人18免费观看| 亚洲国产精品传媒在线观看| 成人av在线一区二区三区| 一个色在线综合| 91麻豆精品国产91久久久久久| 秋霞午夜鲁丝一区二区老狼| 日韩一区二区三区电影在线观看| 国产在线不卡一区| 国产精品大尺度| 欧美丰满少妇xxxbbb| 精彩视频一区二区| 亚洲精品菠萝久久久久久久| 欧美老人xxxx18| 国产精品99久久久久久久vr | 午夜激情久久久| 久久九九99视频| 欧美视频日韩视频| 国内精品不卡在线| 亚洲乱码国产乱码精品精的特点 | 亚洲日本在线a| 91麻豆精品国产91久久久资源速度| 美腿丝袜在线亚洲一区| 亚洲色图制服诱惑| 精品国产第一区二区三区观看体验 | 久久精品免费在线观看| 日本韩国精品在线| 国产综合久久久久久久久久久久 | 欧美久久高跟鞋激| 成人免费高清在线观看| 天天操天天干天天综合网| 中文字幕av一区二区三区免费看| 欧美精品一二三四| 91在线porny国产在线看| 国产综合久久久久影院| 亚洲国产精品久久不卡毛片| 中文字幕av资源一区| 精品久久久久久久人人人人传媒| 成人一道本在线| 国产一区二区三区视频在线播放| 亚洲午夜免费视频| 亚洲欧洲在线观看av| 久久综合狠狠综合| 欧美一区二区黄色| 色婷婷国产精品久久包臀| 奇米影视一区二区三区| 午夜不卡av在线| 亚洲国产日韩在线一区模特| 中文欧美字幕免费| 久久久一区二区三区| 91精品国产丝袜白色高跟鞋| 欧美在线观看视频一区二区三区| 成人国产精品免费| 高清不卡一区二区| 韩国精品主播一区二区在线观看| 秋霞电影一区二区| 亚洲福利电影网| 亚洲电影一区二区三区| 亚洲精品欧美在线| 亚洲国产欧美在线人成| 亚洲大型综合色站| 婷婷国产在线综合| 美日韩一级片在线观看| 九九视频精品免费| 国产盗摄视频一区二区三区| 国产一区二区免费在线| 国产精一区二区三区| 国产一区二区按摩在线观看| 国产一区 二区 三区一级| 国产一区视频网站| 成人教育av在线| 91网上在线视频| 欧美精品 国产精品| 9191精品国产综合久久久久久| 717成人午夜免费福利电影| 欧美日韩成人综合| 欧美一区二区三区婷婷月色| 日韩久久久精品| 久久久综合视频| 中文一区一区三区高中清不卡| 国产精品毛片大码女人| 日韩毛片精品高清免费| 五月天激情综合| 日韩福利电影在线观看| 丰满放荡岳乱妇91ww| 国产一区999| 欧美曰成人黄网| 欧美一区二区三区在线| 久久久久久久久蜜桃| 亚洲欧美日韩在线不卡| 视频一区在线视频| 高清在线观看日韩| 欧美色视频在线观看| 日韩欧美国产综合在线一区二区三区 | 欧美日韩国产一级二级| 日韩精品一区在线| 亚洲精品一卡二卡| 亚洲午夜免费视频| 国产一区二区三区综合| 91国产丝袜在线播放| 日韩精品一区二区三区三区免费 | 久久久久久99精品| 一区二区三区久久| 国产精品一区一区|