admin
2023-02-09 125db633619a0b4c7bd1d498ea2bf1cefa4f73d3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#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);
 
};