欧美大屁股bbbbxxxx,狼人大香伊蕉国产www亚洲,男ji大巴进入女人的视频小说,男人把ji大巴放进女人免费视频,免费情侣作爱视频

歡迎來到入門教程網(wǎng)!

C語言

當(dāng)前位置:主頁 > 軟件編程 > C語言 >

C++ 中CListCtrl的每個(gè)項(xiàng)都顯示不同的提示信息

來源:本站原創(chuàng)|時(shí)間:2020-01-10|欄目:C語言|點(diǎn)擊: 次

C++ 中CListCtrl的每個(gè)項(xiàng)都顯示不同的提示信息

添加CToolTipCtrl成員變量m_toolTipCtrl,CListCtrl成員變量m_ListUser,CImageList成員變量m_imageList(這個(gè)可以不要)

在OnInitDialog()函數(shù)里加下面代碼

m_BoradcastEnd.EnableWindow(FALSE); 
  m_imageList.Create(32, 32, ILC_COLOR8, 2, 2); 
  DWORD dwStyle = m_ListUser.GetExtendedStyle();  
  dwStyle |= LVS_EX_INFOTIP;  
  m_ListUser.SetExtendedStyle(dwStyle);  
   
  for (int i=0; i<5; i++) 
  { 
    CBitmap bit; 
    bit.LoadBitmap(IDB_TEA_ONLINE+i); 
    m_imageList.Add(&bit, RGB(0, 0, 0)); 
    bit.DeleteObject(); 
  } 
   
  EnableToolTips(TRUE); 
  m_toolTipCtrl.Create(this); 
  m_toolTipCtrl.SetMaxTipWidth(500);//若屏蔽這行提示信息的格式可能會(huì)出現(xiàn)問題,不能換行 
  m_toolTipCtrl.Activate(TRUE);  
  m_ListUser.SetImageList(&m_imageList, TVSIL_NORMAL); 
  m_ListUser.InsertItem(0, "172.16.30.32.231", 0); 
  m_ListUser.InsertItem(1, "172.16.30.218", 4); 
  CRect rect; 
  m_ListUser.GetItemRect(0, &rect, LVIR_BOUNDS); 
  m_toolTipCtrl.AddTool(&m_ListUser, "MAC:/nHost:/nIP:", &rect, 1);  
  m_ListUser.GetItemRect(1, &rect, LVIR_BOUNDS); 
  m_toolTipCtrl.AddTool(&m_ListUser, "gggggggggg/nggggggggsfgsfgsfg", &rect, 2); 

添加虛函數(shù)PreTranslateMessage()

在函數(shù)里添加下面代碼

BOOL CMutiScreenDlg::PreTranslateMessage(MSG* pMsg)  
{ 
  // TODO: Add your specialized code here and/or call the base class 
  m_toolTipCtrl.RelayEvent(pMsg); 
   
  return CDialog::PreTranslateMessage(pMsg); 
} 

如有疑問請(qǐng)留言或者到本站社區(qū)交流討論,希望通過本文能幫助到大家,謝謝大家對(duì)本站的支持!

網(wǎng)頁制作CMS教程網(wǎng)絡(luò)編程軟件編程腳本語言數(shù)據(jù)庫服務(wù)器

如果侵犯了您的權(quán)利,請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)進(jìn)行處理、任何非本站因素導(dǎo)致的法律后果,本站均不負(fù)任何責(zé)任。

聯(lián)系QQ:835971066 | 郵箱:835971066#qq.com(#換成@)

Copyright © 2002-2020 腳本教程網(wǎng) 版權(quán)所有