This commit is contained in:
2013-09-02 20:43:43 +00:00
parent 541823d843
commit 0be482156a
10 changed files with 54 additions and 20 deletions

View File

@@ -71,6 +71,7 @@ END
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDR_MAINFRAME ICON "res\\CPRobot.ico"
IDI_ICON_STOCK ICON "res\\HandDrawIcon.ico"
/////////////////////////////////////////////////////////////////////////////
//
@@ -83,8 +84,8 @@ EXSTYLE WS_EX_APPWINDOW
CAPTION "Option Robot"
FONT 8, "MS Shell Dlg", 400, 0, 0x0
BEGIN
PUSHBUTTON "잔고 확인\n및\n데이터 로드",IDC_BUTTON_REFRESH_BALANCE,263,11,50,28,BS_MULTILINE
GROUPBOX "거래 금액",IDC_STATIC,7,7,252,34
PUSHBUTTON "잔고 확인\n및\n데이터 로드",IDC_BUTTON_REFRESH_BALANCE,263,11,50,28,BS_MULTILINE | NOT WS_VISIBLE | NOT WS_TABSTOP
GROUPBOX "거래 금액",IDC_STATIC,7,7,305,34
EDITTEXT IDC_EDIT_ORDERINGPRICE,16,20,67,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
LTEXT "원",IDC_STATIC_BALANCE,87,23,134,8,NOT WS_GROUP
GROUPBOX "매수 조건",IDC_STATIC,7,44,305,38
@@ -108,7 +109,7 @@ BEGIN
EDITTEXT IDC_EDIT_CANCEL_DELAY,251,102,38,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
LTEXT "ms",IDC_STATIC,290,106,10,8,NOT WS_GROUP
PUSHBUTTON "검색",IDC_BUTTON_SEARCH,205,131,50,14
PUSHBUTTON "거래 시작",IDC_BUTTON_START_DEAL,263,131,50,14
DEFPUSHBUTTON "거래 시작",IDC_BUTTON_START_DEAL,263,131,50,14
LISTBOX IDC_LIST_ITEMS,7,150,305,86,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
END

View File

@@ -268,6 +268,10 @@
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File
RelativePath=".\res\06_robot.ico"
>
</File>
<File
RelativePath=".\res\CPRobot.ico"
>
@@ -280,6 +284,14 @@
RelativePath=".\res\CPRobot.rc2"
>
</File>
<File
RelativePath=".\res\HandDrawIcon.ico"
>
</File>
<File
RelativePath=".\res\icon2.ico"
>
</File>
</Filter>
</Files>
<Globals>

Binary file not shown.

View File

@@ -4,7 +4,6 @@
#pragma once
#include "afxwin.h"
#include "EventHandler.h"
#include "OptionEventHandler.h"
#include "Trader.h"
#include <string>
#include <vector>
@@ -34,7 +33,7 @@ enum CP_STATE
};
// CCPRobotDlg 대화 상자
class CCPRobotDlg : public CDialog, public IEventHandler
class CCPRobotDlg : public CDialog, public IEventHandlerSysDib, public IEventHandlerDib
{
// 생성입니다.
public:
@@ -52,7 +51,8 @@ public:
afx_msg void OnHotKey(UINT nHotKeyId, UINT nKey1, UINT nKey2);
virtual void Received();
virtual void ReceivedSysDib();
virtual void ReceivedDib();
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 지원입니다.
@@ -77,7 +77,7 @@ private:
vector<string> m_OpCodeList;
CpSysDib::ISysDibPtr m_pOpJpBid;
CEventHandlerSysDib m_EventHandler;
CEventHandlerSysDib m_EventHandlerSysDib;
string m_AccountNum;
@@ -101,6 +101,9 @@ private:
int m_iOrderNum;
CTime m_BoughtT;
CpDib::IDibPtr m_pCpFConclusion;
CEventHandlerDib m_EventHandlerDib;
ATOM m_IdKeyFxCall;
ATOM m_IdKeyFxPut;
ATOM m_IdKeyFxStop;
@@ -116,7 +119,4 @@ private:
inline void SwitchState(const CP_STATE enState);
void CPLog(const std::string fmt, ...);
public:
afx_msg void OnBnClickedButton1();
};

View File

@@ -3,7 +3,7 @@
#include "stdafx.h"
#include "EventHandler.h"
void CEventHandlerSysDib::SetIEventHandler(IEventHandler* pIEventHandler)
void CEventHandlerSysDib::SetIEventHandler(IEventHandlerSysDib* pIEventHandler)
{
m_pIEventHandler = pIEventHandler;
}
@@ -12,6 +12,19 @@ void __stdcall CEventHandlerSysDib::Received()
{
ASSERT(NULL != m_pIEventHandler);
m_pIEventHandler->Received();
m_pIEventHandler->ReceivedSysDib();
}
void CEventHandlerDib::SetIEventHandler(IEventHandlerDib* pIEventHandler)
{
m_pIEventHandler = pIEventHandler;
}
void __stdcall CEventHandlerDib::Received()
{
ASSERT(NULL != m_pIEventHandler);
m_pIEventHandler->ReceivedDib();
}

View File

@@ -6,10 +6,16 @@
#include <atlbase.h>
#include <atlcom.h>
class IEventHandler
class IEventHandlerSysDib
{
public:
virtual void Received() = 0;
virtual void ReceivedSysDib() = 0;
};
class IEventHandlerDib
{
public:
virtual void ReceivedDib() = 0;
};
@@ -22,7 +28,7 @@ class CEventHandlerSysDib : public IDispEventImpl<
0>
{
public:
void SetIEventHandler(IEventHandler* pIEventHandler);
void SetIEventHandler(IEventHandlerSysDib* pIEventHandler);
void __stdcall Received();
@@ -31,7 +37,7 @@ public:
END_SINK_MAP()
protected:
IEventHandler* m_pIEventHandler;
IEventHandlerSysDib* m_pIEventHandler;
};
class CEventHandlerDib : public IDispEventImpl<
@@ -43,7 +49,7 @@ class CEventHandlerDib : public IDispEventImpl<
0>
{
public:
void SetIEventHandler(IEventHandler* pIEventHandler);
void SetIEventHandler(IEventHandlerDib* pIEventHandler);
void __stdcall Received();
@@ -52,7 +58,7 @@ public:
END_SINK_MAP()
protected:
IEventHandler* m_pIEventHandler;
IEventHandlerDib* m_pIEventHandler;
};
#endif /* __EVNET_HANDLER_H__ */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

BIN
res/HandDrawIcon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

View File

@@ -5,6 +5,8 @@
#define IDD_CPROBOT_DIALOG 102
#define IDD_CPROBOT_DIALOG2 102
#define IDR_MAINFRAME 128
#define IDI_ICON2 132
#define IDI_ICON_STOCK 132
#define IDC_EDIT_ORDERING_TICK_MIN 1000
#define IDC_EDIT_ORDERING_TICK_MAX 1001
#define IDC_BUTTON_SEARCH 1002
@@ -33,7 +35,7 @@
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 129
#define _APS_NEXT_RESOURCE_VALUE 133
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1017
#define _APS_NEXT_SYMED_VALUE 101

View File

@@ -38,7 +38,7 @@
//#include <comdef.h>
//#import "c:\daishin\cybosplus\cpdib.dll" rename_namespace("CpDib")
#import "c:\daishin\cybosplus\cpdib.dll" rename_namespace("CpDib")
#import "c:\daishin\cybosplus\cpsysdib.dll" rename_namespace("CpSysDib") named_guids
#import "c:\daishin\cybosplus\cptrade.dll" no_namespace named_guids
#import "c:\daishin\cybosplus\cputil.dll" no_namespace named_guids