#include "stdafx.h"
#include "PJNSMTPApp.h"
#include "SendingDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif

#pragma warning(suppress: 26455)
CSendingDlg::CSendingDlg(CWnd* pParent) : CDialog(CSendingDlg::IDD, pParent),
                                          m_bSafeToClose(false),
                                          m_bAbort(false)
{
}

void CSendingDlg::DoDataExchange(CDataExchange* pDX)
{
  __super::DoDataExchange(pDX);

  DDX_Control(pDX, IDC_PROGRESS1, m_ctrlProgress);
}

#pragma warning(suppress: 26433 26440)
BEGIN_MESSAGE_MAP(CSendingDlg, CDialog) //NOLINT(clang-diagnostic-unused-local-typedef, modernize-avoid-c-arrays)
END_MESSAGE_MAP()

BOOL CSendingDlg::OnInitDialog()
{
  //Let the base class do its thing
  __super::OnInitDialog();

  //Set the initialized event
  m_evtInitialized.SetEvent();

  return TRUE;
}

void CSendingDlg::OnCancel()
{
  if (m_bSafeToClose)
    __super::OnCancel();
  else
    m_bAbort = true;
}
