admin
2025-04-08 5c9991be21f57781573f04961ec511ac2938ea3d
FloatTrade/FloatTradeDlg.h
@@ -13,6 +13,10 @@
#include "SellStruct.h"
#include "SellManager.h"
#include "TipDlg.h"
#include "PositionDlg.h"
#include <ctime>
#include "ThsCodeOCR.h"
#include "DealQueueDlg.h"
#define WM_FLOAT_MSG (WM_USER + 100)
@@ -59,10 +63,33 @@
   // 持仓map
   map<string, CodePosition> positionMap;
   // 上次点击买的时间戳
   std::time_t lastBuyClickTime;
   SellManager* sellManager;
   map<string, SellDlg*> sellDlgMap;
   // 持仓
   PositionDlg* positionDialog;
   // 鼠标钩子
   static HHOOK hMouseHook;
   ThsCodeOCR* thsCodeOCR;
   // 最近一次识别的代码
   string lastOCRCode;
   // 代码识别的截止时间
   static long ocrCodeExpireTimestamp;
   // 是否可以识别
   bool canOCRCode;
   // 成交队列
   DealQueueDlg* dealQueueDlg;
   void initView();
@@ -77,7 +104,7 @@
   // 获取交易状态
   static void getTradeState(CFloatTradeDlg* context);
   static void getAutoCancelSellMode(CFloatTradeDlg* context);
   static void getAutoCancelSellMode(CFloatTradeDlg* context,string code);
   //获取交易模式
   static void getTradeMode(CFloatTradeDlg* context);
@@ -147,6 +174,18 @@
   // 填充预设金额
   void fillMoneys();
   static void runTHSCodeOCR(CFloatTradeDlg* context);
   // 设置目标代码
   void setTargetCode(string code);
   // 设置锁定信息
   void setLockInfo(string code, bool lock, int lockMoney);
   // 设置锁定买入金额
   void setLockBuyInfo(string code, bool lock, int lockMoney);
// 构造
public:
@@ -171,12 +210,12 @@
   afx_msg void OnPaint();
   afx_msg HCURSOR OnQueryDragIcon();
   DECLARE_MESSAGE_MAP()
   static LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam, LPARAM lParam);
   
public:
   afx_msg void OnClickedBtnAlreadyCanceled();
   afx_msg void OnClickedBtnBlack();
   afx_msg void OnClickedBtnBuyModeAll();
   afx_msg void OnClickedBtnBuyModeWant();
   afx_msg void OnClickedBtnCloseBuy();
   afx_msg void OnClickedBtnOpenBuy();
   afx_msg void OnClickedBtnPauseBuy();
@@ -240,7 +279,6 @@
   afx_msg void OnBnClickedCheckLockBuyVolume();
   virtual BOOL PreTranslateMessage(MSG* pMsg);
   afx_msg void OnBnClickedcodetradeupdatewatchbuy1();
   afx_msg void OnBnClickedButtonBuyCb();
   afx_msg void OnBnClickedButtonAddGreen();
   afx_msg void OnBnClickedButtonRemoveGreen();
   afx_msg void OnBnClickedButtonGreenList();
@@ -248,4 +286,8 @@
   CButton btnBuy;
   CComboBox comboBuyPriceType;
   afx_msg void OnBnClickedaddwatchlimitupforsell();
   afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
   afx_msg void OnClickedCheckOcrCode();
   afx_msg void OnDestroy();
   afx_msg void OnStnClickedStaticTotalPosition();
};