// TestGTradeDlg.h : header file
//
//{{AFX_INCLUDES()
#include "ice_gtrade.h"
//}}AFX_INCLUDES

#if !defined(AFX_TESTGTRADEDLG_H__39C4C832_146F_4C42_BD3B_7B1EE3E26584__INCLUDED_)
#define AFX_TESTGTRADEDLG_H__39C4C832_146F_4C42_BD3B_7B1EE3E26584__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CTestGTradeDlg dialog

class CTestGTradeDlg : public CDialog
{
// Construction
public:
	CTestGTradeDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CTestGTradeDlg)
	enum { IDD = IDD_TESTGTRADE_DIALOG };
	CComboBox	m_comboStatementType;
	CComboBox	m_comboSession;
	CListCtrl	m_listOrderStatus;
	CListCtrl	m_listFillOrder;
	CString m_strProfilePath;
	CString	m_strFutAccount;
	CString	m_strOptAccount;
	CString	m_strStkAccount;
	CString	m_strFutExchange;
	CString	m_strFutMonth;
	CString	m_strOptMonth;
	CString	m_strOrderNo;
	CString	m_strOptPrice;
	CString	m_strFutPrice;
	CString	m_strStkPrice;
	CString	m_strFutQty;
	CString	m_strOptQty;
	CString	m_strStkQty;
	CString	m_strReduceQty;
	CString	m_strFutStopPrice;
	CString	m_strOptStrikePrice;
	CString	m_strFutSymbol;
	CString	m_strOptSymbol;
	CString	m_strStkSymbol;
	CString	m_strFutType;
	CString	m_strOptType;
	CString	m_strStkType;
	CString	m_strFutUserKey;
	CString	m_strOptUserKey;
	CString	m_strStkUserKey;
	CString	m_strReduceType;
	CString	m_strFutBuySell;
	CString	m_strFutBuySell2;
	CString	m_strOptBuySell;
	CString	m_strOptBuySell2;
	CString	m_strStkBuySell;
	CString	m_strOptCallPut;
	CString	m_strOptCallPut2;
	CString	m_strFutDayTrade;
	CString	m_strOptDayTrade;
	CString	m_strStkMarketType;
	CString	m_strFutOpenClose;
	CString	m_strOptOpenClose;
	CString	m_strFutOrderType;
	CString	m_strOptOrderType;
	CString	m_strStkOrderType;
	CString	m_strFutPriceFlag;
	CString	m_strOptPriceFlag;
	CString	m_strStkPriceFlag;
	CString	m_strStkStockType;
	CString	m_strOptStopPrice;
	CICE_gTrade	m_API;
	CString	m_strLicensePath;
	CString	m_strFutMonth2;
	CString	m_strOptMonth2;
	CString	m_strOptStrikePrice2;
	CString	m_strFutSymbol2;
	CString	m_strOptSymbol2;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTestGTradeDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;
	CString m_strLog;
	CMapPtrToPtr	m_mapOrderList;
	CMapPtrToPtr	m_mapDealList;

	void SaveProperties();
	void LoadProperties();
	void ReloadSessions();
	void WriteLog(CString strLog);

	// Generated message map functions
	//{{AFX_MSG(CTestGTradeDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButtonPlaceStkOrder();
	afx_msg void OnButtonBrowse();
	afx_msg void OnButtonPlaceFutOrder();
	afx_msg void OnButtonPlaceOptOrder();
	afx_msg void OnButtonReduceOrder();
	afx_msg void OnClose();
	afx_msg void OnButtonLogin();
	afx_msg void OnButtonLogout();
	afx_msg void OnLoginReady(LPCTSTR strSession);
	afx_msg void OnLoginFail(LPCTSTR strSession, LPCTSTR strErrorMsg);
	afx_msg void OnConnectionLost(LPCTSTR strSession);
	afx_msg void OnLog(LPCTSTR strSession, long nLogType, LPCTSTR strLog);
	afx_msg void OnOrderStatus(long nIndex);
	afx_msg void OnFillOrder(long nIndex);
	afx_msg void OnStatementUpdate(long nInfoType);
	afx_msg void OnButtonQueryStatement();
	afx_msg void OnButtonRetrive();
	afx_msg void OnClickListOrderStatus(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnButtonBrowse2();
	afx_msg void OnButtonLicense();
	afx_msg void OnButtonGetLicense();
	DECLARE_EVENTSINK_MAP()
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_TESTGTRADEDLG_H__39C4C832_146F_4C42_BD3B_7B1EE3E26584__INCLUDED_)
