virtual void DeleteItem(
   LPDELETEITEMSTRUCT lpDeleteItemStruct //tagDELETEITEMSTRUCT tag={0};??????
);typedef struct tagDELETEITEMSTRUCT { /* ditms */
    UINT CtlType;
    UINT CtlID;
    UINT itemID;
    HWND hwndItem;
    UINT itemData;
} DELETEITEMSTRUCT;

解决方案 »

  1.   

    不用初始化,itemData是你给每项关联的一个数,一般这是个指针或者资源句柄,DeleteItem对它做清理
      

  2.   

    这个函数不需要你主动去掉吧。
    The default implementation of this function does nothing. Override this function to redraw an owner-draw list box as needed. See CWnd::OnDeleteItem for a description of the DELETEITEMSTRUCT structure. // CMyODListBox is my owner-drawn list box derived from CListBox. This 
    // example simply frees the item's text. The list box control was created 
    // with the following code:
    //   m_myODListBox.Create(
    //      WS_CHILD|WS_VISIBLE|WS_BORDER|WS_HSCROLL|WS_VSCROLL|
    //      LBS_SORT|LBS_MULTIPLESEL|LBS_OWNERDRAWVARIABLE|LBS_WANTKEYBOARDINPUT,
    //      CRect(10,250,200,450), pParentWnd, IDC_MYODLISTBOX);
    //
    void CMyODListBox::DeleteItem(LPDELETEITEMSTRUCT lpDeleteItemStruct)
    {
       ASSERT(lpDeleteItemStruct->CtlType == ODT_LISTBOX);
       LPVOID lpszText = (LPVOID) lpDeleteItemStruct->itemData;
       ASSERT(lpszText != NULL);   free(lpszText);   CListBox::DeleteItem(lpDeleteItemStruct);
    }
      

  3.   

    这个函数不是删除CListBox控件上的某一个条内容?这个函数是干嘛的
      

  4.   

    删除某一天应该是DeleteString %%Deletes a string from a list box. 看下MSDN就清楚了
      

  5.   


    CMyODListBox::DeleteItem//这个函数干嘛的?