//  Beta release only.
//
//  Copyright(c) Ivyware Pty Ltd 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.
//
//
//  Implementation for CWnd extensions
//

#include "StdAfx.h"
#include "CWndApp_Ext.h"

//
//  CWndApp application file helpers
//  NOTES: Static functions are just simpler
//
P2PmsgMFC_EXT CString
CWinApp_LocalAppDataFilePath( LPCTSTR lpszDataFileName )
{
    USES_CONVERSION;

    WCHAR *pwszPathname;
    SHGetKnownFolderPath ( FOLDERID_LocalAppData, 0, NULL, &pwszPathname);
    CString strLocalAppDataFile((W2A(pwszPathname)));
    CoTaskMemFree(pwszPathname);
    strLocalAppDataFile += _T("\\");
    strLocalAppDataFile += lpszDataFileName;
    return strLocalAppDataFile;
}
