code_twain/sane/DlgIndicator.h

56 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.

#pragma once
#include <Windows.h>
#include <string>
#include <map>
#include "DlgPage.h"
// CDlgIndicator 对话框
class dlg_indicator : public dlg_base
{
unsigned int papers_;
unsigned int images_;
bool err_;
bool finish_;
BOOL handle_message(UINT msg, WPARAM wp, LPARAM lp) override;
void handle_command(WORD code, WORD id, HANDLE ctrl);
void notify_over(bool cancel);
public:
dlg_indicator(HWND parent);
~dlg_indicator();
public:
HWND window(void);
HWND parent(void);
void notify_data_arrived(bool image);
void notify_scan_over(const char* msg, bool err);
void notify_working(void);
};
typedef struct _dev_que
{
int id; // ID用户选中后返回该值
std::string name; // 设备名称
std::string sn; // 设备序列号
}DEVQUE;
class dlg_choose_dev : public dlg_base
{
std::string sel_;
int item_;
BOOL handle_message(UINT msg, WPARAM wp, LPARAM lp) override;
void handle_command(WORD code, WORD id, HANDLE ctrl);
void handle_notify(UINT id, LPNMHDR pnhdr);
public:
dlg_choose_dev(HWND parent, const std::vector<DEVQUE>& devs);
~dlg_choose_dev();
public:
std::string get_selected_device(void);
};