<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                List Control控件是使用頻率比較高的一個控件,用它可以很好的做為數據報表的工具,而且比較方便操作和響應,經常可以和數據庫相互配合,它就像數據庫中的一張表一樣,來顯示數據庫中的數據。 下面結合實例從List Control的樣式及列名設置、數據設置和雙擊響應操作等幾個方面,詳細介紹List Control控件的使用方法。(完整的實例可在我的CSDN資源中下載:[http://download.csdn.net/detail/margin1988/4570315](http://download.csdn.net/detail/margin1988/4570315)) 首先,在界面中新加一個List Control控件,在其“屬性”中的“View”選項中選擇“Report”。其次,給該控件添加控件變量:**CListCtrl m_listctrl; **。最后,給該控件添加雙擊事件響應“NM_DBLCLK”。 (1)樣式及列名設置 ~~~ //list control控件顯示樣式設置 DWORD dwStyle = m_listctrl.GetExtendedStyle(); dwStyle |= LVS_EX_FULLROWSELECT; //使整行高亮 dwStyle |= LVS_EX_GRIDLINES;//網格線 m_listctrl.SetExtendedStyle(dwStyle); m_listctrl.InsertColumn(0,"ID號",LVCFMT_LEFT,100); m_listctrl.InsertColumn(1,"姓名",LVCFMT_LEFT,100); m_listctrl.InsertColumn(2,"性別",LVCFMT_LEFT,100); m_listctrl.InsertColumn(3,"年齡",LVCFMT_LEFT,100); m_listctrl.InsertColumn(4,"聯系地址",LVCFMT_LEFT,100); m_listctrl.InsertColumn(5,"聯系電話",LVCFMT_LEFT,100); m_listctrl.InsertColumn(6,"Email",LVCFMT_LEFT,100); ~~~ (2)數據設置 ~~~ //list control控件數據設置 CString str; for (int i=0;i<5;i++) { str.Format("%d",i); m_listctrl.InsertItem(i,str.GetBuffer()); for (int j=1;j<7;j++) { m_listctrl.SetItemText(i,j,"你好"); } } ~~~ (3)雙擊響應操作 ~~~ POSITION pos = m_listctrl.GetFirstSelectedItemPosition(); int index = m_listctrl.GetNextSelectedItem(pos); CString str; str.Format("您雙擊了第%d行!",index); if(index>=0) MessageBox(str); ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看