默认情况下是+和-号,请问如何替换成自己想要的图片?

解决方案 »

  1.   

    TVITEM Structure--------------------------------------------------------------------------------Specifies or receives attributes of a tree-view item. This structure is identical to the TV_ITEM structure, but it has been renamed to follow current naming conventions. New applications should use this structure.typedef struct tagTVITEM {
        UINT mask;
        HTREEITEM hItem;
        UINT state;
        UINT stateMask;
        LPTSTR pszText;
        int cchTextMax;
        int iImage;
        int iSelectedImage;
        int cChildren;
        LPARAM lParam;
    } TVITEM, *LPTVITEM;
    iImage
    Index in the tree-view control's image list of the icon image to use when the item is in the nonselected state. If this member is the I_IMAGECALLBACK value, the parent window is responsible for storing the index. In this case, the tree-view control sends the parent a TVN_GETDISPINFO notification message to retrieve the index when it needs to display the image.
    iSelectedImage
    Index in the tree-view control's image list of the icon image to use when the item is in the selected state. If this member is the I_IMAGECALLBACK value, the parent window is responsible for storing the index. In this case, the tree-view control sends the parent a TVN_GETDISPINFO notification message to retrieve the index when it needs to display the image.
      

  2.   

    CTreeCtrl::SetImageListThis method sets the normal or state image list for a tree view control and redraw the control using the new images.CImageList* SetImageList( 
    CImageList * pImageList, 
    int nImageListType ); 
    Parameters pImageList 
    Specifies the pointer to the image list to assign. If pImageList is NULL, all images are removed from the tree view control. 
    nImageListType 
    Specifies the type of image list to set. The image list can be one of the following values: 
    TVSIL_NORMAL   Sets the normal image list, which contains the selected and nonselected images for the tree view item. 
    TVSIL_STATE   Sets the state image list, which contains the images for tree view items that are in a user-defined state
      

  3.   

    http://www.codeproject.com/treectrl/mixed_elementtypes_tree.asp