• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            啤酒

            一個空白者

             

            隨筆!

            //////////////////////////////////////////////////////////////////////////////////////////?
            這樣可以選中呀
            int nItem = -1;
            ?nItem = m_listApp.GetNextItem(nItem, LVNI_SELECTED);
            ?m_listApp.DeleteItem(nItem);
            ////////////////////////////////////////////////////////////////////////////////////////////
            1。彈出方式菜單
            // The code fragment shows how to get the File menu from the
            // application window and displays it as a floating popup menu
            // when the right mouse button is clicked in view.
            // CMyView is a CView-derived class.
            void CMyView::OnRButtonDown(UINT nFlags, CPoint point) 
            {
            ??CView::OnRButtonDown(nFlags, point);
            
            ??CMenu* menu_bar = AfxGetMainWnd()->GetMenu();
            ??CMenu* file_menu = menu_bar->GetSubMenu(0); 
            ??ASSERT(file_menu);
            
            ??file_menu->TrackPopupMenu(TPM_LEFTALIGN |TPM_RIGHTBUTTON, point.x, 
            ????point.y, this);
            }
            2。圖標(biāo)設(shè)置
            BOOL CListCtrlDemoDlg::InitImageList()
            {
            ?// Create 256 color image lists
            ?HIMAGELIST hList = ImageList_Create(32,32, ILC_COLOR8 |ILC_MASK , 8, 1);
            ?m_cImageListNormal.Attach(hList);
            ?hList = ImageList_Create(16, 16, ILC_COLOR8 | ILC_MASK, 8, 1);
            ?m_cImageListSmall.Attach(hList);

            ?


            ?// Load the large icons
            ?CBitmap cBmp;

            ?

            ?cBmp.LoadBitmap(IDB_IMAGES_NORMAL);
            ?m_cImageListNormal.Add(&cBmp, RGB(255,0, 255));
            ?cBmp.DeleteObject();

            ?

            ?// Load the small icons
            ?cBmp.LoadBitmap(IDB_IMAGES_SMALL);
            ?m_cImageListSmall.Add(&cBmp, RGB(255,0, 255));

            ?

            ?// Attach them
            ?m_cListCtrl.SetImageList(&m_cImageListNormal, LVSIL_NORMAL);
            ?m_cListCtrl.SetImageList(&m_cImageListSmall, LVSIL_SMALL);

            ?

            ?return TRUE;

            }
            3。插入圖標(biāo)
            /////////////////////////////////////////////////////////////////////////////
            void CListCtrlDemoDlg::InsertItems()
            {
            ?//刪除所有的當(dāng)前條目內(nèi)容
            ?m_cListCtrl.DeleteAllItems();

            ?

            ?//用LV_ITEM結(jié)構(gòu)指向要插入的條目
            ?LVITEM lvi;
            ?CString strItem;
            ?for (int i = 0; i < m_nItems; i++)
            ?{
            ??// Insert the first item
            ??lvi.mask =? LVIF_IMAGE | LVIF_TEXT;
            ??strItem.Format(_T("Item %d"), i);
            ?
            ??lvi.iItem = i;

            ?

            ??lvi.iSubItem = 0;
            ??lvi.pszText = (LPTSTR)(LPCTSTR)(strItem);
            ??lvi.iImage = i%8;??// There are 8 images in the image list
            ??m_cListCtrl.InsertItem(&lvi);

            ?

            ??// Set subitem 1
            ??strItem.Format(_T("%d"), 10*i);
            ??lvi.iSubItem =1;
            ??lvi.pszText = (LPTSTR)(LPCTSTR)(strItem);
            ??m_cListCtrl.SetItem(&lvi);

            ?

            ??// Set subitem 2
            ??strItem.Format(_T("%s"), COleDateTime::GetCurrentTime().Format(_T("Created: %I:%M:%S %p, %m/%d/%Y")));
            ??lvi.iSubItem =4;
            ??lvi.pszText = (LPTSTR)(LPCTSTR)(strItem);
            ??m_cListCtrl.SetItem(&lvi);

            ?

            ?}
            }
            4。刪除條目
            void CMmDlg::OnDelete()
            {
            ?int i,iState;

            ?int nItemSelected=m_mm_host_ListCtrl.GetSelectedCount();//得到所選表項(xiàng)數(shù)

            ?int nItemCount=m_mm_host_ListCtrl.GetItemCount();//得到表項(xiàng)總數(shù)

            ?if(nItemSelected<1)//如果沒有選中行,退出
            ??return;

            ?for(i=nItemCount-1;i>=0;i--)
            ?{

            ??iState=m_mm_host_ListCtrl.GetItemState(i,LVIS_SELECTED);

            ??if(iState!=0)
            ???m_mm_host_ListCtrl.DeleteItem(i);
            ?}
            }
            5。擊活條目

            void CMmDlg::OnClickList(NMHDR* pNMHDR, LRESULT* pResult)
            {
            ?// TODO: Add your control notification handler code here
            ?int nItem = -1;
            ?
            ?LPNMITEMACTIVATE lpNMItemActivate = (LPNMITEMACTIVATE)pNMHDR;

            ?if(lpNMItemActivate != NULL)
            ?{
            ??nItem = lpNMItemActivate->iItem;
            ?}

            ?//CString str;
            ?//str.Format("%d",nItem);
            ?//MessageBox(str);

            ?*pResult = 0;
            }

            posted on 2006-08-30 14:48 啤酒 閱讀(367) 評論(1)  編輯 收藏 引用

            評論

            # re: 隨筆! 2010-02-04 16:53 uFSophie

            Some students think that writing the <a href="http://quality-papers.com/topics/communication_and_media_essays">communication and media essays</a> supposes to be not hard, but I argue that the only professional web writing services would create the research papers of top quality.   回復(fù)  更多評論   


            只有注冊用戶登錄后才能發(fā)表評論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


            導(dǎo)航

            統(tǒng)計

            常用鏈接

            留言簿(2)

            隨筆檔案

            收藏夾

            搜索

            最新評論

            閱讀排行榜

            評論排行榜

            精品精品国产自在久久高清| 久久丝袜精品中文字幕| 亚洲国产精品成人久久| 成人资源影音先锋久久资源网| 99国内精品久久久久久久| 2021国产精品午夜久久| 久久综合综合久久97色| 伊人久久久AV老熟妇色| 久久久久久一区国产精品| 久久人人爽人人爽人人片av高请| 国内精品久久久久影院网站| 色综合久久久久综合99| 久久国产精品成人免费| 久久永久免费人妻精品下载| 中文成人无码精品久久久不卡 | 亚洲国产成人久久精品影视| 色妞色综合久久夜夜| 99久久综合国产精品二区| 久久香蕉国产线看观看精品yw| 欧美成a人片免费看久久| 国产午夜久久影院| 久久久久99精品成人片试看| 久久人人爽人人人人爽AV| 久久人人超碰精品CAOPOREN| 久久精品国产亚洲一区二区| 嫩草伊人久久精品少妇AV| 伊人久久成人成综合网222| 久久人人爽人爽人人爽av| 久久亚洲精品无码播放| 久久久久久国产精品免费免费| 成人午夜精品久久久久久久小说| 狠色狠色狠狠色综合久久| 精品久久一区二区| 久久天堂电影网| 久久99精品久久久久久9蜜桃 | 97久久超碰成人精品网站| 中文精品久久久久人妻不卡| 中文字幕久久精品无码| 人妻精品久久无码专区精东影业| 精品久久久久久国产潘金莲| 久久久久夜夜夜精品国产|