This commit is contained in:
2013-07-04 09:36:04 +00:00
parent aa218e0bc3
commit 704e882d0d
14 changed files with 1119 additions and 0 deletions

68
CPRobot.cpp Normal file
View File

@@ -0,0 +1,68 @@
// CPRobot.cpp : 응용 프로그램에 대한 클래스 동작을 정의합니다.
//
#include "stdafx.h"
#include "CPRobot.h"
#include "CPRobotDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CCPRobotApp
BEGIN_MESSAGE_MAP(CCPRobotApp, CWinApp)
ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
END_MESSAGE_MAP()
// CCPRobotApp 생성
CCPRobotApp::CCPRobotApp()
{
// TODO: 여기에 생성 코드를 추가합니다.
// InitInstance에 모든 중요한 초기화 작업을 배치합니다.
}
// 유일한 CCPRobotApp 개체입니다.
CCPRobotApp theApp;
// CCPRobotApp 초기화
BOOL CCPRobotApp::InitInstance()
{
CWinApp::InitInstance();
AfxEnableControlContainer();
// 표준 초기화
// 이들 기능을 사용하지 않고 최종 실행 파일의 크기를 줄이려면
// 아래에서 필요 없는 특정 초기화
// 루틴을 제거해야 합니다.
// 해당 설정이 저장된 레지스트리 키를 변경하십시오.
// TODO: 이 문자열을 회사 또는 조직의 이름과 같은
// 적절한 내용으로 수정해야 합니다.
SetRegistryKey(_T("로컬 응용 프로그램 마법사에서 생성된 응용 프로그램"));
CCPRobotDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: 여기에 [확인]을 클릭하여 대화 상자가 없어질 때 처리할
// 코드를 배치합니다.
}
else if (nResponse == IDCANCEL)
{
// TODO: 여기에 [취소]를 클릭하여 대화 상자가 없어질 때 처리할
// 코드를 배치합니다.
}
// 대화 상자가 닫혔으므로 응용 프로그램의 메시지 펌프를 시작하지 않고 응용 프로그램을 끝낼 수 있도록 FALSE를
// 반환합니다.
return FALSE;
}

31
CPRobot.h Normal file
View File

@@ -0,0 +1,31 @@
// CPRobot.h : PROJECT_NAME 응용 프로그램에 대한 주 헤더 파일입니다.
//
#pragma once
#ifndef __AFXWIN_H__
#error "PCH에 대해 이 파일을 포함하기 전에 'stdafx.h'를 포함합니다."
#endif
#include "resource.h" // 주 기호입니다.
// CCPRobotApp:
// 이 클래스의 구현에 대해서는 CPRobot.cpp을 참조하십시오.
//
class CCPRobotApp : public CWinApp
{
public:
CCPRobotApp();
// 재정의입니다.
public:
virtual BOOL InitInstance();
// 구현입니다.
DECLARE_MESSAGE_MAP()
};
extern CCPRobotApp theApp;

18
CPRobot.idl Normal file
View File

@@ -0,0 +1,18 @@
// CPRobot.idl : IDL source for VCOpt.exe
//
// This file will be processed by the MIDL tool to
// produce the type library (CPRobot.tlb) and marshalling code.
import "oaidl.idl";
import "ocidl.idl";
[
uuid(60EA9A0D-B44A-412D-9516-72A78A0F4DFB),
version(1.0),
helpstring("CPRobot 1.0 Type Library")
]
library VCOptLib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
};

195
CPRobot.rc Normal file
View File

@@ -0,0 +1,195 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#ifndef APSTUDIO_INVOKED
#include "targetver.h"
#endif
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Korean resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)
#ifdef _WIN32
LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
#pragma code_page(949)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#ifndef APSTUDIO_INVOKED\r\n"
"#include ""targetver.h""\r\n"
"#endif\r\n"
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
"#define _AFX_NO_OLE_RESOURCES\r\n"
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
"\r\n"
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)\r\n"
"LANGUAGE 18, 1\r\n"
"#pragma code_page(949)\r\n"
"#include ""res\\CPRobot.rc2"" // Microsoft Visual C++ 이외의 다른 도구에서 편집한 리소스입니다.\r\n"
"#include ""l.KOR\\afxres.rc"" // 표준 구성 요소입니다.\r\n"
"#endif\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDR_MAINFRAME ICON "res\\CPRobot.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_CPROBOT_DIALOG DIALOGEX 0, 0, 319, 239
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "CPRobot"
FONT 9, "MS Shell Dlg", 0, 0, 0x1
BEGIN
CONTROL "매도호가",IDC_RADIO_BID,"Button",BS_AUTORADIOBUTTON | WS_GROUP,7,7,43,10
CONTROL "매수호가",IDC_RADIO_ASK,"Button",BS_AUTORADIOBUTTON,7,19,43,10
EDITTEXT IDC_EDIT_ORDERINGPRICE,75,7,67,14,ES_AUTOHSCROLL | ES_NUMBER
PUSHBUTTON "잔고 확인",IDC_BUTTON_REFRESH_BALANCE,262,7,50,14
EDITTEXT IDC_EDIT_ORDERING_TICK_MIN,7,37,67,14,ES_AUTOHSCROLL | ES_NUMBER
EDITTEXT IDC_EDIT_ORDERING_TICK_MAX,101,38,67,14,ES_AUTOHSCROLL | ES_NUMBER
EDITTEXT IDC_EDIT4,14,85,22,14,ES_AUTOHSCROLL | ES_NUMBER
EDITTEXT IDC_EDIT5,93,85,22,14,ES_AUTOHSCROLL | ES_NUMBER
EDITTEXT IDC_EDIT6,172,85,22,14,ES_AUTOHSCROLL | ES_NUMBER
EDITTEXT IDC_EDIT7,251,85,22,14,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "콜옵션",IDC_RADIO_CALLOP,"Button",BS_AUTORADIOBUTTON | WS_GROUP,93,124,37,10
CONTROL "풋옵션",IDC_RADIO_PUTOP,"Button",BS_AUTORADIOBUTTON,139,124,37,10
PUSHBUTTON "검색",IDC_BUTTON_SEARCH,190,123,50,14
PUSHBUTTON "거래 시작",IDC_BUTTON_START_DEAL,251,123,50,14
LISTBOX IDC_LIST_ITEMS,7,146,305,86,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
LTEXT "",IDC_STATIC_BALANCE,148,11,101,8
LTEXT "~",IDC_STATIC,86,40,8,8
GROUPBOX "매도 요청",IDC_STATIC,7,69,69,40
GROUPBOX "손절 범위",IDC_STATIC,86,69,69,40
GROUPBOX "트레일링 범위",IDC_STATIC,165,69,69,40
GROUPBOX "최대 시간",IDC_STATIC,243,69,69,40
LTEXT "틱",IDC_STATIC,43,88,8,8
LTEXT "틱",IDC_STATIC,126,88,8,8
LTEXT "틱",IDC_STATIC,198,88,8,8
LTEXT "sec",IDC_STATIC,290,89,11,8
END
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "041203b5"
BEGIN
VALUE "CompanyName", "TODO: <회사 이름>"
VALUE "FileDescription", "TODO: <파일 설명>"
VALUE "FileVersion", "1.0.0.1"
VALUE "InternalName", "CPRobot.exe"
VALUE "LegalCopyright", "TODO: (c) <회사 이름>. All rights reserved."
VALUE "OriginalFilename", "CPRobot.exe"
VALUE "ProductName", "TODO: <제품 이름>"
VALUE "ProductVersion", "1.0.0.1"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x412, 949
END
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_CPROBOT_DIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 312
TOPMARGIN, 7
BOTTOMMARGIN, 232
END
END
#endif // APSTUDIO_INVOKED
#endif // Korean resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)
LANGUAGE 18, 1
#pragma code_page(949)
#include "res\CPRobot.rc2" // Microsoft Visual C++ 이외의 다른 도구에서 편집한 리소스입니다.
#include "l.KOR\afxres.rc" // 표준 구성 요소입니다.
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

20
CPRobot.sln Normal file
View File

@@ -0,0 +1,20 @@
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CPRobot", "CPRobot.vcproj", "{78AC5730-F1E3-4491-8D7B-125ADC29092E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{78AC5730-F1E3-4491-8D7B-125ADC29092E}.Debug|Win32.ActiveCfg = Debug|Win32
{78AC5730-F1E3-4491-8D7B-125ADC29092E}.Debug|Win32.Build.0 = Debug|Win32
{78AC5730-F1E3-4491-8D7B-125ADC29092E}.Release|Win32.ActiveCfg = Release|Win32
{78AC5730-F1E3-4491-8D7B-125ADC29092E}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

272
CPRobot.vcproj Normal file
View File

@@ -0,0 +1,272 @@
<?xml version="1.0" encoding="ks_c_5601-1987"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="CPRobot"
ProjectGUID="{78AC5730-F1E3-4491-8D7B-125ADC29092E}"
RootNamespace="CPRobot"
Keyword="MFCProj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
UseOfMFC="1"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="false"
ValidateParameters="true"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP"
Optimization="0"
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="2"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1042"
AdditionalIncludeDirectories="$(IntDir)"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
UseOfMFC="1"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="false"
ValidateParameters="true"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
MinimalRebuild="false"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="2"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1042"
AdditionalIncludeDirectories="$(IntDir)"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="소스 파일"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\CPRobot.cpp"
>
</File>
<File
RelativePath=".\CPRobot.idl"
>
</File>
<File
RelativePath=".\CPRobotDlg.cpp"
>
</File>
<File
RelativePath=".\stdafx.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="헤더 파일"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\CPRobot.h"
>
</File>
<File
RelativePath=".\CPRobotDlg.h"
>
</File>
<File
RelativePath=".\Resource.h"
>
</File>
<File
RelativePath=".\stdafx.h"
>
</File>
<File
RelativePath=".\targetver.h"
>
</File>
</Filter>
<Filter
Name="리소스 파일"
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\CPRobot.ico"
>
</File>
<File
RelativePath=".\CPRobot.rc"
>
</File>
<File
RelativePath=".\res\CPRobot.rc2"
>
</File>
</Filter>
</Files>
<Globals>
<Global
Name="RESOURCE_FILE"
Value="CPRobot.rc"
/>
</Globals>
</VisualStudioProject>

217
CPRobotDlg.cpp Normal file
View File

@@ -0,0 +1,217 @@
// CPRobotDlg.cpp : 구현 파일
//
#include "stdafx.h"
#include "CPRobot.h"
#include "CPRobotDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
ICpTdUtilPtr g_pTdUtil = NULL;
CCPRobotDlg::CCPRobotDlg(CWnd* pParent /*=NULL*/)
: CDialog(CCPRobotDlg::IDD, pParent)
{
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
void CCPRobotDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CCPRobotDlg, CDialog)
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
//}}AFX_MSG_MAP
ON_BN_CLICKED(IDC_BUTTON_REFRESH_BALANCE, &CCPRobotDlg::OnBnClickedButtonRefreshBalance)
ON_WM_CREATE()
ON_WM_DESTROY()
END_MESSAGE_MAP()
// CCPRobotDlg 메시지 처리기
BOOL CCPRobotDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// 이 대화 상자의 아이콘을 설정합니다. 응용 프로그램의 주 창이 대화 상자가 아닐 경우에는
// 프레임워크가 이 작업을 자동으로 수행합니다.
SetIcon(m_hIcon, TRUE); // 큰 아이콘을 설정합니다.
SetIcon(m_hIcon, FALSE); // 작은 아이콘을 설정합니다.
// TODO: 여기에 추가 초기화 작업을 추가합니다.
return TRUE; // 포커스를 컨트롤에 설정하지 않으면 TRUE를 반환합니다.
}
int CCPRobotDlg::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CDialog::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
CoInitialize(NULL);
g_pTdUtil.CreateInstance(__uuidof(CpTdUtil));
short iInitResult = g_pTdUtil->TradeInit(0);
switch(iInitResult)
{
case -1:
MessageBox("TradeInit 오류");
return -2;
break;
case 1:
MessageBox("업무 키 잘못 입력됨");
return -2;
break;
case 2:
MessageBox("계좌 비밀번호 잘못 입력됨");
return -2;
break;
case 3:
MessageBox("취소됨");
return -2;
break;
}
return 0;
}
void CCPRobotDlg::OnDestroy()
{
CDialog::OnDestroy();
// TODO: Add your message handler code here
g_pTdUtil.Release();
CoUninitialize();
}
BOOL CCPRobotDlg::DestroyWindow()
{
// TODO: Add your specialized code here and/or call the base class
return CDialog::DestroyWindow();
}
// 대화 상자에 최소화 단추를 추가할 경우 아이콘을 그리려면
// 아래 코드가 필요합니다. 문서/뷰 모델을 사용하는 MFC 응용 프로그램의 경우에는
// 프레임워크에서 이 작업을 자동으로 수행합니다.
void CCPRobotDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // 그리기를 위한 디바이스 컨텍스트
SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
// 클라이언트 사각형에서 아이콘을 가운데에 맞춥니다.
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// 아이콘을 그립니다.
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CDialog::OnPaint();
}
}
// 사용자가 최소화된 창을 끄는 동안에 커서가 표시되도록 시스템에서
// 이 함수를 호출합니다.
HCURSOR CCPRobotDlg::OnQueryDragIcon()
{
return static_cast<HCURSOR>(m_hIcon);
}
void CCPRobotDlg::OnBnClickedButtonRefreshBalance()
{
// TODO: Add your control notification handler code here
ICpTdDibPtr pTd0721 = NULL;
pTd0721.CreateInstance(__uuidof(CpTd0721F));
pTd0721->SetInputValue(0, "117126165");
pTd0721->SetInputValue(1, "50");
pTd0721->SetInputValue(2, "50");
pTd0721->SetInputValue(3, "10");
CString Message;
do
{
pTd0721->BlockRequest();
Message = "현금주문가능액 : ";
Message += pTd0721->GetHeaderValue(10);
SetDlgItemText(IDC_STATIC_BALANCE, Message.GetString());
//Message = "";
//Message += "현금결제예탁액 : ";
//Message += pTd0721->GetHeaderValue(3);
//Message += "\n현금주문가능액 : ";
//Message += pTd0721->GetHeaderValue(10);
//MessageBox(Message);
} while (pTd0721->Continue);
pTd0721.Release();
//try
//{
// CComPtr<IUnknown> comPtr;
// comPtr.CoCreateInstance(__uuidof(CpStockCode));
// CComPtr<ICpStockCode> stockCodeComPtr;
// comPtr.QueryInterface(&stockCodeComPtr);
// char *code = "035420";
// _bstr_t name = stockCodeComPtr->CodeToName(code);
// CString msg = "Code : ";
// msg += code;
// msg += ", Name : ";
// msg += (char*)name;
// MessageBox(msg, "", MB_OK);
// //HRESULT hr = pBalance.CreateInstance(__uuidof(CpTd0721F));
// //if(SUCCEEDED(hr))
// //{
// // int aaa = pBalance->GetHeaderValue(3);
// // CString kkk;
// // kkk.Format("result : %d", aaa);
// // MessageBox("", kkk, MB_OK);
// // pBalance = NULL;
// //}
// //else
// //{
// // MessageBox("CreateInstance(__uuidof(CpTd0721F) failure", "", MB_OK);
// //}
//}
//catch (_com_error e)
//{
// MessageBox(e.ErrorMessage(), "CpTd0721F 초기화 실패", MB_OK|MB_ICONSTOP);
//}
}

35
CPRobotDlg.h Normal file
View File

@@ -0,0 +1,35 @@
// CPRobotDlg.h : 헤더 파일
//
#pragma once
// CCPRobotDlg 대화 상자
class CCPRobotDlg : public CDialog
{
// 생성입니다.
public:
CCPRobotDlg(CWnd* pParent = NULL); // 표준 생성자입니다.
// 대화 상자 데이터입니다.
enum { IDD = IDD_CPROBOT_DIALOG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 지원입니다.
virtual BOOL DestroyWindow();
// 구현입니다.
protected:
HICON m_hIcon;
// 생성된 메시지 맵 함수
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnBnClickedButtonRefreshBalance();
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnDestroy();
};

74
CPRobot_h.h Normal file
View File

@@ -0,0 +1,74 @@
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 7.00.0500 */
/* at Tue Jul 02 12:13:08 2013
*/
/* Compiler settings for .\CPRobot.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
protocol : dce , ms_ext, c_ext, robust
error checks: stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
//@@MIDL_FILE_HEADING( )
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef __CPRobot_h_h__
#define __CPRobot_h_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
/* header files for imported files */
#include "oaidl.h"
#include "ocidl.h"
#ifdef __cplusplus
extern "C"{
#endif
#ifndef __VCOptLib_LIBRARY_DEFINED__
#define __VCOptLib_LIBRARY_DEFINED__
/* library VCOptLib */
/* [helpstring][version][uuid] */
EXTERN_C const IID LIBID_VCOptLib;
#endif /* __VCOptLib_LIBRARY_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

79
CPRobot_i.c Normal file
View File

@@ -0,0 +1,79 @@
/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */
/* link this file in with the server and any clients */
/* File created by MIDL compiler version 7.00.0500 */
/* at Tue Jul 02 12:13:08 2013
*/
/* Compiler settings for .\CPRobot.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
protocol : dce , ms_ext, c_ext, robust
error checks: stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
//@@MIDL_FILE_HEADING( )
#pragma warning( disable: 4049 ) /* more than 64k source lines */
#ifdef __cplusplus
extern "C"{
#endif
#include <rpc.h>
#include <rpcndr.h>
#ifdef _MIDL_USE_GUIDDEF_
#ifndef INITGUID
#define INITGUID
#include <guiddef.h>
#undef INITGUID
#else
#include <guiddef.h>
#endif
#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)
#else // !_MIDL_USE_GUIDDEF_
#ifndef __IID_DEFINED__
#define __IID_DEFINED__
typedef struct _IID
{
unsigned long x;
unsigned short s1;
unsigned short s2;
unsigned char c[8];
} IID;
#endif // __IID_DEFINED__
#ifndef CLSID_DEFINED
#define CLSID_DEFINED
typedef IID CLSID;
#endif // CLSID_DEFINED
#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
#endif !_MIDL_USE_GUIDDEF_
MIDL_DEFINE_GUID(IID, LIBID_VCOptLib,0x60EA9A0D,0xB44A,0x412D,0x95,0x16,0x72,0xA7,0x8A,0x0F,0x4D,0xFB);
#undef MIDL_DEFINE_GUID
#ifdef __cplusplus
}
#endif

35
resource.h Normal file
View File

@@ -0,0 +1,35 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by CPRobot.rc
//
#define IDD_CPROBOT_DIALOG 102
#define IDD_CPROBOT_DIALOG2 102
#define IDR_MAINFRAME 128
#define IDC_EDIT_ORDERING_TICK_MIN 1000
#define IDC_EDIT_ORDERING_TICK_MAX 1001
#define IDC_BUTTON_SEARCH 1002
#define IDC_BUTTON_START_DEAL 1003
#define IDC_EDIT_ORDERINGPRICE 1004
#define IDC_BUTTON_REFRESH_BALANCE 1005
#define IDC_RADIO_BID 1006
#define IDC_EDIT4 1007
#define IDC_EDIT5 1008
#define IDC_EDIT6 1009
#define IDC_EDIT7 1010
#define IDC_STATIC_BALANCE 1011
#define IDC_RADIO_CALLOP 1012
#define IDC_RADIO_PUTOP 1013
#define IDC_LIST_ITEMS 1014
#define IDC_RADIO2 1015
#define IDC_RADIO_ASK 1015
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 129
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1016
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

7
stdafx.cpp Normal file
View File

@@ -0,0 +1,7 @@
// stdafx.cpp : 표준 포함 파일만 들어 있는 소스 파일입니다.
// CPRobot.pch는 미리 컴파일된 헤더가 됩니다.
// stdafx.obj에는 미리 컴파일된 형식 정보가 포함됩니다.
#include "stdafx.h"

42
stdafx.h Normal file
View File

@@ -0,0 +1,42 @@
// stdafx.h : 자주 사용하지만 자주 변경되지는 않는
// 표준 시스템 포함 파일 및 프로젝트 관련 포함 파일이
// 들어 있는 포함 파일입니다.
#pragma once
#ifndef _SECURE_ATL
#define _SECURE_ATL 1
#endif
#ifndef VC_EXTRALEAN
#define VC_EXTRALEAN // 거의 사용되지 않는 내용은 Windows 헤더에서 제외합니다.
#endif
#include "targetver.h"
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // 일부 CString 생성자는 명시적으로 선언됩니다.
// MFC의 공통 부분과 무시 가능한 경고 메시지에 대한 숨기기를 해제합니다.
#define _AFX_ALL_WARNINGS
#include <afxwin.h> // MFC 핵심 및 표준 구성 요소입니다.
#include <afxext.h> // MFC 확장입니다.
#include <afxdisp.h> // MFC 자동화 클래스입니다.
#ifndef _AFX_NO_OLE_SUPPORT
#include <afxdtctl.h> // Internet Explorer 4 공용 컨트롤에 대한 MFC 지원입니다.
#endif
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // Windows 공용 컨트롤에 대한 MFC 지원입니다.
#endif // _AFX_NO_AFXCMN_SUPPORT
//#include <comdef.h>
#import "c:\daishin\CYBOSPLUS\cpdib.dll" no_namespace named_guids
#import "c:\daishin\cybosplus\cptrade.dll" no_namespace named_guids
#import "c:\daishin\cybosplus\cputil.dll" no_namespace named_guids

26
targetver.h Normal file
View File

@@ -0,0 +1,26 @@
#pragma once
// 다음 매크로는 필요한 최소 플랫폼을 정의합니다. 필요한 최소 플랫폼은
// 응용 프로그램을 실행하는 데 필요한 기능이 포함된 가장 빠른 버전의 Windows, Internet Explorer
// 등입니다. 이 매크로는 지정된 버전 이상의 플랫폼 버전에서 사용 가능한 모든 기능을 활성화해야
// 작동합니다.
// 아래 지정된 플랫폼에 우선하는 플랫폼을 대상으로 하는 경우 다음 정의를 수정하십시오.
// 다른 플랫폼에 사용되는 해당 값의 최신 정보는 MSDN을 참조하십시오.
#ifndef WINVER // 필요한 최소 플랫폼을 Windows Vista로 지정합니다.
#define WINVER 0x0600 // 다른 버전의 Windows에 맞도록 적합한 값으로 변경해 주십시오.
#endif
#ifndef _WIN32_WINNT // 필요한 최소 플랫폼을 Windows Vista로 지정합니다.
#define _WIN32_WINNT 0x0600 // 다른 버전의 Windows에 맞도록 적합한 값으로 변경해 주십시오.
#endif
#ifndef _WIN32_WINDOWS // 필요한 최소 플랫폼을 Windows 98로 지정합니다.
#define _WIN32_WINDOWS 0x0410 // Windows Me 이상에 맞도록 적합한 값으로 변경해 주십시오.
#endif
#ifndef _WIN32_IE // 필요한 최소 플랫폼을 Internet Explorer 7.0으로 지정합니다.
#define _WIN32_IE 0x0700 // 다른 버전의 IE에 맞도록 적합한 값으로 변경해 주십시오.
#endif