#pragma once
|
#include <list>
|
#include <iostream>
|
#include <math.h>
|
#include<Windows.h>
|
|
#include <string>
|
#include "ImgUtil.h"
|
using namespace std;
|
enum CaptureContentType {
|
CAPTURE_TYPE_L2,
|
CAPTURE_TYPE_TRADE_QUEUE,
|
};
|
struct FrameInfo
|
{
|
HWND frame;
|
RECT position;
|
|
bool operator < (FrameInfo& b) {
|
return position.left < b.position.left;
|
}
|
|
};
|
class CaptureUtil
|
{
|
private:
|
static std::list<FrameInfo> tempFrames;
|
static HWND level2Frames[8];
|
static HWND tradeQueueFrames[8];
|
static BOOL CALLBACK EnumChildProc(HWND hwndChild, LPARAM lParam);
|
|
|
public:
|
//³õʼ»¯
|
static void init(HWND l2win);
|
|
static HWND getHWND(int index, CaptureContentType type);
|
|
//½ØÍ¼
|
static cv::Mat capture(int index, CaptureContentType type);
|
|
|
static cv::Mat capture(HWND frame);
|
|
};
|