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

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

?? apb.htm

?? /// //Visual C++ 6.0 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一区二区三区免费野_久草精品视频
亚洲色大成网站www久久九九| 欧美三级欧美一级| 麻豆传媒一区二区三区| 丝袜脚交一区二区| 婷婷夜色潮精品综合在线| 亚洲午夜免费福利视频| 亚洲午夜久久久久| 亚洲成人av电影在线| 香蕉乱码成人久久天堂爱免费| 一区二区三区成人| 亚洲va国产va欧美va观看| 亚洲午夜久久久久久久久电影网| 亚洲第一av色| 免费看精品久久片| 国产精品亚洲成人| 91免费看片在线观看| 欧美日韩在线三级| 欧美一卡2卡3卡4卡| 精品国产自在久精品国产| 国产调教视频一区| 中文字幕一区在线| 亚洲国产精品久久人人爱蜜臀| 婷婷开心久久网| 国产一区欧美一区| 成人久久视频在线观看| 欧美怡红院视频| 日韩美女主播在线视频一区二区三区| 精品国产青草久久久久福利| 中文字幕在线观看一区二区| 日韩激情视频在线观看| 国产精品综合视频| 在线一区二区三区| 精品对白一区国产伦| 亚洲三级电影网站| 捆绑变态av一区二区三区| 成人精品国产免费网站| 欧美久久久久久蜜桃| 久久久久久久免费视频了| 夜夜嗨av一区二区三区网页| 久久99精品久久久久| 色婷婷av一区二区三区之一色屋| 日韩一卡二卡三卡四卡| 亚洲丝袜自拍清纯另类| 久久99精品国产麻豆不卡| 一本大道久久精品懂色aⅴ| 精品剧情在线观看| 亚洲一二三专区| 成人高清视频在线| 欧美电影免费观看高清完整版在 | 男人的天堂亚洲一区| 国产成人午夜片在线观看高清观看| 在线欧美日韩国产| 国产精品嫩草影院com| 麻豆freexxxx性91精品| 欧美这里有精品| 国产精品色婷婷| 国产在线看一区| 欧美一区二区黄| 亚洲动漫第一页| 色婷婷精品久久二区二区蜜臂av| 欧美激情资源网| 国内精品自线一区二区三区视频| 欧美日韩美少妇| 亚洲综合图片区| 91浏览器打开| 中文字幕一区二区三区四区不卡| 国产在线不卡视频| 欧美成人一区二区三区片免费| 午夜精品久久久久久久久久久| 一本色道亚洲精品aⅴ| 亚洲少妇屁股交4| 99re成人在线| 亚洲色图清纯唯美| 99久久精品免费| 综合久久一区二区三区| 91在线你懂得| 亚洲精品高清在线观看| 色综合中文字幕国产| 2021久久国产精品不只是精品| 捆绑变态av一区二区三区| 日韩美女在线视频| 国产一区二区三区美女| 国产欧美一区二区精品仙草咪| 国产一区二区精品久久91| 久久综合久久综合久久| 国产精品 欧美精品| 国产精品视频麻豆| 欧洲视频一区二区| 视频一区在线视频| 欧美精品一区二| 成人国产免费视频| 亚洲图片欧美色图| 欧美一区二区成人| 岛国精品在线观看| 一区二区三区中文字幕| 91精品国产综合久久香蕉麻豆| 久久66热偷产精品| 国产精品久久久久婷婷| 欧美性淫爽ww久久久久无| 日韩高清一级片| 久久久久久久久久久99999| proumb性欧美在线观看| 亚洲国产日产av| 久久久久久电影| 欧美优质美女网站| 卡一卡二国产精品| 亚洲视频网在线直播| 日韩亚洲电影在线| gogo大胆日本视频一区| 日韩一区精品视频| 国产欧美日韩另类一区| 欧美精品在线一区二区三区| 国产99久久久国产精品潘金网站| 亚洲香肠在线观看| 国产欧美一二三区| 欧美女孩性生活视频| 成人精品视频一区| 免费成人av在线| 亚洲精选在线视频| 精品粉嫩aⅴ一区二区三区四区| 色菇凉天天综合网| 国产乱码精品一区二区三区五月婷| 亚洲综合色婷婷| 国产精品国产自产拍在线| 欧美成人性福生活免费看| 欧美性感一类影片在线播放| 成人精品视频一区| 久久国产免费看| 五月综合激情婷婷六月色窝| 国产精品午夜在线观看| 日韩精品一区在线| 欧美男生操女生| 在线一区二区三区做爰视频网站| 国产精品一区免费在线观看| 美日韩黄色大片| 亚洲不卡在线观看| 一区二区三区不卡视频| 亚洲美女在线一区| 中文字幕av一区二区三区免费看| 精品粉嫩aⅴ一区二区三区四区| 欧美日韩视频在线观看一区二区三区| 成人综合在线观看| 国产精品99久久久| 国产激情精品久久久第一区二区| 蜜桃精品视频在线| 蓝色福利精品导航| 久久精品国产网站| 免费看日韩精品| 九色综合狠狠综合久久| 免费看欧美女人艹b| 麻豆久久一区二区| 久草在线在线精品观看| 精品无码三级在线观看视频| 卡一卡二国产精品| 国产精品资源在线看| 国产专区综合网| 久久精品欧美一区二区三区不卡 | 在线观看免费亚洲| 91天堂素人约啪| 大白屁股一区二区视频| 国产一区二区三区精品欧美日韩一区二区三区 | 亚洲欧美日韩一区二区三区在线观看| 国产午夜亚洲精品不卡| 国产亚洲一二三区| 国产精品白丝在线| 国产精品的网站| 一区二区成人在线视频| 亚洲一区二区三区爽爽爽爽爽| 亚洲五月六月丁香激情| 日韩成人午夜精品| 国产原创一区二区| 国产超碰在线一区| 91麻豆免费视频| 欧美日韩三级在线| 26uuu精品一区二区| 国产精品情趣视频| 亚洲国产wwwccc36天堂| 美国三级日本三级久久99| 国产伦精品一区二区三区视频青涩| 大尺度一区二区| 欧美三级中文字幕| 国产亚洲精品aa午夜观看| 亚洲男同1069视频| 蜜乳av一区二区| av高清不卡在线| 欧美一区二区三区爱爱| 国产精品每日更新| 天天影视涩香欲综合网| 国产白丝网站精品污在线入口| 在线国产亚洲欧美| 久久午夜电影网| 午夜精品视频一区| 北岛玲一区二区三区四区| 91精品国产91综合久久蜜臀| 国产精品久久久久久久久免费相片 | 国产精品888| 欧美精品电影在线播放| 成人欧美一区二区三区黑人麻豆| 日本人妖一区二区| 91搞黄在线观看|