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

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

?? apb.htm

?? 21天學會VC的英文版
?? HTM
?? 第 1 頁 / 共 5 頁
字號:
	<DD>The device context.	<P>	<DT></DT>	<DD><B>3. </B>What size bitmap can you use to make a brush from it?	<P>	<DT></DT>	<DD>8 pixels by 8 pixels.	<P>	<DT></DT>	<DD><B>4. </B>What event message is sent to a window to tell it to redraw itself?	<P>	<DT></DT>	<DD>The WM_PAINT message.	<P>	<DT></DT>	<DD><B>5. </B>How can you cause a window to repaint itself?	<P>	<DT></DT>	<DD>Use the Invalidate function on it.	<P></DL><H3>Exercises</H3><DL>	<DT></DT>	<DD><B>1. </B>Make the second dialog window resizable, and make it adjust the figures	drawn on it whenever it's resized.	<P>	<DT></DT>	<DD>Open the second dialog in the dialog layout designer. Open the properties for	the window. Select the Style tab. Change the border to Resizing. Open the Class Wizard	and add an event-handler function for the WM_SIZE event message. Edit the function	that you just created and call the Invalidate function, as in Listing B.7.	<P></DL><H4>LISTING B.7. THE OnSize FUNCTION.</H4><PRE>1: void CPaintDlg::OnSize(UINT nType, int cx, int cy)2: {3:     CDialog::OnSize(nType, cx, cy);4:5:     // TODO: Add your message handler code here6:     // Redraw the window7:     Invalidate();</PRE><PRE>8:}</PRE><DL>	<DT></DT>	<DD><B>2. </B>Add a bitmap brush to the set of brushes used to create the rectangles	and ellipses.	<P>	<DT></DT>	<DD>Open the Resources View tab on the workspace pane. Right-click on the top folder	of the resource tree. Select Insert from the pop-up menu. Select Bitmap from the	list of available resources to add. Paint a pattern on the bitmap that you just created.	Right-click on the bitmap ID in the workspace pane. Open the properties dialog and	change the object ID to IDB_BITMAPBRUSH. Open the source code for the DrawRegion	function. Add the code in Listing B.8, lines 22 through 24 and lines 105 through	112. Increase the number of loops in the for statement on line 39.	<P></DL><H4>LISTING B.8. THE DrawRegion FUNCTION.</H4><PRE>1:  void CPaintDlg::DrawRegion(CPaintDC *pdc, int iColor, int iTool, int 		  &Acirc;iShape)2:  {3:      // Declare and create the pens...19:     CBrush lVertBrush(HS_VERTICAL, m_crColors[iColor]);20:     CBrush lNullBrush(RGB(192, 192, 192));21:22:     CBitmap lBitmap;23:     lBitmap.LoadBitmap(IDB_BITMAPBRUSH);24:     CBrush lBitmapBrush(&amp;lBitmap);25:26:     // Calculate the size of the drawing regions27:     CRect lRect;28:     GetClientRect(lRect);...37:     int i;38:     // Loop through all of the brushes and pens39:     for (i = 0; i &lt; 8; i++)40:     {41:         switch (i)42:         {...103:            pdc-&gt;SelectObject(&amp;lVertBrush);104:            break;105:        case 7:    // Null - Bitmap106:            // Determine the location for this figure.107:            lDrawRect.left = lDrawRect.left + liHorz;108:            lDrawRect.right = lDrawRect.left + liWidth;109:            // Select the appropriate pen and brush110:            pdc-&gt;SelectObject(&amp;lNullPen);111:            pdc-&gt;SelectObject(&amp;lBitmapBrush);112:            break;113:        }114:        // Which tool are we using?...126:    pdc-&gt;SelectObject(lOldBrush);127:    pdc-&gt;SelectObject(lOldPen);</PRE><PRE>128:}</PRE><P><H2><A NAME="Heading25"></A>Day 9</H2><H3>Quiz</H3><DL>	<DT></DT>	<DD><B>1. </B>How does an ActiveX container call methods in an ActiveX control?	<P>	<DT></DT>	<DD>By using the IDispatch interface, the container can call the Invoke method, passing	the DISPID of the control's method that the container wants to run.	<P>	<DT></DT>	<DD><B>2. </B>How does an ActiveX control trigger events in the container application?	<P>	<DT></DT>	<DD>The container application has its own IDispatch interface, through which the	control can trigger events.	<P>	<DT></DT>	<DD><B>3. </B>What AppWizard option must be selected for ActiveX controls to work	properly in a Visual C++ application?	<P>	<DT></DT>	<DD>You select the ActiveX Controls check box in the second step of the AppWizard.	<P>	<DT></DT>	<DD><B>4. </B>How does Visual C++ make it easy to work with ActiveX controls?	<P>	<DT></DT>	<DD>It generates C++ classes that encapsulate the control's functionality.	<P>	<DT></DT>	<DD><B>5. </B>Why might it be difficult to work with older controls in Visual C++?	<P>	<DT></DT>	<DD>Older controls might not contain the information necessary for Visual C++ to	generate the C++ classes that are used to encapsulate the control's functionality.	<P></DL><H3>Exercise</H3><P>Modify the application so that the user can double-click a column header and makeit the first column in the grid.</P><P>Using the Class Wizard, add a function to the DblClick event message for the gridcontrol.</P><P>Edit the function in exercise 1 to add the following code:</P><P><PRE>void CActiveXDlg::OnDblClickMsfgrid(){    // TODO: Add your control notification handler code here    ///////////////////////    // MY CODE STARTS HERE    ///////////////////////    // Did the user click on a data row and not the    // header row?    if (m_ctlFGrid.GetMouseRow() != 0)    {        // If so, then zero out the column variable        // and exit        m_iMouseCol = 0;        return;    }    // Save the column clicked on    m_iMouseCol = m_ctlFGrid.GetMouseCol();    // If the selected column was the first column,    // there's nothing to do    if (m_iMouseCol == 0)        return;    // Turn the control redraw off    m_ctlFGrid.SetRedraw(FALSE);    // Change the selected column position    m_ctlFGrid.SetColPosition(m_iMouseCol, 0);    // Resort the grid    DoSort();    // Turn redraw back on    m_ctlFGrid.SetRedraw(TRUE);    ///////////////////////    // MY CODE ENDS HERE    ///////////////////////</PRE><PRE>}</PRE><P><H2><A NAME="Heading28"></A>Day 10</H2><H2>Quiz</H2><DL>	<DT></DT>	<DD><B>1. </B>What does SDI stand for?	<P>	<DT></DT>	<DD>Single Document Interface.	<P>	<DT></DT>	<DD><B>2. </B>What functionality is in the view class?	<P>	<DT></DT>	<DD>The view class is responsible for displaying the document for the user.	<P>	<DT></DT>	<DD><B>3. </B>What function is called to redraw the document if the window has been	hidden behind another window?	<P>	<DT></DT>	<DD>The OnDraw function in the view class is called to redraw the document.	<P>	<DT></DT>	<DD><B>4. </B>Where do you place code to clear out the current document before starting	a new document?	<P>	<DT></DT>	<DD>The DeleteContents function in the document class is where you place code to	clear the current document.	<P>	<DT></DT>	<DD><B>5. </B>What is the purpose of the document class?	<P>	<DT></DT>	<DD>The document class is where the data is managed and manipulated. It maintains	the abstract representation of the document being edited and processed.	<P></DL><H3>Exercise</H3><P>Add another pull-down menu to control the width of the pen used for drawing. Giveit the following settings:</P><P><TABLE BORDER="1">	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT"><I>Menu Entry</I></TD>		<TD ALIGN="LEFT"><I>Width Setting</I></TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">Very Thin</TD>		<TD ALIGN="LEFT">1</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">Thin</TD>		<TD ALIGN="LEFT">8</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">Medium</TD>		<TD ALIGN="LEFT">16</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">Thick</TD>		<TD ALIGN="LEFT">24</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">Very Thick</TD>		<TD ALIGN="LEFT">32</TD>	</TR></TABLE></P><P>Follow these steps:</P><DL>	<DT></DT>	<DD><B>1. </B>Select the CLine class in the Class View tab of the workspace pane.	Right-click the mouse and select Add Member Variable from the pop-up menu.	<P>	<DT></DT>	<DD><B>2. </B>Specify the variable type as UINT, the name as m_nWidth, and the access	as private. Click OK to add the variable.	<P>	<DT></DT>	<DD><B>3. </B>Right-click the CLine constructor in the Class View tree. Select Go	to Declaration from the pop-up menu.	<P>	<DT></DT>	<DD><B>4. </B>Add UINT nWidth as a fourth argument to the constructor declaration.	<P>	<DT></DT>	<DD><B>5. </B>Right-click the CLine constructor in the Class View tree. Select Go	to Definition from the pop-up menu.	<P>	<DT></DT>	<DD><B>6. </B>Modify the constructor to add the fourth argument and to set the m_nWidth	member to the new argument, as in Listing B.9.	<P></DL><H4>LISTING B.9. THE MODIFIED CLine CONSTRUCTOR.</H4><PRE>1: CLine::CLine(CPoint ptFrom, CPoint ptTo, COLORREF crColor, UINT nWidth)2: {3:     //Initialize the from and to points4:     m_ptFrom = ptFrom;5:     m_ptTo = ptTo;6:     m_crColor = crColor;7:     m_nWidth = nWidth;</PRE><PRE>8: }</PRE><DL>	<DT></DT>	<DD><B>7. </B>Scroll down to the Draw function and modify it as in Listing B.10.	<P></DL><H4>LISTING B.10. THE MODIFIED Draw FUNCTION.</H4><PRE> 1: void CLine::Draw(CDC * pDC) 2: { 3:     // Create a pen 4:     CPen lpen (PS_SOLID, m_nWidth, m_crColor); 5:  6:     // Set the new pen as the drawing object 7:     CPen* pOldPen = pDC-&gt;SelectObject(&amp;lpen); 8:     // Draw the line 9:     pDC-&gt;MoveTo(m_ptFrom);10:     pDC-&gt;LineTo(m_ptTo);11:     // Reset the previous pen12:     pDC-&gt;SelectObject(pOldPen);</PRE><PRE>13: }</PRE><DL>	<DT></DT>	<DD><B>8. </B>Scroll down to the Serialize function and modify it as in Listing B.11.	<P></DL><H4>LISTING B.11. THE MODIFIED Serialize FUNCTION.</H4><PRE> 1: void CLine::Serialize(CArchive &amp;ar) 2: { 3:     CObject::Serialize(ar); 4:  5:     if (ar.IsStoring()) 6:         ar &lt;&lt; m_ptFrom &lt;&lt; m_ptTo &lt;&lt; (DWORD) m_crColor &lt;&lt; m_nWidth; 7:     else 8:         ar &gt;&gt; m_ptFrom &gt;&gt; m_ptTo &gt;&gt; (DWORD) m_crColor &gt;&gt; m_nWidth;</PRE><PRE>9: }</PRE><DL>	<DT></DT>	<DD><B>9. </B>Select the CDay10Doc class in the Class View tab on the workspace pane.	Right-click the mouse and choose Add Member Variable from the pop-up menu.	<P>	<DT></DT>	<DD><B>10. </B>Specify the variable type as UINT, the name as m_nWidth, and the access	as private. Click OK to add the variable.	<P>	<DT></DT>	<DD><B>11. </B>Open the CDay10Doc source code (Day10Doc.cpp), scroll down to the	OnNewDocument function, and edit it as in Listing B.12.	<P></DL><H4>LISTING B.12. THE MODIFIED OnNewDocument FUNCTION.</H4><PRE> 1: BOOL CDay10Doc::OnNewDocument() 2: { 3:     if (!CDocument::OnNewDocument()) 4:         return FALSE; 5:  6:     // TODO: add reinitialization code here 7:     // (SDI documents will reuse this document) 8:  9:     ///////////////////////10:     // MY CODE STARTS HERE11:     ///////////////////////12: 13:     // Initialize the color to black14:     m_nColor = ID_COLOR_BLACK - ID_COLOR_BLACK;15:     // Initialize the width to thin16:     m_nWidth = ID_WIDTH_VTHIN - ID_WIDTH_VTHIN;17: 18:     ///////////////////////19:     // MY CODE ENDS HERE20:     ///////////////////////21: 22:     return TRUE;</PRE><PRE>23: }</PRE><DL>	<DT></DT>	<DD><B>12. </B>Scroll down to the AddLine function, and modify it as in Listing B.13.	<P></DL><H4>LISTING B.13. THE MODIFIED AddLine FUNCTION.</H4><PRE> 1: CLine * CDay10Doc::AddLine(CPoint ptFrom, CPoint ptTo) 2: { 3:     static UINT nWidths[5] = { 1, 8, 16, 24, 32}; 4:  5:     // Create a new CLine object 6:     CLine *pLine = new CLine(ptFrom, ptTo,                  &Acirc;m_crColors[m_nColor], nWidths[m_nWidth]); 7:     try 8:     { 9:         // Add the new line to the object array10:         m_oaLines.Add(pLine);11:         // Mark the document as dirty12:         SetModifiedFlag();13:     }14:     // Did we run into a memory exception?15:     catch (CMemoryException* perr)16:     {17:         // Display a message for the user, giving him or her the18:         // bad news19:         AfxMessageBox(&quot;Out of memory&quot;, MB_ICONSTOP | MB_OK);20:         // Did we create a line object?21:         if (pLine)22:         {23:             // Delete it24:             delete pLine;25:             pLine = NULL;26:         }27:         // Delete the exception object28:         perr-&gt;Delete();29:     }30:     return pLine;</PRE><PRE>31: }</PRE><DL>	<DT></DT>	<DD><B>13. </B>Add a new member function to the CDay10Doc class. Specify the function	type as UINT, the declaration as GetWidth, and the access as public.	<P>	<DT></DT>	<DD><B>14. </B>Edit the GetWidth function, adding the code in Listing B.14.	<P></DL><H4>LISTING B.14. THE GetWidth FUNCTION.</H4><PRE>1: UINT CDay10Doc::GetWidth()2: {3:     // Return the current width4:     return ID_WIDTH_VTHIN + m_nWidth;</PRE><PRE>5: }</PRE><DL>	<DT></DT>	<DD><B>15. </B>Select the Resource View tab in the workspace pane. Expand the tree	so that you can see the contents of the Menu folder. Double-click the menu resource.	<P>	<DT></DT>	<DD><B>16. </B>Grab the blank top-level menu (at the right end of the menu bar) and	drag it to the left, dropping it in front of the View menu entry.	<P>	<DT></DT>	<DD><B>17. </B>Open the properties for the blank menu entry. Specify the caption

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品色婷婷久久58| 韩国精品主播一区二区在线观看 | 久久福利视频一区二区| 国产高清精品网站| 日韩一区二区在线观看| 国产精品久久久久久亚洲伦 | 亚洲综合自拍偷拍| 国产精品一二二区| 日韩一区二区不卡| 午夜精品久久久久久不卡8050| 国产精品一区二区久久精品爱涩| 欧美图片一区二区三区| 国产精品灌醉下药二区| 国产成人自拍网| 欧美成人精品二区三区99精品| 亚洲在线免费播放| 91丝袜国产在线播放| 国产日韩精品一区二区三区 | 亚洲成人av中文| 色哟哟在线观看一区二区三区| 久久久蜜桃精品| 毛片一区二区三区| 欧美一区二区三区四区五区 | 亚洲3atv精品一区二区三区| 色噜噜夜夜夜综合网| 亚洲欧洲日产国码二区| 成人黄色网址在线观看| 日本一区二区高清| 国产精品一区二区男女羞羞无遮挡| 欧美一区二区日韩一区二区| 日韩高清不卡一区| 56国语精品自产拍在线观看| 亚洲第四色夜色| 欧美三级视频在线| 五月婷婷另类国产| 7777精品伊人久久久大香线蕉超级流畅| 洋洋av久久久久久久一区| 欧美羞羞免费网站| 天天做天天摸天天爽国产一区| 欧美亚洲一区二区三区四区| 午夜影院久久久| 日韩一区二区三区电影在线观看| 久久99国产精品久久| 国产日韩精品一区二区三区 | 69精品人人人人| 老司机午夜精品99久久| 久久新电视剧免费观看| 粉嫩一区二区三区性色av| 国产精品国产三级国产普通话蜜臀| 99精品视频中文字幕| 亚洲午夜久久久久久久久电影网 | 色综合天天视频在线观看| 一个色综合av| 精品久久久影院| 成人91在线观看| 亚洲国产综合91精品麻豆| 欧美一区二区三区免费观看视频| 精品无码三级在线观看视频| 中文字幕 久热精品 视频在线| 99精品久久99久久久久| 日本欧美大码aⅴ在线播放| 国产午夜精品久久久久久久 | 欧美大片在线观看一区二区| 国产精品综合一区二区| 亚洲视频在线观看一区| 51久久夜色精品国产麻豆| 国产一区二区视频在线| 亚洲三级理论片| 日韩午夜在线影院| 97久久精品人人做人人爽50路 | 一区二区三区在线影院| 日韩一区二区电影| 色网站国产精品| 久久99精品国产.久久久久久| 亚洲日韩欧美一区二区在线| 91精品国产综合久久精品性色| 国产成人午夜电影网| 午夜欧美视频在线观看 | 久久九九全国免费| 欧美三级视频在线| 波多野洁衣一区| 精东粉嫩av免费一区二区三区| 亚洲国产一区二区视频| 久久无码av三级| 欧美老肥妇做.爰bbww视频| 成人国产精品免费观看动漫| 青草国产精品久久久久久| 悠悠色在线精品| 久久精品视频在线看| 欧美一区二区观看视频| 一本大道久久a久久综合婷婷| 国产一区二区免费视频| 日本三级亚洲精品| 午夜精品一区二区三区电影天堂| 中文字幕一区二区三区在线观看| 亚洲精品一线二线三线| 日韩亚洲欧美综合| 91麻豆精品国产91久久久久久久久 | 在线视频你懂得一区| 成人天堂资源www在线| 激情五月播播久久久精品| 亚洲成人www| 亚洲一二三区不卡| 亚洲国产一区视频| 亚洲18影院在线观看| 香蕉av福利精品导航| 午夜欧美电影在线观看| 午夜电影网亚洲视频| 亚洲高清不卡在线观看| 一区二区三区国产精华| 亚洲欧美另类图片小说| 亚洲男同性恋视频| 亚洲欧美激情在线| 亚洲精品乱码久久久久久| 亚洲精品中文字幕在线观看| 亚洲免费在线视频一区 二区| 亚洲日穴在线视频| 亚洲制服丝袜av| 日韩电影在线一区二区三区| 天天色 色综合| 蜜桃免费网站一区二区三区| 精品制服美女丁香| 国产原创一区二区| 成人午夜免费电影| 在线免费不卡视频| 欧美丰满少妇xxxxx高潮对白| 欧美高清视频不卡网| 欧美疯狂性受xxxxx喷水图片| 日韩免费观看高清完整版在线观看| 日韩精品一区二区三区在线播放| 久久精品视频网| 自拍偷拍欧美激情| 视频一区二区三区中文字幕| 久久99精品久久久久久| 成人黄色电影在线| 欧美少妇性性性| 精品免费一区二区三区| 欧美国产日韩在线观看| 一区二区三区丝袜| 久久国产尿小便嘘嘘| 成人免费毛片嘿嘿连载视频| 一本到一区二区三区| 欧美一级日韩免费不卡| 国产欧美视频一区二区三区| 一区二区三区四区亚洲| 另类小说图片综合网| 99久久婷婷国产| 欧美一级理论性理论a| 亚洲国产成人自拍| 天天色天天操综合| 盗摄精品av一区二区三区| 在线视频国产一区| 久久久久久久久99精品| 亚洲国产一区二区a毛片| 国产麻豆欧美日韩一区| 91电影在线观看| 国产清纯在线一区二区www| 亚洲第一狼人社区| 成人短视频下载| 日韩欧美资源站| 亚洲一区二区三区影院| 国产成人免费视频网站| 欧美高清激情brazzers| 中文字幕一区二区视频| 国产在线一区二区综合免费视频| 色噜噜夜夜夜综合网| 日本一区二区成人| 精品一区二区在线视频| 欧美系列日韩一区| 中文字幕免费观看一区| 麻豆精品久久精品色综合| 91福利小视频| 中文字幕一区二区三| 国产麻豆午夜三级精品| 日韩美一区二区三区| 五月婷婷色综合| 欧美三电影在线| 亚洲综合区在线| 色美美综合视频| 亚洲人成精品久久久久| 成人午夜短视频| 国产婷婷一区二区| 国产一区二区在线观看免费| 日韩欧美国产午夜精品| 天堂va蜜桃一区二区三区漫画版| 91老师片黄在线观看| 国产精品国产三级国产aⅴ原创| 国产在线麻豆精品观看| 日韩女优av电影| 紧缚捆绑精品一区二区| 精品国产制服丝袜高跟| 日本强好片久久久久久aaa| 欧美精品丝袜久久久中文字幕| 亚洲一区在线视频| 欧美日韩黄色一区二区| 亚洲成人免费在线| 欧美高清激情brazzers| 日本不卡一二三| 精品少妇一区二区三区视频免付费| 日本不卡视频在线|