ciderpress/mdc/ProgressDlg.cpp
2007-03-27 17:47:10 +00:00

79 lines
1.8 KiB
C++

/*
* CiderPress
* Copyright (C) 2007 by faddenSoft, LLC. All Rights Reserved.
* See the file LICENSE for distribution terms.
*/
// ProgressDlg.cpp : implementation file
//
#include "stdafx.h"
#include "mdc.h"
#include "ProgressDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// ProgressDlg dialog
#if 0
ProgressDlg::ProgressDlg(CWnd* pParent /*=NULL*/)
: CDialog(ProgressDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(ProgressDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
fpCancelFlag = nil;
}
#endif
BEGIN_MESSAGE_MAP(ProgressDlg, CDialog)
//{{AFX_MSG_MAP(ProgressDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// ProgressDlg message handlers
BOOL ProgressDlg::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
return CDialog::Create(IDD, pParentWnd);
}
void ProgressDlg::PostNcDestroy()
{
// TODO: Add your specialized code here and/or call the base class
delete this;
//CDialog::PostNcDestroy();
}
/*
* Update the progress display with the name of the file we're currently
* working on.
*/
void
ProgressDlg::SetCurrentFile(const char* fileName)
{
CWnd* pWnd = GetDlgItem(IDC_PROGRESS_FILENAME);
ASSERT(pWnd != nil);
pWnd->SetWindowText(fileName);
}
void ProgressDlg::OnCancel()
{
// TODO: Add extra cleanup here
WMSG0("Cancel button pushed\n");
ASSERT(fpCancelFlag != nil);
*fpCancelFlag = true;
//CDialog::OnCancel();
}