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

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

?? apb.htm

?? 好的教程Vc++21 天
?? 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一区二区三区免费野_久草精品视频
亚洲欧洲精品一区二区三区| 91精品国产一区二区三区蜜臀| 欧美在线免费观看视频| 成人午夜免费av| 狠狠色狠狠色合久久伊人| 日韩av午夜在线观看| 日韩精品一区第一页| 亚洲成人免费影院| 亚洲午夜精品久久久久久久久| 一区二区三区四区五区视频在线观看 | 日韩在线观看一区二区| 亚洲成a天堂v人片| 日韩中文字幕不卡| 日韩电影在线一区| 蜜臀精品久久久久久蜜臀| 免费视频最近日韩| 韩国一区二区视频| 福利一区福利二区| 91色在线porny| 在线亚洲人成电影网站色www| 欧美女孩性生活视频| 欧美一区二区精美| 国产三级三级三级精品8ⅰ区| 国产91在线看| 国产一区视频在线看| 国产成人亚洲综合a∨猫咪| 成人激情黄色小说| 欧美中文字幕一区二区三区亚洲 | 国产精品麻豆视频| 亚洲图片另类小说| 香蕉久久一区二区不卡无毒影院 | 成人app网站| 色欧美片视频在线观看| 在线日韩一区二区| 欧美日韩和欧美的一区二区| 制服丝袜成人动漫| 精品福利视频一区二区三区| 91精品国产综合久久小美女| 色狠狠一区二区三区香蕉| 欧美综合久久久| 欧美一区二区三区在| 久久亚洲一区二区三区明星换脸| 久久亚洲精品小早川怜子| 国产精品久久久久久久久快鸭| 成人免费一区二区三区在线观看| 欧美最猛黑人xxxxx猛交| 91免费版在线| 欧美色图天堂网| 欧美男女性生活在线直播观看| 91捆绑美女网站| 欧美一区二区三区婷婷月色| 精品国产网站在线观看| 国产精品美女久久久久av爽李琼| 亚洲男人的天堂一区二区| 丝袜亚洲精品中文字幕一区| 激情文学综合插| 99re热视频精品| 欧美亚洲动漫另类| 日韩欧美国产综合| 中文字幕乱码一区二区免费| 亚洲欧美日韩国产成人精品影院| 日韩黄色免费电影| 国产高清成人在线| 在线观看91视频| 日韩精品综合一本久道在线视频| 国产精品久久久久久妇女6080| 亚洲大片免费看| 国产在线一区二区综合免费视频| 91香蕉视频mp4| 精品国产一区二区三区久久影院 | 五月天久久比比资源色| av在线播放一区二区三区| 欧美日韩精品高清| 欧美国产日韩a欧美在线观看| 亚洲一区二区三区四区中文字幕| 国产一区二区三区美女| 欧美在线视频全部完| 欧美一级黄色录像| 欧美一级日韩免费不卡| 亚洲国产一区二区三区青草影视| 国产精品66部| 在线不卡中文字幕| 成人免费在线视频| 久久成人av少妇免费| 奇米四色…亚洲| 亚洲福利一二三区| 亚洲中国最大av网站| 丁香六月综合激情| 欧美一区二区三区四区视频| 国产亚洲一本大道中文在线| 亚洲不卡av一区二区三区| va亚洲va日韩不卡在线观看| 精品久久久久久久久久久久久久久久久 | 亚洲人成精品久久久久| 大陆成人av片| 国产亚洲福利社区一区| 国产福利精品一区| 精品久久久三级丝袜| 国产一区二区精品久久99| 久久久99久久精品欧美| 蜜桃精品视频在线| 久久久久久久久久久久久久久99| 韩国v欧美v日本v亚洲v| 久久久久久久久99精品| 丁香啪啪综合成人亚洲小说| 国产精品乱码妇女bbbb| 91香蕉国产在线观看软件| 亚洲免费视频成人| 精品视频一区二区三区免费| 午夜精品免费在线观看| 欧美日韩国产首页在线观看| 紧缚捆绑精品一区二区| 国产女人18毛片水真多成人如厕 | 久久久午夜电影| 成人av资源站| 亚洲国产欧美另类丝袜| 91精品国产综合久久久蜜臀图片| 免播放器亚洲一区| 久久精品亚洲精品国产欧美| 91精品国产91久久综合桃花| 久久精品国产免费| 精品少妇一区二区三区| 美女视频黄免费的久久 | 日韩电影免费在线看| 日韩一区二区三区免费看| 国产一区二区三区免费播放| 中文字幕中文字幕中文字幕亚洲无线 | 色久优优欧美色久优优| 亚洲bt欧美bt精品| 欧美肥妇free| 成人精品视频一区二区三区尤物| 亚洲精品国产精华液| 91精品在线观看入口| 高清不卡在线观看av| 亚洲一区二区三区三| 26uuu国产在线精品一区二区| av电影在线观看一区| 五月天激情小说综合| 国产农村妇女毛片精品久久麻豆| 欧洲亚洲国产日韩| 精品写真视频在线观看| 亚洲欧美日韩在线| 精品盗摄一区二区三区| 成人美女视频在线观看18| 亚洲电影中文字幕在线观看| xfplay精品久久| 在线亚洲高清视频| 国产精品系列在线播放| 亚洲第一成年网| 亚洲国产精品传媒在线观看| 欧美疯狂做受xxxx富婆| av一区二区不卡| 欧美aaaaaa午夜精品| 亚洲男同性恋视频| 精品国产一区二区在线观看| 欧美午夜一区二区三区免费大片| 国产精品77777竹菊影视小说| 亚洲v精品v日韩v欧美v专区 | 国产一区二区三区四| 亚洲一区二区三区中文字幕| 久久九九全国免费| 日韩三级电影网址| 欧美午夜宅男影院| 成人黄色片在线观看| 奇米精品一区二区三区四区| 夜夜精品浪潮av一区二区三区| 久久久久久**毛片大全| 6080日韩午夜伦伦午夜伦| 色综合色狠狠综合色| 国产在线视频不卡二| 日韩精品乱码免费| 一区二区日韩av| 国产精品久久久久久久久快鸭| 91精品福利在线一区二区三区| 国产精品18久久久久久久久| 蜜臀久久99精品久久久久宅男| 夜夜嗨av一区二区三区中文字幕| 国产精品国产三级国产三级人妇 | 久久久高清一区二区三区| 欧美一卡2卡3卡4卡| 91久久精品一区二区| 成人ar影院免费观看视频| 精品一区二区在线视频| 日韩不卡在线观看日韩不卡视频| 一片黄亚洲嫩模| 亚洲色大成网站www久久九九| 中文字幕在线视频一区| 日韩欧美激情四射| 欧美亚洲综合在线| 97久久人人超碰| 成人av在线网| 成人久久视频在线观看| 国产成人免费视频网站| 国内精品伊人久久久久av一坑| 美女视频黄免费的久久| 免费精品视频最新在线| 免费视频一区二区| 免费在线成人网| 蜜桃视频免费观看一区| 久久99精品网久久|