//  Beta release only.
//
//  Copyright(c) Ivyware Pty Ltd 2002  (all rights reserved)
//               MELBOURNE, VICTORIA, AUSTRALIA, 3130
//
//  Provided no fee is charged (either by the distributer or user)
//  permission to use, copy, modify, and distribute this software and
//  its documentation for any purpose and without fee is hereby granted,
//  provided that the above copyright notice appear in all copies and
//  that both that copyright notice and this permission notice appear
//  in supporting documentation.
//
//  No waranty or suitablity for purpose is implied.
//
//
//  CTreeCtrl static function extensions
//

#pragma   once
#include "P2PmsgMFC.h"

//  Callback functions for movement of item data
typedef LPARAM(*fptrCTreeCtrl_MoveItem)(CTreeCtrl* pTreeCtrl, HTREEITEM hItemSource, HTREEITEM hItemDest);
typedef LPARAM(*PFNMTICOPYDATA)(const CTreeCtrl& oTreeCtrl, HTREEITEM, LPARAM);

//
//  CTreeCtrl movement helpers
//  NOTES: Static functions are just simpler
P2PmsgMFC_EXT HTREEITEM
CTreeCtrl_MoveItem_ ( CTreeCtrl& oCTreeCtrl, HTREEITEM hItem, HTREEITEM hItemTo 
		               , BOOL bCopyOnly = FALSE, PFNMTICOPYDATA pfnCopyData = NULL
		               , HTREEITEM hItemPos = TVI_LAST );
P2PmsgMFC_EXT HTREEITEM
CTreeCtrl_MoveItem ( CTreeCtrl *pCTreeCtrl
                   , HTREEITEM hItem, HTREEITEM hItemParent, HTREEITEM hItemAfter
                   , fptrCTreeCtrl_MoveItem fptrMoveItem = 0 );

//
