//  Beta release only.
//
//  Copyright(c) Ivyware Pty Ltd 2007, 2013  (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.
//
//
//  CListCtrl extension prototypes and definitions
//

#pragma   once
#include "P2PmsgMFC.h"
#include "P2Pmsg.h"

//
//  CListCtrl operational helpers
//  NOTES: Static functions are just simpler
P2PmsgMFC_EXT int
CListCtrl_FormatItem ( CListCtrl& oCListCtrl, int nRow, int nColumn
                     , LPCTSTR lpszFormat, ... );

P2PmsgMFC_EXT void
CListCtrl_DeleteAllColumns ( CListCtrl& oCListCtrl );

P2PmsgMFC_EXT void
CListCtrl_ClearTextAllSubItems ( CListCtrl& oCListCtrl, int nItem );

//
//  CHeaderCtrl operational helpers
P2PmsgMFC_EXT BOOL
CHeaderCtrl_GetItemText ( CHeaderCtrl *pHeader, CString& strItemText );

//
//  P2Pmsg - CListCtrl operational helpers
//  NOTES: Static function set for injecting P2Pmsg data sets into
//         CListCtrl objects
P2PmsgMFC_EXT BOOL
CListCtrl_MakeColumns ( CListCtrl& oCListCtrl, const P3PmsgNode& oNodeColumns );
P2PmsgMFC_EXT BOOL
CListCtrl_InsertRow ( CListCtrl& oCListCtrl, const P3PmsgNode& oNodeColumns );
