twain2/hugaotwainds/IndicatorDlg.cpp

67 lines
2.2 KiB
C++
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// IndicatorDlg.cpp: 实现文件
//
#include "stdafx.h"
#include "IndicatorDlg.h"
#include "afxdialogex.h"
// IndicatorDlg 对话框
IMPLEMENT_DYNAMIC(IndicatorDlg, CDialog)
IndicatorDlg::IndicatorDlg(MFC_UI *pUI,CWnd* pParent /*=nullptr*/)
: CDialog(IDD_DIALOG_INDICATOR, pParent)
{
m_ui=pUI;
//SetTimer(1, 100, NULL);
}
IndicatorDlg::~IndicatorDlg()
{
//KillTimer(1);
}
void IndicatorDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(IndicatorDlg, CDialog)
ON_BN_CLICKED(IDC_BTNSTOPSCAN, &IndicatorDlg::OnBnClickedBtnstopscan)
ON_WM_CLOSE()
END_MESSAGE_MAP()
// IndicatorDlg 消息处理程序
void IndicatorDlg::OnBnClickedBtnstopscan()
{
// TODO: 在此添加控件通知处理程序代码
CheckCnacel();
}
void IndicatorDlg::CheckCnacel()
{
int ret=IDYES;
if (!m_ui->m_pDS->IsImageQueueEmpty())
{
ret=MessageBox("仍有图像未传输完毕,确认停止传输?","提示",MB_YESNO|MB_ICONWARNING);//""
}
if (ret==IDYES)
{
m_ui->Cancel();
}
}
void IndicatorDlg::OnClose()
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
CheckCnacel();
CDialog::OnClose();
}