├── LICENSE
├── README.md
├── 12306.txt
├── 12306Client_MFC.v11.suo
├── 12306Client_MFC
├── MainFrm.h
├── stdafx.h
├── LoginDlg.cpp
├── LoginDlg.h
├── MainFrm.cpp
├── MainView.cpp
├── MainView.h
├── OutputWnd.h
├── TBButton.cpp
├── resource.h
├── stdafx.cpp
├── targetver.h
├── OutputWnd.cpp
├── 12306Client_MFC.h
├── TBHeaderCtrl.cpp
├── 12306Client_MFC.aps
├── 12306Client_MFC.cpp
├── 12306Client_MFC.rc
├── 12306Client_MFCDoc.cpp
├── 12306Client_MFCDoc.h
├── 12306Client_MFCView.h
├── lib
│ ├── debug
│ │ ├── libcurl.lib
│ │ └── json_vc71_libmtd.lib
│ └── release
│ │ ├── libcurl.lib
│ │ └── json_vc71_libmt.lib
├── 12306Client_MFCView.cpp
├── res
│ ├── 12306Client_MFC.ico
│ ├── 12306Client_MFCDoc.ico
│ └── My12306Client_MFC.rc2
├── 12306Client_MFC.vcxproj.user
├── Operate.h
├── include
│ ├── json
│ │ ├── json.h
│ │ ├── autolink.h
│ │ ├── forwards.h
│ │ ├── features.h
│ │ ├── config.h
│ │ ├── writer.h
│ │ └── reader.h
│ └── curl
│ │ ├── stdcheaders.h
│ │ ├── curlver.h
│ │ ├── mprintf.h
│ │ ├── easy.h
│ │ ├── curlbuild.h.in
│ │ ├── curlbuild.h.cmake
│ │ ├── curlrules.h
│ │ ├── multi.h
│ │ ├── curlbuild.h
│ │ └── typecheck-gcc.h
├── TBColorButton.h
├── TBButton.h
├── TBHeaderCtrl.h
├── UrlWrapper.h
├── Operate.cpp
├── TBColorButton.cpp
├── ReadMe.txt
├── 12306Client_MFC.vcxproj.filters
├── TBListCtrl.h
├── UrlWrapper.cpp
├── 12306Client_MFC.vcxproj
└── TBListCtrl.cpp
├── Release
└── 12306Client_MFC.exe
├── .gitignore
└── 12306Client_MFC.sln
/LICENSE:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 12306
2 | =====
3 |
4 | 12306客户端(MFC版本)
5 |
--------------------------------------------------------------------------------
/12306.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306.txt
--------------------------------------------------------------------------------
/12306Client_MFC.v11.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC.v11.suo
--------------------------------------------------------------------------------
/12306Client_MFC/MainFrm.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/MainFrm.h
--------------------------------------------------------------------------------
/12306Client_MFC/stdafx.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/stdafx.h
--------------------------------------------------------------------------------
/12306Client_MFC/LoginDlg.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/LoginDlg.cpp
--------------------------------------------------------------------------------
/12306Client_MFC/LoginDlg.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/LoginDlg.h
--------------------------------------------------------------------------------
/12306Client_MFC/MainFrm.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/MainFrm.cpp
--------------------------------------------------------------------------------
/12306Client_MFC/MainView.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/MainView.cpp
--------------------------------------------------------------------------------
/12306Client_MFC/MainView.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/MainView.h
--------------------------------------------------------------------------------
/12306Client_MFC/OutputWnd.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/OutputWnd.h
--------------------------------------------------------------------------------
/12306Client_MFC/TBButton.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/TBButton.cpp
--------------------------------------------------------------------------------
/12306Client_MFC/resource.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/resource.h
--------------------------------------------------------------------------------
/12306Client_MFC/stdafx.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/stdafx.cpp
--------------------------------------------------------------------------------
/12306Client_MFC/targetver.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/targetver.h
--------------------------------------------------------------------------------
/Release/12306Client_MFC.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/Release/12306Client_MFC.exe
--------------------------------------------------------------------------------
/12306Client_MFC/OutputWnd.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/OutputWnd.cpp
--------------------------------------------------------------------------------
/12306Client_MFC/12306Client_MFC.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/12306Client_MFC.h
--------------------------------------------------------------------------------
/12306Client_MFC/TBHeaderCtrl.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/TBHeaderCtrl.cpp
--------------------------------------------------------------------------------
/12306Client_MFC/12306Client_MFC.aps:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/12306Client_MFC.aps
--------------------------------------------------------------------------------
/12306Client_MFC/12306Client_MFC.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/12306Client_MFC.cpp
--------------------------------------------------------------------------------
/12306Client_MFC/12306Client_MFC.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/12306Client_MFC.rc
--------------------------------------------------------------------------------
/12306Client_MFC/12306Client_MFCDoc.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/12306Client_MFCDoc.cpp
--------------------------------------------------------------------------------
/12306Client_MFC/12306Client_MFCDoc.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/12306Client_MFCDoc.h
--------------------------------------------------------------------------------
/12306Client_MFC/12306Client_MFCView.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/12306Client_MFCView.h
--------------------------------------------------------------------------------
/12306Client_MFC/lib/debug/libcurl.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/lib/debug/libcurl.lib
--------------------------------------------------------------------------------
/12306Client_MFC/12306Client_MFCView.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/12306Client_MFCView.cpp
--------------------------------------------------------------------------------
/12306Client_MFC/lib/release/libcurl.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/lib/release/libcurl.lib
--------------------------------------------------------------------------------
/12306Client_MFC/res/12306Client_MFC.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/res/12306Client_MFC.ico
--------------------------------------------------------------------------------
/12306Client_MFC/res/12306Client_MFCDoc.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/res/12306Client_MFCDoc.ico
--------------------------------------------------------------------------------
/12306Client_MFC/res/My12306Client_MFC.rc2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/res/My12306Client_MFC.rc2
--------------------------------------------------------------------------------
/12306Client_MFC/lib/debug/json_vc71_libmtd.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/lib/debug/json_vc71_libmtd.lib
--------------------------------------------------------------------------------
/12306Client_MFC/lib/release/json_vc71_libmt.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lniwn/12306/HEAD/12306Client_MFC/lib/release/json_vc71_libmt.lib
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files
2 | *.slo
3 | *.lo
4 | *.o
5 |
6 | # Compiled Dynamic libraries
7 | *.so
8 | *.dylib
9 |
10 | # Compiled Static libraries
11 | *.lai
12 | *.la
13 | *.a
14 |
--------------------------------------------------------------------------------
/12306Client_MFC/12306Client_MFC.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/12306Client_MFC/Operate.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | int utf8ToUnicode(const char* src, int src_len, wchar_t* dst);
4 |
5 | int unicodeToUtf8(const wchar_t* src, int src_len, char* dst);
6 |
7 | HGLOBAL CreateStreamFromMemory(void* src, size_t len, IStream** ppStream);
--------------------------------------------------------------------------------
/12306Client_MFC/include/json/json.h:
--------------------------------------------------------------------------------
1 | #ifndef JSON_JSON_H_INCLUDED
2 | # define JSON_JSON_H_INCLUDED
3 |
4 | # include "autolink.h"
5 | # include "value.h"
6 | # include "reader.h"
7 | # include "writer.h"
8 | # include "features.h"
9 |
10 | #endif // JSON_JSON_H_INCLUDED
11 |
--------------------------------------------------------------------------------
/12306Client_MFC/TBColorButton.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 |
4 | // CTBColorButton
5 |
6 | class CTBColorButton : public CMFCColorButton
7 | {
8 | DECLARE_DYNAMIC(CTBColorButton)
9 |
10 | public:
11 | CTBColorButton(DWORD dwItem, DWORD dwSubItem);
12 | virtual ~CTBColorButton();
13 |
14 | protected:
15 | DECLARE_MESSAGE_MAP()
16 | afx_msg void OnBnClicked();
17 | afx_msg LRESULT OnMove(WPARAM wParam, LPARAM lParam);
18 |
19 | private:
20 | DWORD m_dwItem;
21 | DWORD m_dwSubItem;
22 | };
23 |
24 |
25 |
--------------------------------------------------------------------------------
/12306Client_MFC/TBButton.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef UM_MOVE_COMPONENT
4 | #define UM_MOVE_COMPONENT WM_USER+101
5 | #endif
6 | // CTBButton
7 |
8 | class CTBButton : public CButton
9 | {
10 | DECLARE_DYNAMIC(CTBButton)
11 |
12 | public:
13 | CTBButton(DWORD dwItem, DWORD dwSubItem);
14 | virtual ~CTBButton();
15 |
16 | protected:
17 | DECLARE_MESSAGE_MAP()
18 | afx_msg void OnBnClicked();
19 | afx_msg LRESULT OnMove(WPARAM wParam, LPARAM lParam);
20 |
21 | private:
22 | DWORD m_dwItem;
23 | DWORD m_dwSubItem;
24 | };
25 |
26 |
27 |
--------------------------------------------------------------------------------
/12306Client_MFC/include/json/autolink.h:
--------------------------------------------------------------------------------
1 | #ifndef JSON_AUTOLINK_H_INCLUDED
2 | # define JSON_AUTOLINK_H_INCLUDED
3 |
4 | # include "config.h"
5 |
6 | # ifdef JSON_IN_CPPTL
7 | # include
8 | # endif
9 |
10 | # if !defined(JSON_NO_AUTOLINK) && !defined(JSON_DLL_BUILD) && !defined(JSON_IN_CPPTL)
11 | # define CPPTL_AUTOLINK_NAME "json"
12 | # undef CPPTL_AUTOLINK_DLL
13 | # ifdef JSON_DLL
14 | # define CPPTL_AUTOLINK_DLL
15 | # endif
16 | # include "autolink.h"
17 | # endif
18 |
19 | #endif // JSON_AUTOLINK_H_INCLUDED
20 |
--------------------------------------------------------------------------------
/12306Client_MFC/TBHeaderCtrl.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 |
4 | // CHeaderCtrlCl
5 |
6 | class CTBHeaderCtrl : public CHeaderCtrl
7 | {
8 | DECLARE_DYNAMIC(CTBHeaderCtrl)
9 |
10 | public:
11 | CTBHeaderCtrl();
12 | virtual ~CTBHeaderCtrl();
13 | private:
14 | CListCtrl* m_pListCtrl;
15 |
16 | protected:
17 | DECLARE_MESSAGE_MAP()
18 | public:
19 |
20 | afx_msg void OnPaint();
21 |
22 | private:
23 | friend class CTBListCtrl;
24 | int m_R;
25 | int m_G;
26 | int m_B;
27 | int m_Gradient;
28 | float m_Height;
29 | int m_fontHeight;
30 | int m_fontWith;
31 | COLORREF m_color;
32 | LRESULT OnLayout( WPARAM wParam, LPARAM lParam );
33 | void SetListCtrl(CListCtrl*);
34 | void DrawHeader(CDC* pDC = NULL);
35 | virtual BOOL OnChildNotify(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pLResult);
36 | };
37 |
38 |
39 |
--------------------------------------------------------------------------------
/12306Client_MFC/include/json/forwards.h:
--------------------------------------------------------------------------------
1 | #ifndef JSON_FORWARDS_H_INCLUDED
2 | # define JSON_FORWARDS_H_INCLUDED
3 |
4 | # include "config.h"
5 |
6 | namespace Json {
7 |
8 | // writer.h
9 | class FastWriter;
10 | class StyledWriter;
11 |
12 | // reader.h
13 | class Reader;
14 |
15 | // features.h
16 | class Features;
17 |
18 | // value.h
19 | typedef int Int;
20 | typedef unsigned int UInt;
21 | class StaticString;
22 | class Path;
23 | class PathArgument;
24 | class Value;
25 | class ValueIteratorBase;
26 | class ValueIterator;
27 | class ValueConstIterator;
28 | #ifdef JSON_VALUE_USE_INTERNAL_MAP
29 | class ValueAllocator;
30 | class ValueMapAllocator;
31 | class ValueInternalLink;
32 | class ValueInternalArray;
33 | class ValueInternalMap;
34 | #endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
35 |
36 | } // namespace Json
37 |
38 |
39 | #endif // JSON_FORWARDS_H_INCLUDED
40 |
--------------------------------------------------------------------------------
/12306Client_MFC/UrlWrapper.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | extern "C"
5 | {
6 | #include
7 | }
8 | class CUrlWrapper
9 | {
10 | public:
11 | CUrlWrapper(void);
12 | ~CUrlWrapper(void);
13 |
14 | bool Init();
15 | bool doHttpPost( const char* url, const char* data, long timeout = 10);
16 | bool doHttpGet( const char* url, const char* data, long timeout = 10);
17 | bool doHttpsGet(const char* url, long timeout = 10);
18 | bool doHttpsPost(const char* url, const char* post_data, long timeout = 10);
19 | void resetOpt();
20 | void getRandom(char* code, size_t sizeOfBuffer);
21 | size_t getResponseData(void* data, size_t len);
22 | size_t getResponseLength();
23 | private:
24 | CURL* m_pCurlObj;
25 | curl_slist* createHeader(curl_slist *headers);
26 | int process(void* data, size_t size, size_t nmemb);
27 | static size_t processFunc( void* ptr, size_t size, size_t nmemb, void *usrptr );
28 | std::vector m_response;
29 | };
30 |
31 |
--------------------------------------------------------------------------------
/12306Client_MFC.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "12306Client_MFC", "12306Client_MFC\12306Client_MFC.vcxproj", "{6855A594-5AD9-4AE7-8D67-7AB611ABD19F}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Win32 = Debug|Win32
9 | Release|Win32 = Release|Win32
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {6855A594-5AD9-4AE7-8D67-7AB611ABD19F}.Debug|Win32.ActiveCfg = Debug|Win32
13 | {6855A594-5AD9-4AE7-8D67-7AB611ABD19F}.Debug|Win32.Build.0 = Debug|Win32
14 | {6855A594-5AD9-4AE7-8D67-7AB611ABD19F}.Release|Win32.ActiveCfg = Release|Win32
15 | {6855A594-5AD9-4AE7-8D67-7AB611ABD19F}.Release|Win32.Build.0 = Release|Win32
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/12306Client_MFC/Operate.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "Operate.h"
3 |
4 | int utf8ToUnicode(const char* src, int src_len, wchar_t* dst)
5 | {
6 | int wcs_len = ::MultiByteToWideChar(CP_UTF8, 0, src, src_len, NULL, 0);
7 | if(0 == wcs_len) return 0;
8 | return ::MultiByteToWideChar(CP_UTF8, 0, src, src_len, dst, wcs_len);
9 | }
10 |
11 | int unicodeToUtf8(const wchar_t* src, int src_len, char* dst)
12 | {
13 | int utf8_len = ::WideCharToMultiByte(CP_UTF8, 0, src, src_len, NULL, 0, nullptr, nullptr);
14 | if(0 == utf8_len) return 0;
15 | return ::WideCharToMultiByte(CP_UTF8, 0, src, src_len, dst, utf8_len, nullptr, nullptr);
16 | }
17 |
18 | HGLOBAL CreateStreamFromMemory(void* src, size_t len, IStream** ppStream)
19 | {
20 | HGLOBAL hGlobal = ::GlobalAlloc(GMEM_MOVEABLE, len);
21 | ASSERT(hGlobal);
22 | LPVOID pData = ::GlobalLock(hGlobal);
23 | ASSERT(pData);
24 | CopyMemory(pData, src, len);
25 | VERIFY(SUCCEEDED(::CreateStreamOnHGlobal(hGlobal, TRUE, ppStream)));
26 | ::GlobalUnlock(hGlobal);
27 | return hGlobal;
28 | }
--------------------------------------------------------------------------------
/12306Client_MFC/TBColorButton.cpp:
--------------------------------------------------------------------------------
1 | // TBColorButton.cpp : implementation file
2 | //
3 |
4 | #include "stdafx.h"
5 | #include "TBColorButton.h"
6 |
7 |
8 | #ifndef UM_MOVE_COMPONENT
9 | #define UM_MOVE_COMPONENT WM_USER+101
10 | #endif
11 |
12 | // CTBColorButton
13 |
14 | IMPLEMENT_DYNAMIC(CTBColorButton, CMFCColorButton)
15 |
16 | CTBColorButton::CTBColorButton(DWORD dwItem, DWORD dwSubItem)
17 | {
18 | m_dwItem = dwItem;
19 | m_dwSubItem = dwSubItem;
20 | }
21 |
22 | CTBColorButton::~CTBColorButton()
23 | {
24 | }
25 |
26 |
27 | BEGIN_MESSAGE_MAP(CTBColorButton, CMFCColorButton)
28 | ON_CONTROL_REFLECT(BN_CLICKED, &CTBColorButton::OnBnClicked)
29 | ON_MESSAGE(UM_MOVE_COMPONENT, &CTBColorButton::OnMove)
30 | END_MESSAGE_MAP()
31 |
32 |
33 |
34 | // CTBColorButton message handlers
35 |
36 | void CTBColorButton::OnBnClicked()
37 | {
38 | ::SendMessage(GetParent()->m_hWnd, BN_CLICKED, m_dwItem, m_dwSubItem);
39 | }
40 |
41 |
42 | LRESULT CTBColorButton::OnMove(WPARAM wParam, LPARAM lParam)
43 | {
44 | m_dwItem = wParam;
45 | m_dwSubItem = lParam;
46 | return 1;
47 | }
48 |
49 |
--------------------------------------------------------------------------------
/12306Client_MFC/include/curl/stdcheaders.h:
--------------------------------------------------------------------------------
1 | #ifndef __STDC_HEADERS_H
2 | #define __STDC_HEADERS_H
3 | /***************************************************************************
4 | * _ _ ____ _
5 | * Project ___| | | | _ \| |
6 | * / __| | | | |_) | |
7 | * | (__| |_| | _ <| |___
8 | * \___|\___/|_| \_\_____|
9 | *
10 | * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al.
11 | *
12 | * This software is licensed as described in the file COPYING, which
13 | * you should have received as part of this distribution. The terms
14 | * are also available at http://curl.haxx.se/docs/copyright.html.
15 | *
16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 | * copies of the Software, and permit persons to whom the Software is
18 | * furnished to do so, under the terms of the COPYING file.
19 | *
20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 | * KIND, either express or implied.
22 | *
23 | ***************************************************************************/
24 |
25 | #include
26 |
27 | size_t fread (void *, size_t, size_t, FILE *);
28 | size_t fwrite (const void *, size_t, size_t, FILE *);
29 |
30 | int strcasecmp(const char *, const char *);
31 | int strncasecmp(const char *, const char *, size_t);
32 |
33 | #endif /* __STDC_HEADERS_H */
34 |
--------------------------------------------------------------------------------
/12306Client_MFC/include/json/features.h:
--------------------------------------------------------------------------------
1 | #ifndef CPPTL_JSON_FEATURES_H_INCLUDED
2 | # define CPPTL_JSON_FEATURES_H_INCLUDED
3 |
4 | # include "forwards.h"
5 |
6 | namespace Json {
7 |
8 | /** \brief Configuration passed to reader and writer.
9 | * This configuration object can be used to force the Reader or Writer
10 | * to behave in a standard conforming way.
11 | */
12 | class JSON_API Features
13 | {
14 | public:
15 | /** \brief A configuration that allows all features and assumes all strings are UTF-8.
16 | * - C & C++ comments are allowed
17 | * - Root object can be any JSON value
18 | * - Assumes Value strings are encoded in UTF-8
19 | */
20 | static Features all();
21 |
22 | /** \brief A configuration that is strictly compatible with the JSON specification.
23 | * - Comments are forbidden.
24 | * - Root object must be either an array or an object value.
25 | * - Assumes Value strings are encoded in UTF-8
26 | */
27 | static Features strictMode();
28 |
29 | /** \brief Initialize the configuration like JsonConfig::allFeatures;
30 | */
31 | Features();
32 |
33 | /// \c true if comments are allowed. Default: \c true.
34 | bool allowComments_;
35 |
36 | /// \c true if root must be either an array or an object value. Default: \c false.
37 | bool strictRoot_;
38 | };
39 |
40 | } // namespace Json
41 |
42 | #endif // CPPTL_JSON_FEATURES_H_INCLUDED
43 |
--------------------------------------------------------------------------------
/12306Client_MFC/include/json/config.h:
--------------------------------------------------------------------------------
1 | #ifndef JSON_CONFIG_H_INCLUDED
2 | # define JSON_CONFIG_H_INCLUDED
3 |
4 | /// If defined, indicates that json library is embedded in CppTL library.
5 | //# define JSON_IN_CPPTL 1
6 |
7 | /// If defined, indicates that json may leverage CppTL library
8 | //# define JSON_USE_CPPTL 1
9 | /// If defined, indicates that cpptl vector based map should be used instead of std::map
10 | /// as Value container.
11 | //# define JSON_USE_CPPTL_SMALLMAP 1
12 | /// If defined, indicates that Json specific container should be used
13 | /// (hash table & simple deque container with customizable allocator).
14 | /// THIS FEATURE IS STILL EXPERIMENTAL!
15 | //# define JSON_VALUE_USE_INTERNAL_MAP 1
16 | /// Force usage of standard new/malloc based allocator instead of memory pool based allocator.
17 | /// The memory pools allocator used optimization (initializing Value and ValueInternalLink
18 | /// as if it was a POD) that may cause some validation tool to report errors.
19 | /// Only has effects if JSON_VALUE_USE_INTERNAL_MAP is defined.
20 | //# define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1
21 |
22 | /// If defined, indicates that Json use exception to report invalid type manipulation
23 | /// instead of C assert macro.
24 | # define JSON_USE_EXCEPTION 1
25 |
26 | # ifdef JSON_IN_CPPTL
27 | # include
28 | # ifndef JSON_USE_CPPTL
29 | # define JSON_USE_CPPTL 1
30 | # endif
31 | # endif
32 |
33 | # ifdef JSON_IN_CPPTL
34 | # define JSON_API CPPTL_API
35 | # elif defined(JSON_DLL_BUILD)
36 | # define JSON_API __declspec(dllexport)
37 | # elif defined(JSON_DLL)
38 | # define JSON_API __declspec(dllimport)
39 | # else
40 | # define JSON_API
41 | # endif
42 |
43 | #endif // JSON_CONFIG_H_INCLUDED
44 |
--------------------------------------------------------------------------------
/12306Client_MFC/ReadMe.txt:
--------------------------------------------------------------------------------
1 | ================================================================================
2 | MICROSOFT 基础类库 : 12306Client_MFC 项目概述
3 | ===============================================================================
4 |
5 | 应用程序向导已为您创建了此 12306Client_MFC 应用程序。此应用程序不仅演示 Microsoft 基础类的基本使用方法,还可作为您编写应用程序的起点。
6 |
7 | 本文件概要介绍组成 12306Client_MFC 应用程序的每个文件的内容。
8 |
9 | 12306Client_MFC.vcxproj
10 | 这是使用应用程序向导生成的 VC++ 项目的主项目文件,其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。
11 |
12 | 12306Client_MFC.vcxproj.filters
13 | 这是使用“应用程序向导”生成的 VC++ 项目筛选器文件。它包含有关项目文件与筛选器之间的关联信息。在 IDE 中,通过这种关联,在特定节点下以分组形式显示具有相似扩展名的文件。例如,“.cpp”文件与“源文件”筛选器关联。
14 |
15 | 12306Client_MFC.h
16 | 这是应用程序的主头文件。
17 | 其中包括其他项目特定的标头(包括 Resource.h),并声明 CMy12306Client_MFCApp 应用程序类。
18 |
19 | 12306Client_MFC.cpp
20 | 这是包含应用程序类 CMy12306Client_MFCApp 的主应用程序源文件。
21 |
22 | 12306Client_MFC.rc
23 | 这是程序使用的所有 Microsoft Windows 资源的列表。它包括 RES 子目录中存储的图标、位图和光标。此文件可以直接在 Microsoft Visual C++ 中进行编辑。项目资源包含在 2052 中。
24 |
25 | res\12306Client_MFC.ico
26 | 这是用作应用程序图标的图标文件。此图标包括在主资源文件 12306Client_MFC.rc 中。
27 |
28 | res\My12306Client_MFC.rc2
29 | 此文件包含不在 Microsoft Visual C++ 中进行编辑的资源。您应该将不可由资源编辑器编辑的所有资源放在此文件中。
30 |
31 | /////////////////////////////////////////////////////////////////////////////
32 |
33 | 对于主框架窗口:
34 | 该项目包含一个标准的 MFC 接口。
35 |
36 | MainFrm.h, MainFrm.cpp
37 | 这些文件中包含框架类 CMainFrame,该类派生自
38 | CFrameWnd 并控制所有 SDI 框架功能。
39 |
40 | /////////////////////////////////////////////////////////////////////////////
41 |
42 | 应用程序向导创建一种文档类型和一个视图:
43 |
44 | 12306Client_MFCDoc.h、12306Client_MFCDoc.cpp - 文档
45 | 这些文件包含 CMy12306Client_MFCDoc 类。编辑这些文件以添加特殊文档数据并实现文件保存和加载(通过 CMy12306Client_MFCDoc::Serialize)。
46 |
47 | 12306Client_MFCView.h、12306Client_MFCView.cpp - 文档视图
48 | 这些文件包含 CMy12306Client_MFCView 类。
49 | CMy12306Client_MFCView 对象用于查看 CMy12306Client_MFCDoc 对象。
50 |
51 |
52 |
53 |
54 | /////////////////////////////////////////////////////////////////////////////
55 |
56 | 其他功能:
57 |
58 | ActiveX 控件
59 | 该应用程序包含对使用 ActiveX 控件的支持。
60 |
61 | Windows 套接字
62 | 应用程序包含对通过 TCP/IP 网络建立通信的支持。
63 |
64 | /////////////////////////////////////////////////////////////////////////////
65 |
66 | 其他标准文件:
67 |
68 | StdAfx.h, StdAfx.cpp
69 | 这些文件用于生成名为 12306Client_MFC.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。
70 |
71 | Resource.h
72 | 这是标准头文件,可用于定义新的资源 ID。Microsoft Visual C++ 将读取并更新此文件。
73 |
74 | 12306Client_MFC.manifest
75 | Windows XP 使用应用程序清单文件来描述特定版本的并行程序集的应用程序依赖项。加载程序使用这些信息来从程序集缓存中加载相应的程序集,并保护其不被应用程序访问。应用程序清单可能会包含在内,以作为与应用程序可执行文件安装在同一文件夹中的外部 .manifest 文件进行重新分发,它还可能以资源的形式包含在可执行文件中。
76 | /////////////////////////////////////////////////////////////////////////////
77 |
78 | 其他注释:
79 |
80 | 应用程序向导使用“TODO:”来指示应添加或自定义的源代码部分。
81 |
82 | 如果应用程序使用共享 DLL 中的 MFC,您将需要重新分发 MFC DLL。如果应用程序所使用的语言与操作系统的区域设置不同,则还需要重新分发相应的本地化资源 mfc110XXX.DLL。
83 | 有关上述话题的更多信息,请参见 MSDN 文档中有关重新分发 Visual C++ 应用程序的部分。
84 |
85 | /////////////////////////////////////////////////////////////////////////////
86 |
--------------------------------------------------------------------------------
/12306Client_MFC/include/curl/curlver.h:
--------------------------------------------------------------------------------
1 | #ifndef __CURL_CURLVER_H
2 | #define __CURL_CURLVER_H
3 | /***************************************************************************
4 | * _ _ ____ _
5 | * Project ___| | | | _ \| |
6 | * / __| | | | |_) | |
7 | * | (__| |_| | _ <| |___
8 | * \___|\___/|_| \_\_____|
9 | *
10 | * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al.
11 | *
12 | * This software is licensed as described in the file COPYING, which
13 | * you should have received as part of this distribution. The terms
14 | * are also available at http://curl.haxx.se/docs/copyright.html.
15 | *
16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 | * copies of the Software, and permit persons to whom the Software is
18 | * furnished to do so, under the terms of the COPYING file.
19 | *
20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 | * KIND, either express or implied.
22 | *
23 | ***************************************************************************/
24 |
25 | /* This header file contains nothing but libcurl version info, generated by
26 | a script at release-time. This was made its own header file in 7.11.2 */
27 |
28 | /* This is the global package copyright */
29 | #define LIBCURL_COPYRIGHT "1996 - 2013 Daniel Stenberg, ."
30 |
31 | /* This is the version number of the libcurl package from which this header
32 | file origins: */
33 | #define LIBCURL_VERSION "7.34.0"
34 |
35 | /* The numeric version number is also available "in parts" by using these
36 | defines: */
37 | #define LIBCURL_VERSION_MAJOR 7
38 | #define LIBCURL_VERSION_MINOR 34
39 | #define LIBCURL_VERSION_PATCH 0
40 |
41 | /* This is the numeric version of the libcurl version number, meant for easier
42 | parsing and comparions by programs. The LIBCURL_VERSION_NUM define will
43 | always follow this syntax:
44 |
45 | 0xXXYYZZ
46 |
47 | Where XX, YY and ZZ are the main version, release and patch numbers in
48 | hexadecimal (using 8 bits each). All three numbers are always represented
49 | using two digits. 1.2 would appear as "0x010200" while version 9.11.7
50 | appears as "0x090b07".
51 |
52 | This 6-digit (24 bits) hexadecimal number does not show pre-release number,
53 | and it is always a greater number in a more recent release. It makes
54 | comparisons with greater than and less than work.
55 | */
56 | #define LIBCURL_VERSION_NUM 0x072200
57 |
58 | /*
59 | * This is the date and time when the full source package was created. The
60 | * timestamp is not stored in git, as the timestamp is properly set in the
61 | * tarballs by the maketgz script.
62 | *
63 | * The format of the date should follow this template:
64 | *
65 | * "Mon Feb 12 11:35:33 UTC 2007"
66 | */
67 | #define LIBCURL_TIMESTAMP "Tue Dec 17 07:51:08 UTC 2013"
68 |
69 | #endif /* __CURL_CURLVER_H */
70 |
--------------------------------------------------------------------------------
/12306Client_MFC/include/curl/mprintf.h:
--------------------------------------------------------------------------------
1 | #ifndef __CURL_MPRINTF_H
2 | #define __CURL_MPRINTF_H
3 | /***************************************************************************
4 | * _ _ ____ _
5 | * Project ___| | | | _ \| |
6 | * / __| | | | |_) | |
7 | * | (__| |_| | _ <| |___
8 | * \___|\___/|_| \_\_____|
9 | *
10 | * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al.
11 | *
12 | * This software is licensed as described in the file COPYING, which
13 | * you should have received as part of this distribution. The terms
14 | * are also available at http://curl.haxx.se/docs/copyright.html.
15 | *
16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 | * copies of the Software, and permit persons to whom the Software is
18 | * furnished to do so, under the terms of the COPYING file.
19 | *
20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 | * KIND, either express or implied.
22 | *
23 | ***************************************************************************/
24 |
25 | #include
26 | #include /* needed for FILE */
27 |
28 | #include "curl.h"
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif
33 |
34 | CURL_EXTERN int curl_mprintf(const char *format, ...);
35 | CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...);
36 | CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...);
37 | CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength,
38 | const char *format, ...);
39 | CURL_EXTERN int curl_mvprintf(const char *format, va_list args);
40 | CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args);
41 | CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args);
42 | CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength,
43 | const char *format, va_list args);
44 | CURL_EXTERN char *curl_maprintf(const char *format, ...);
45 | CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args);
46 |
47 | #ifdef _MPRINTF_REPLACE
48 | # undef printf
49 | # undef fprintf
50 | # undef sprintf
51 | # undef vsprintf
52 | # undef snprintf
53 | # undef vprintf
54 | # undef vfprintf
55 | # undef vsnprintf
56 | # undef aprintf
57 | # undef vaprintf
58 | # define printf curl_mprintf
59 | # define fprintf curl_mfprintf
60 | #ifdef CURLDEBUG
61 | /* When built with CURLDEBUG we define away the sprintf functions since we
62 | don't want internal code to be using them */
63 | # define sprintf sprintf_was_used
64 | # define vsprintf vsprintf_was_used
65 | #else
66 | # define sprintf curl_msprintf
67 | # define vsprintf curl_mvsprintf
68 | #endif
69 | # define snprintf curl_msnprintf
70 | # define vprintf curl_mvprintf
71 | # define vfprintf curl_mvfprintf
72 | # define vsnprintf curl_mvsnprintf
73 | # define aprintf curl_maprintf
74 | # define vaprintf curl_mvaprintf
75 | #endif
76 |
77 | #ifdef __cplusplus
78 | }
79 | #endif
80 |
81 | #endif /* __CURL_MPRINTF_H */
82 |
--------------------------------------------------------------------------------
/12306Client_MFC/include/curl/easy.h:
--------------------------------------------------------------------------------
1 | #ifndef __CURL_EASY_H
2 | #define __CURL_EASY_H
3 | /***************************************************************************
4 | * _ _ ____ _
5 | * Project ___| | | | _ \| |
6 | * / __| | | | |_) | |
7 | * | (__| |_| | _ <| |___
8 | * \___|\___/|_| \_\_____|
9 | *
10 | * Copyright (C) 1998 - 2008, Daniel Stenberg, , et al.
11 | *
12 | * This software is licensed as described in the file COPYING, which
13 | * you should have received as part of this distribution. The terms
14 | * are also available at http://curl.haxx.se/docs/copyright.html.
15 | *
16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 | * copies of the Software, and permit persons to whom the Software is
18 | * furnished to do so, under the terms of the COPYING file.
19 | *
20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 | * KIND, either express or implied.
22 | *
23 | ***************************************************************************/
24 | #ifdef __cplusplus
25 | extern "C" {
26 | #endif
27 |
28 | CURL_EXTERN CURL *curl_easy_init(void);
29 | CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...);
30 | CURL_EXTERN CURLcode curl_easy_perform(CURL *curl);
31 | CURL_EXTERN void curl_easy_cleanup(CURL *curl);
32 |
33 | /*
34 | * NAME curl_easy_getinfo()
35 | *
36 | * DESCRIPTION
37 | *
38 | * Request internal information from the curl session with this function. The
39 | * third argument MUST be a pointer to a long, a pointer to a char * or a
40 | * pointer to a double (as the documentation describes elsewhere). The data
41 | * pointed to will be filled in accordingly and can be relied upon only if the
42 | * function returns CURLE_OK. This function is intended to get used *AFTER* a
43 | * performed transfer, all results from this function are undefined until the
44 | * transfer is completed.
45 | */
46 | CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);
47 |
48 |
49 | /*
50 | * NAME curl_easy_duphandle()
51 | *
52 | * DESCRIPTION
53 | *
54 | * Creates a new curl session handle with the same options set for the handle
55 | * passed in. Duplicating a handle could only be a matter of cloning data and
56 | * options, internal state info and things like persistent connections cannot
57 | * be transferred. It is useful in multithreaded applications when you can run
58 | * curl_easy_duphandle() for each new thread to avoid a series of identical
59 | * curl_easy_setopt() invokes in every thread.
60 | */
61 | CURL_EXTERN CURL* curl_easy_duphandle(CURL *curl);
62 |
63 | /*
64 | * NAME curl_easy_reset()
65 | *
66 | * DESCRIPTION
67 | *
68 | * Re-initializes a CURL handle to the default values. This puts back the
69 | * handle to the same state as it was in when it was just created.
70 | *
71 | * It does keep: live connections, the Session ID cache, the DNS cache and the
72 | * cookies.
73 | */
74 | CURL_EXTERN void curl_easy_reset(CURL *curl);
75 |
76 | /*
77 | * NAME curl_easy_recv()
78 | *
79 | * DESCRIPTION
80 | *
81 | * Receives data from the connected socket. Use after successful
82 | * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
83 | */
84 | CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen,
85 | size_t *n);
86 |
87 | /*
88 | * NAME curl_easy_send()
89 | *
90 | * DESCRIPTION
91 | *
92 | * Sends data over the connected socket. Use after successful
93 | * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
94 | */
95 | CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer,
96 | size_t buflen, size_t *n);
97 |
98 | #ifdef __cplusplus
99 | }
100 | #endif
101 |
102 | #endif
103 |
--------------------------------------------------------------------------------
/12306Client_MFC/12306Client_MFC.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | 头文件
24 |
25 |
26 | 头文件
27 |
28 |
29 | 头文件
30 |
31 |
32 | 头文件
33 |
34 |
35 | 头文件
36 |
37 |
38 | 头文件
39 |
40 |
41 | 头文件
42 |
43 |
44 | 头文件
45 |
46 |
47 | 头文件
48 |
49 |
50 | 头文件
51 |
52 |
53 | 头文件
54 |
55 |
56 | 头文件
57 |
58 |
59 | 头文件
60 |
61 |
62 | 头文件
63 |
64 |
65 | 头文件
66 |
67 |
68 |
69 |
70 | 源文件
71 |
72 |
73 | 源文件
74 |
75 |
76 | 源文件
77 |
78 |
79 | 源文件
80 |
81 |
82 | 源文件
83 |
84 |
85 | 源文件
86 |
87 |
88 | 源文件
89 |
90 |
91 | 源文件
92 |
93 |
94 | 源文件
95 |
96 |
97 | 源文件
98 |
99 |
100 | 源文件
101 |
102 |
103 | 源文件
104 |
105 |
106 | 源文件
107 |
108 |
109 |
110 |
111 | 资源文件
112 |
113 |
114 |
115 |
116 | 资源文件
117 |
118 |
119 |
120 |
121 | 资源文件
122 |
123 |
124 | 资源文件
125 |
126 |
127 |
--------------------------------------------------------------------------------
/12306Client_MFC/TBListCtrl.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include