twain3.0/huagao/CIndicatorDlg.cpp

60 lines
1.1 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 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)
END_MESSAGE_MAP()
// CIndicatorDlg 消息处理程序
void CIndicatorDlg::setindicatortext(int aquire, int updata)
{
wchar_t text[260] = { 0 };
_stprintf(text, L"扫描中,已扫描%d份文件已上传%d张图片。", aquire,updata);
GetDlgItem(IDC_STATIC)->SetWindowTextW(text);
}
void CIndicatorDlg::OnBnClickedBtnstopscan()
{
// TODO: 在此添加控件通知处理程序代码
if (m_stop)
m_stop();
}