/*****************************************************************************
Open Source MIT License

Copyright (c) 2017 Matthew Ahmed

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*****************************************************************************/

#pragma once


// CFileCopyDlg dialog
#include "resource.h"
#include "ZDialog.h"
//#include "JpgFolders.h"

#define WMU_POSTINIT   WM_USER + 1

//class CJpgFolders;

class CFileCopyDlg : public CZDialog
{
	//DECLARE_DYNAMIC(CFileCopyDlg)

public:
	//CFileCopyDlg(CWnd* pParent = NULL);   // standard constructor
  CFileCopyDlg(CJpgFolders * pJpf, INT nCountToCopy, INT * nArrToCopy,
               LPCTSTR sSrcJpgName, LPCTSTR sTgtJpgName,
               HINSTANCE hInst, CZDialog * pOwner, LPCTSTR sCapt1,
               LPCTSTR sCapt2 = NULL, CSettings * pSet = NULL);

	virtual ~CFileCopyDlg();

// Dialog Data
	enum { IDD = IDD_FILECOPY };

  BOOL m_bAbort; // public so parent can check final status
  INT m_nCopied;

protected:
  void OnCancel();
  BOOL OnInitDialog();
  LRESULT OnWmuPostInit(WPARAM, LPARAM);
  BOOL CopyFiles();
  void OnShowWindow(BOOL bShow, UINT nStatus);
  BOOL m_bStartedCopy;

  CJpgFolders * m_pJpf;
  INT m_nCountToCopy;
  INT * m_nArrToCopy;
  HINSTANCE m_hInst;
  HWND m_hProgress;
  TCHAR m_sTgtJpg[100];
  TCHAR m_sSrcJpg[100];

	DECLARE_MESSAGE_MAP()
};
