mirror of http://192.168.1.51:8099/lmh188/twain3.0
71 lines
1.3 KiB
C++
71 lines
1.3 KiB
C++
// CIndicatorDlg.cpp: 实现文件
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "CIndicatorDlg.h"
|
|
#include "afxdialogex.h"
|
|
#include "resource.h"
|
|
|
|
|
|
// CIndicatorDlg 对话框
|
|
|
|
IMPLEMENT_DYNAMIC(CIndicatorDlg, CDialogEx)
|
|
|
|
CIndicatorDlg::CIndicatorDlg(std::function<void()> stop, CWnd* pParent /*=nullptr*/)
|
|
: CDialogEx(IDD_INDICATOR, pParent)
|
|
, m_stop(stop)
|
|
{
|
|
|
|
}
|
|
|
|
CIndicatorDlg::~CIndicatorDlg()
|
|
{
|
|
}
|
|
|
|
void CIndicatorDlg::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
CDialogEx::DoDataExchange(pDX);
|
|
}
|
|
|
|
BOOL CIndicatorDlg::OnInitDialog()
|
|
{
|
|
#ifdef LANXUM
|
|
GetDlgItem(IDC_BTNSTOPSCAN)->ShowWindow(SW_HIDE);
|
|
#endif // LANXUM
|
|
return 0;
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(CIndicatorDlg, CDialogEx)
|
|
ON_BN_CLICKED(IDC_BTNSTOPSCAN, &CIndicatorDlg::OnBnClickedBtnstopscan)
|
|
ON_WM_CLOSE()
|
|
END_MESSAGE_MAP()
|
|
|
|
|
|
// CIndicatorDlg 消息处理程序
|
|
|
|
|
|
void CIndicatorDlg::setindicatortext(int aquire, int updata)
|
|
{
|
|
wchar_t text[260] = { 0 };
|
|
_stprintf(text, L"扫描\t\t\t\t%d\n上传\t\t\t\t%d", aquire,updata);
|
|
GetDlgItem(IDC_STATIC)->SetWindowTextW(text);
|
|
}
|
|
|
|
void CIndicatorDlg::OnBnClickedBtnstopscan()
|
|
{
|
|
// TODO: 在此添加控件通知处理程序代码
|
|
if (m_stop)
|
|
m_stop();
|
|
}
|
|
|
|
|
|
void CIndicatorDlg::OnClose()
|
|
{
|
|
// TODO: 在此添加消息处理程序代码和/或调用默认值
|
|
|
|
if (m_stop)
|
|
m_stop();
|
|
CDialogEx::OnClose();
|
|
}
|