#pragma once #include #include #include #include #include #include "ImgUtil.h" #define L2_CHENNL_COUNT 6 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 tempFrames; static HWND level2Frames[L2_CHENNL_COUNT]; static HWND tradeQueueFrames[L2_CHENNL_COUNT]; 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); };