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

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

?? ch14.htm

?? 24小時精通VC
?? HTM
?? 第 1 頁 / 共 3 頁
字號:
	</TR>	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP"><TT>IDI_HAND</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP">Stop sign icon</TD>	</TR>	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP"><TT>IDI_QUESTION</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP">Question mark icon</TD>	</TR>	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP"><TT>IDI_EXCLAMATION</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP">Exclamation point icon</TD>	</TR>	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP"><TT>IDI_ASTERISK</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP">Asterisk or information icon</TD>	</TR>	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP"><TT>IDI_WINLOGO</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP">Windows logo icon</TD>	</TR></TABLE></P><P>Using these cursors is similar to using stock objects. Listing 14.6 uses the <TT>IDC_UPARROW</TT>cursor in response to <TT>WM_SETCURSOR</TT>.<H4><FONT COLOR="#000077">TYPE: Listing 14.6. Using a standard Windows cursor.</FONT></H4><PRE><FONT COLOR="#0066FF"><TT>BOOL CAboutDlg::OnSetCursor(CWnd* pWnd, UINT nHitTest,</TT><TT>                            UINT message)</TT><TT>{</TT><TT>    // Load and set the new cursor. Return TRUE to stop</TT><TT>    // further processing of this message.</TT><TT>    CWinApp* pApp = AfxGetApp();</TT><TT>    HICON hIcon = pApp-&gt;LoadStandardCursor( IDC_UPARROW );</TT><TT>    SetCursor( hIcon );</TT><TT>    return TRUE;</TT><TT>}</TT></FONT></PRE><P>A cursor set in response to the <TT>WM_SETCURSOR</TT> message will interfere withthe remaining examples in the hour. After you are finished with this example, removethe <TT>OnSetCursor</TT> function using ClassWizard.<H3><FONT COLOR="#000077"><B>Changing the Cursor to the Hourglass</B></FONT></H3><BLOCKQUOTE>	<P><HR><B> </B><FONT COLOR="#000077"><B>Just a Minute:</B></FONT><B> </B>When a large amount	of processing is performed, ignoring input from the user is common. It's considered	good manners for a Windows program to change the cursor to an hourglass when user	input won't be acknowledged. <HR></BLOCKQUOTE><P>A common place to ignore user input is during long initialization routines. It'scommon to display a user interface but disregard user input until the initializationis complete. It can take several seconds before an application is ready for input,particularly in applications that work with large amounts of data that must be initialized.In these cases, you should use the <TT>BeginWaitCursor</TT> and <TT>EndWaitCursor</TT>functions.</P><P>To demonstrate how these functions are used, add a message-handling function tothe <TT>CAboutDlg</TT> class using ClassWizard. Add a message-handling function for<TT>WM_TIMER</TT>, and accept the default function name provided by ClassWizard.Listing 14.7 contains the source code for the <TT>OnInitDialog</TT> and <TT>OnTimer</TT>functions.<H4><FONT COLOR="#000077">TYPE: Listing 14.7. Modifying OnInitDialog and OnTimerto use the hourglass cursor.</FONT></H4><PRE><FONT COLOR="#0066FF"><TT>BOOL CAboutDlg::OnInitDialog()</TT><TT>{</TT><TT>    CDialog::OnInitDialog();</TT><TT>    CWinApp* pApp = AfxGetApp();</TT><TT>    if( pApp != 0 )</TT><TT>    {</TT><TT>        m_hIconOkay = pApp-&gt;LoadIcon( IDI_GREEN );</TT><TT>        m_hIconCancel = pApp-&gt;LoadIcon( IDI_RED );</TT><TT>        ASSERT(m_hIconOkay);</TT><TT>        ASSERT(m_hIconCancel);</TT><TT>        m_btnOkay.SetIcon( m_hIconOkay );</TT><TT>        m_btnCancel.SetIcon( m_hIconCancel );</TT><TT>    }</TT><TT>    SetCapture();</TT><TT>    BeginWaitCursor();</TT><TT>    SetTimer( 1, 15000, NULL );</TT><TT>    return TRUE;</TT><TT>}</TT><TT>void CAboutDlg::OnTimer(UINT nIDEvent)</TT><TT>{</TT><TT>    ReleaseCapture();</TT><TT>    EndWaitCursor();</TT><TT>    KillTimer( 1 );</TT><TT>}</TT></FONT></PRE><P>In Listing 14.7, the <TT>OnInitDialog</TT> function simulates the beginning ofa long processing period. The <TT>SetCapture</TT> and <TT>BeginWaitCursor</TT> functionsare called to change the cursor to an hourglass. While changed, the cursor cannotbe used to interact with any controls. A five-second timer is started, which callsthe <TT>OnTimer</TT> function when the timer expires. The <TT>OnTimer</TT> functionrestores the cursor and kills the timer.<BLOCKQUOTE>	<P><HR><B> </B><FONT COLOR="#000077"><B>Time Saver:</B></FONT><B> </B>The order of the statements	in <TT>OnInitDialog</TT> is important. Before calling <TT>BeginWaitCursor</TT>, the	mouse must be captured using <TT>SetCapture</TT>; otherwise, the hourglass cursor	immediately reverts to the arrow cursor. <HR></BLOCKQUOTE><H3><FONT COLOR="#000077"><B>Clipping a Cursor</B></FONT></H3><P>There are times when restricting a cursor to a single window is convenient. Thisis usually the case when you are working with error messages, or in other situationsin which you would like to force the user to make a selection. Forcing a cursor tostay with the boundaries of a single window is known as <I>clipping the cursor</I>.</P><P>As an example, force the cursor to stay over the Cursor project's About dialogbox. Using ClassWizard, add message-handling functions for <TT>WM_DESTROY</TT> and<TT>WM_MOVE</TT> to the <TT>CAboutDlg</TT> class. Add the source code in Listing14.8 to the <TT>CAbout::OnMove</TT> and <TT>CAbout::OnDestroy</TT> member functions.<H4><FONT COLOR="#000077">TYPE: Listing 14.8. Source code used to form a clippingregion for the cursor.</FONT></H4><PRE><FONT COLOR="#0066FF"><TT>void CAboutDlg::OnMove(int x, int y)</TT><TT>{</TT><TT>    CDialog::OnMove(x, y);</TT><TT>    CRect   rcCursor;</TT><TT>    GetWindowRect( rcCursor );</TT><TT>    ClipCursor( &amp;rcCursor );</TT><TT>}</TT><TT>void CAboutDlg::OnDestroy()</TT><TT>{</TT><TT>    ClipCursor( NULL );</TT><TT>    CDialog::OnDestroy();</TT><TT>}</TT></FONT></PRE><P>When the MFC framework creates the About dialog box and moves it to the centerof the view window, the <TT>WM_MOVE</TT> message is sent to the <TT>CAboutDlg</TT>class. Inside the <TT>OnMove</TT> function, the dialog box's screen coordinates areused to set the clipping rectangle for the cursor. When the dialog box is destroyed,the <TT>WM_DESTROY</TT> message is handled by the <TT>CAboutDlg::OnDestroy</TT> function,and the clipping rectangle is reset.<BLOCKQUOTE>	<P><HR><B> </B><FONT COLOR="#000077"><B>CAUTION:</B></FONT><B> </B>It is important to reset	the cursor clipping region by calling <TT>ClipCursor(NULL)</TT> when the window is	destroyed or when the clipping region is no longer needed. If this function isn't	called, the cursor will be restricted to the requested rectangle even after the window	has disappeared. <HR></BLOCKQUOTE><H2><FONT COLOR="#000077"><B>Summary</B></FONT></H2><P>In this hour you learned how to use icons in Windows programs. You learned howto change the main program icon, as well as child icons. You used a sample programto learn the functions used to load, draw, and destroy icon resources. You also learnedhow to use cursors to provide feedback when programming Windows applications.<H2><FONT COLOR="#000077"><B>Q&amp;A</B></FONT></H2><DL>	<DD><B>Q What are the advantages of providing an icon for a button versus using the	MFC <TT>CBitmapButton</TT> class?</B><BR>	<BR>	<B>A</B> Assigning an icon to a button is much simpler than using the <TT>CBitmapButton</TT>	class. It is also more efficient because Windows will handle drawing the image instead	of the MFC class library.<BR>	<BR>	<B>Q The <TT>CDC::DrawIcon</TT> function will only draw an icon the size of its original	image. How can I draw an icon larger than its original size?</B><BR>	<BR>	<B>A</B> You can use the <TT>DrawIconEx</TT> function to draw an icon to an arbitrary	size. Unlike <TT>DrawIcon</TT>, the <TT>DrawIconEx</TT> function isn't a member of	the <TT>CDC</TT> class. You must pass the internal handle used by the <TT>CDC</TT>	object as the first parameter in the call to <TT>DrawIconEx</TT>, as shown in the	<TT>OnDraw</TT> function:</DL><BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF"><TT>void CMyTestView::OnDraw(CDC* pDC)</TT><TT>{</TT><TT>    CRect rc;</TT><TT>    GetClientRect(&amp;rc);</TT><TT>    HICON hIcon = AfxGetApp()-&gt;LoadIcon(IDI_TEST);</TT><TT>    DrawIconEx(pDC-&gt;m_hDC,</TT><TT>               0,</TT><TT>               0,</TT><TT>               hIcon,</TT><TT>               rc.Width(),</TT><TT>               rc.Height(),</TT><TT>               0,</TT><TT>               NULL,</TT><TT>               DI_NORMAL);</TT><TT>    DestroyIcon(hIcon);</TT><TT>}</TT></FONT></PRE></BLOCKQUOTE><PRE><FONT COLOR="#0066FF"><TT></TT></FONT></PRE><DL>	<DD>The really interesting parameters passed to <TT>DrawIconEx</TT> are parameters	five and six; these are the width and height of the final image.</DL><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 function is used to associate an icon with a pushbutton?<BR>	<BR>	2. What is the name of the area on the cursor that is used as the current mouse location?<BR>	<BR>	3. What function is used to restrict a cursor to a specific rectangle?<BR>	<BR>	4. What function is used to trap all mouse messages?<BR>	<BR>	5. What function is used to change the current cursor?<BR>	<BR>	6. What message must be handled in order to change the current cursor?<BR>	<BR>	7. What is the size of an application's small icon?<BR>	<BR>	8. What function is used to change to the hourglass cursor?</DL><H3><FONT COLOR="#000077"><B>Exercise</B></FONT></H3><DL>	<DD>1. Modify Listing 14.5 so that the hourglass cursor is shown unless the mouse	is over the OK or Cancel button.<FONT COLOR="#000077"></FONT></DL><CENTER><P><HR><A HREF="../ch13/ch13.htm"><IMG SRC="../button/previous.gif" WIDTH="128" HEIGHT="28"ALIGN="BOTTOM" ALT="Previous chapter" BORDER="0"></A><A HREF="../ch15/ch15.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>&#169; <A HREF="../copy.htm">Copyright</A>, Macmillan Computer Publishing. Allrights reserved.</CENTER></BODY></HTML>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产网站一区二区| 免费视频最近日韩| 久久99蜜桃精品| 色婷婷国产精品| 国产精品久久久久桃色tv| 男女视频一区二区| 欧美伊人精品成人久久综合97| 精品黑人一区二区三区久久| 亚洲成人黄色小说| 99久久免费国产| 欧美国产一区在线| 久久精品国产77777蜜臀| 欧美吻胸吃奶大尺度电影 | 亚洲国产一区二区三区青草影视| 国产精品综合一区二区| 欧美美女黄视频| 一区二区在线免费观看| 国产91精品露脸国语对白| 日韩一区二区影院| 日本va欧美va精品发布| 欧美性猛交xxxx乱大交退制版 | 亚洲国产精品传媒在线观看| 久热成人在线视频| 日韩欧美一区在线观看| 午夜精品久久久久久久久久久| 一本久久综合亚洲鲁鲁五月天 | 久久综合久久99| 久久99久久精品| 欧美一区二区三级| 日韩高清一区二区| 欧美一级高清片| 美腿丝袜一区二区三区| 日韩女同互慰一区二区| 国内一区二区视频| 日韩三级高清在线| 国产精品99久久久久久有的能看| 欧美精品一区二区蜜臀亚洲| 激情av综合网| 中文字幕精品在线不卡| 99这里都是精品| 亚洲三级理论片| 欧美亚日韩国产aⅴ精品中极品| 亚洲精品国产第一综合99久久 | 欧美大胆人体bbbb| 国产一区二区免费视频| 国产精品丝袜一区| 99re这里都是精品| 亚洲成人免费在线观看| 日韩女优毛片在线| 成人免费高清视频| 一区二区在线观看免费| 91精品国产综合久久久久久久久久| 蜜臀av国产精品久久久久| 精品欧美一区二区三区精品久久| 国产一区二区视频在线| 日韩一区欧美小说| 欧美三级午夜理伦三级中视频| 日韩精品一级二级 | 一区二区三区欧美在线观看| 欧美视频中文字幕| 韩国v欧美v日本v亚洲v| 亚洲丝袜制服诱惑| 91精品综合久久久久久| 成人美女在线视频| 日韩二区三区四区| 国产日本欧洲亚洲| 欧美日韩中文字幕一区二区| 国产精品一线二线三线精华| 亚洲女爱视频在线| wwwwxxxxx欧美| 欧美性欧美巨大黑白大战| 韩国精品免费视频| 亚洲国产精品一区二区久久| 国产日韩欧美亚洲| 制服视频三区第一页精品| 风间由美中文字幕在线看视频国产欧美| 亚洲精品国产精华液| 国产亚洲综合色| 91精品国模一区二区三区| 99久久精品国产导航| 激情欧美一区二区三区在线观看| 亚洲美女在线一区| 亚洲国产精品99久久久久久久久| 在线成人午夜影院| 99精品国产视频| 国产成人亚洲综合a∨婷婷图片| 亚洲一区av在线| 亚洲人一二三区| 精品国产露脸精彩对白| 欧美日韩国产天堂| 99re热这里只有精品免费视频| 国产综合久久久久影院| 日本亚洲最大的色成网站www| 亚洲精品欧美专区| 成人免费一区二区三区在线观看| 日韩亚洲欧美在线观看| 欧洲av在线精品| av电影在线不卡| 国产sm精品调教视频网站| 玖玖九九国产精品| 麻豆精品视频在线观看视频| 青草国产精品久久久久久| 亚洲福中文字幕伊人影院| 一区二区三区在线高清| 中文字幕中文字幕一区| 欧美激情一区二区三区四区| 国产欧美日韩另类视频免费观看 | 美女在线一区二区| 午夜视频一区二区| 午夜国产精品影院在线观看| 亚洲成人激情自拍| 亚洲不卡一区二区三区| 水野朝阳av一区二区三区| 亚洲成人一区二区| 三级在线观看一区二区| 日本91福利区| 裸体歌舞表演一区二区| 国内精品免费在线观看| 国产成人综合网| 国产成人av资源| 97久久超碰国产精品| 在线免费观看日韩欧美| 欧美性生交片4| 欧美一区二区久久| 精品久久国产字幕高潮| 中文字幕av一区二区三区高 | 美女久久久精品| 国产一区二区网址| 99精品热视频| 欧美人牲a欧美精品| 日韩精品中文字幕一区| 国产亚洲成年网址在线观看| 国产精品久久看| 亚洲一区二区高清| 精品影视av免费| av一区二区三区在线| 欧美无人高清视频在线观看| 日韩一级片网址| 国产精品久久久久国产精品日日| 亚洲免费av网站| 另类综合日韩欧美亚洲| 成人网男人的天堂| 欧美性猛片xxxx免费看久爱| 欧美岛国在线观看| 国产精品初高中害羞小美女文| 亚洲一区二区在线观看视频| 国内精品伊人久久久久av一坑| 成人av免费网站| 欧美一区二区日韩| 亚洲欧洲国产专区| 蜜桃av一区二区在线观看| 波多野结衣精品在线| 欧美军同video69gay| 日本一二三不卡| 免费精品99久久国产综合精品| 风间由美一区二区三区在线观看| 91激情五月电影| 国产亚洲精品bt天堂精选| 一区二区三区不卡在线观看| 狠狠久久亚洲欧美| 欧美日韩亚洲综合在线| 欧美国产日韩a欧美在线观看| 偷拍日韩校园综合在线| 成人av免费观看| 精品国产不卡一区二区三区| 亚洲精品高清在线| 成人视屏免费看| 26uuu久久综合| 香港成人在线视频| 97久久精品人人做人人爽50路| 精品国产一区二区三区久久影院| 亚洲国产中文字幕在线视频综合 | 国产精品小仙女| 欧美一区二区三区四区五区| 亚洲精品v日韩精品| 国产黄色91视频| 26uuu国产电影一区二区| 日韩综合一区二区| 欧美午夜精品免费| 亚洲精品中文在线观看| 风间由美一区二区三区在线观看| 精品久久久久久无| 蜜臀精品久久久久久蜜臀| 欧美伊人久久久久久久久影院| 中文字幕一区二区不卡| 成人丝袜视频网| 国产精品热久久久久夜色精品三区 | 色狠狠桃花综合| 中文字幕永久在线不卡| 成人动漫一区二区在线| 国产欧美日韩另类一区| 国产1区2区3区精品美女| 国产日韩欧美精品综合| 国产ts人妖一区二区| 亚洲国产激情av| 91影院在线免费观看| 国产精品久线在线观看| 国产成人福利片| 国产精品视频你懂的| 成人开心网精品视频|