listctrl的菜单

listctrl的菜单


void   dialog5::OnRclickList1(NMHDR*   pNMHDR,   LRESULT*   pResult)    
  {  
  //   TODO:   Add   your   control   notification   handler   code   here  
  CMenu   menu1,*menu2;  
  CPoint   point1;  
  menu1.LoadMenu(IDR_MENU1);  
  menu2=menu1.GetSubMenu(0);  
  ::GetCursorPos(&point1);  
  menu2->TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_RIGHTBUTTON,  
  point1.x,point1.y,this);  
   
  *pResult   =   0;  
  }  

你可能感兴趣的:(listctrl的菜单)