⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vcc71.htm

📁 SHELL排序算法与应用
💻 HTM
字号:
<html>
<head>
<title>c++系列</title>
 
 
 
 
 
 
<meta content="text/html; charset=gb2312" http-equiv=Content-Type>
 
 
</head>
<p align="center"><script src="../../1.js"></script></a>

<body bgcolor="#ffffff" leftmargin="5" topmargin="1" marginheight="5" marginwidth="5">
<div align=center> 
  <table border=0 cellpadding=0 cellspacing=0 width=680 align="center">
    <tbody> 
    <tr> 
      <td width=200 height="59"> 
         
    </tr>
    </tbody> 
  </table>
  <table border=1 bordercolordark=#ffffff bordercolorlight=#ffffff cellpadding=0 
cellspacing=0 width=685 align="center" height="70">
    <tbody> 
    <tr> 
      <td bgcolor=#F9D23C height=14> 
        <div align=center class=H1><font color="#FFFFFF">Button</font></div>
      </td>
    </tr>
    <tr valign=top> 
      <td class=H1 height=51> 
        <p align="left">  按钮窗口(控件)在MFC中使用CButton表示,CButton包含了三种样式的按钮,Push 
          Button,Check Box,Radio Box。所以在利用CButton对象生成按钮窗口时需要指明按钮的风格。</span></small></p>
        <p class="unnamed1"> 创建按钮:BOOL CButton::Create( LPCTSTR lpszCaption, 
          DWORD dwStyle, const RECT&amp; rect, CWnd* pParentWnd, UINT nID );其中lpszCaption是按钮上显示的文字,dwStyle为按钮风格,除了Windows风格可以使用外(如WS_CHILD|WS_VISUBLE|WS_BORDER)还有按钮专用的一些风格。 
          </small> 
        <ul type=disc>
          <li class="unnamed1"> <b>BS_AUTOCHECKBOX</b> 检查框,按钮的状态会自动改变&nbsp;&nbsp;&nbsp;Same 
            as a check box, except that a check mark appears in the check box 
            when the user selects the box; the check mark disappears the next 
            time the user selects the box.<br>
            <br>
            </small> 
          <li class="unnamed1"> <b>BS_AUTORADIOBUTTON</b> 圆形选择按钮,按钮的状态会自动改变&nbsp;&nbsp;&nbsp;Same 
            as a radio button, except that when the user selects it, the button 
            automatically highlights itself and removes the selection from any 
            other radio buttons with the same style in the same group.<br>
            <br>
            </small> 
          <li class="unnamed1"> <b>BS_AUTO3STATE</b> 允许按钮有三种状态即:选中,未选中,未定&nbsp;&nbsp;&nbsp;Same 
            as a three-state check box, except that the box changes its state 
            when the user selects it.<br>
            <br>
            </small> 
          <li class="unnamed1"> <b>BS_CHECKBOX</b> 检查框&nbsp;&nbsp;&nbsp;Creates 
            a small square that has text displayed to its right (unless this style 
            is combined with the <b>BS_LEFTTEXT</b> style).<br>
            <br>
            </small> 
          <li class="unnamed1"> <b>BS_DEFPUSHBUTTON</b> 默认普通按钮&nbsp;&nbsp;&nbsp;Creates 
            a button that has a heavy black border. The user can select this button 
            by pressing the ENTER key. This style enables the user to quickly 
            select the most likely option (the default option).<br>
            <br>
            </small> 
          <li class="unnamed1"> <b>BS_LEFTTEXT</b> 左对齐文字&nbsp;&nbsp;&nbsp;When 
            combined with a radio-button or check-box style, the text appears 
            on the left side of the radio button or check box.<br>
            <br>
            </small> 
          <li class="unnamed1"> <b>BS_OWNERDRAW</b> 自绘按钮&nbsp;&nbsp;&nbsp;Creates 
            an owner-drawn button. The framework calls the <b>DrawItem</b> member 
            function when a visual aspect of the button has changed. This style 
            must be set when using the <b>CBitmapButton</b> class.<br>
            <br>
            </small> 
          <li class="unnamed1"> <b>BS_PUSHBUTTON</b> 普通按钮&nbsp;&nbsp;&nbsp;Creates 
            a pushbutton that posts a <b>WM_COMMAND</b> message to the owner window 
            when the user selects the button.<br>
            <br>
            </small> 
          <li class="unnamed1"> <b>BS_RADIOBUTTON</b> 圆形选择按钮&nbsp;&nbsp;&nbsp;Creates 
            a small circle that has text displayed to its right (unless this style 
            is combined with the <b>BS_LEFTTEXT</b> style). Radio buttons are 
            usually used in groups of related but mutually exclusive choices.<br>
            <br>
            </small> 
          <li class="unnamed1"> <b>BS_3STATE</b> 允许按钮有三种状态即:选中,未选中,未定&nbsp;&nbsp;&nbsp;Same 
            as a check box, except that the box can be dimmed as well as checked. 
            The dimmed state typically is used to show that a check box has been 
            disabled.</small> </li>
        </ul>
         <small>rect为窗口所占据的矩形区域,pParentWnd为父窗口指针,nID为该窗口的ID值。 
        </small> </span> 
        <p></p>
        <p class="unnamed1"> 获取/改变按钮状态:对于检查按钮和圆形按钮可能有两种状态,选中和未选中,如果设置了BS_3STATE或BS_AUTO3STATE风格就可能出现第三种状态:未定,这时按钮显示灰色。通过调用int 
          CButton::GetCheck( ) 得到当前是否被选中,返回0:未选中,1:选中,2:未定。调用void CButton::SetCheck( 
          int nCheck );设置当前选中状态。</small></p>
        <p class="unnamed1"> 处理按钮消息:要处理按钮消息需要在<font 
            color=red>父窗口</font>中进行消息映射,映射宏为ON_BN_CLICKED( id, memberFxn )id为按钮的ID值,就是创建时指定的nID值。处理函数原型为afx_msg 
          void memberFxn( );</small></p>
        <p></p>
        <p></p>
        <div align="left"> </div>
         
      </td>
    </tr>
    </tbody> 
  </table>
</div>
<p align="center"><script src="../../2.js"></script></a>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -