| | |
| | | } |
| | | void IndustryCapture::refreshHWND() { |
| | | HWND hwnd = THSActionUtil::getIndustryWindow(); |
| | | if (hwnd <= 0) |
| | | throw string("同花顺行业页面未打开"); |
| | | if (hwnd <= 0) { |
| | | hwnd= THSActionUtil::getMainWin(); |
| | | if (hwnd <= 0) |
| | | { |
| | | throw string("同花顺主页未打开"); |
| | | } |
| | | |
| | | Win32Util::focus(hwnd); |
| | | Win32Util::keyboardNum(".00", 200); |
| | | Win32Util::keyboard(13, 10); |
| | | Sleep(1000); |
| | | hwnd = THSActionUtil::getIndustryWindow(); |
| | | if (hwnd <= 0) |
| | | { |
| | | throw string("同花顺行业页面打开失败"); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | HWND content = FindWindowExA(hwnd, NULL, "AfxFrameOrView100s", NULL); |
| | | |
| | |
| | | Sleep(10); |
| | | SendMessage(win, WM_LBUTTONUP, 0, MAKELONG(x, y)); |
| | | Sleep(10); |
| | | SendMessage(win, WM_MOUSEWHEEL, 0, MAKELONG(x, y)); |
| | | PostMessage(win, WM_MOUSEWHEEL, 0, MAKELONG(x, y)); |
| | | } |
| | | data_callback(dataList, context); |
| | | flist.push_back(dataList); |