mapSessions;
122 |
123 | for (auto it = sessions.cbegin(); it != sessions.cend(); ++it)
124 | {
125 | mapSessions[*it] = NULL;
126 | }
127 |
128 | usersAndSessions[account] = mapSessions;
129 |
130 | exp.filterUsersAndSessions(usersAndSessions);
131 |
132 | exp.run();
133 |
134 | exp.waitForComplition();
135 |
136 | return 0;
137 | }
138 |
139 | #endif // WechatExporterCmd_h
140 |
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 微信聊天记录导出程序 Wechat Exporter
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | 微信聊天记录导出程序 Wechat Exporter (for Windows/MacOS)
17 | C++源码:https://github.com/BlueMatthew/WechatExporter
18 | 操作步骤
19 |
20 | 通过iTunes将手机备份到电脑上(建议备份前杀掉微信),Windows操作系统一般位于目录:C:\用户[用户名]\AppData\Roaming\Apple Computer\MobileSync\Backup\。Android手机可以找一个iPad/iPhone设备,把聊天记录迁移到iPad/iPhone设备上,然后通过iTunes备份到电脑上。
21 | 下载本代码的执行文件:Windows x64版本 或者 MacOS x64版本,然后解压压缩文件
22 | 执行解压出来的WechatExport.exe/WechatExporter (Windows下如果运行报缺少必须的dll文件,请安装Visual C++ 2017 redist后再尝试运行)
23 | 按界面提示进行操作。
24 |
25 |
26 | 
27 |
28 | 模版修改
29 | 解压目录下的res(MacOS版本位于Contents)子目录里存放了输出聊天记录的html页面模版,其中通过两个%包含起来的字符串,譬如,%%NAME%%,不要修改之外,其它页面内容和格式都可以自行调整。
30 | 系统依赖
31 | Windows版本:Windows 7+, Visual C++ 2017 redist at The latest supported Visual C++ downloads
MacOS版本:MacOS 10.10(Yosemite)+
32 | 程序编译
33 | 程序依赖如下第三方库:
34 | - libxml2: http://www.xmlsoft.org/
35 | - libcurl: https://curl.se/libcurl/
36 | - libsqlite3: https://www.sqlite.org/index.html
37 | - libprotobuf: https://github.com/protocolbuffers/protobuf
38 | - libjsoncpp: https://github.com/open-source-parsers/jsoncpp
39 | - lame: http://lame.sourceforge.net/
40 | - silk: https://github.com/collects/silk (也参考了: https://github.com/kn007/silk-v3-decoder)
41 | - libplist: https://github.com/libimobiledevice/libplist https://github.com/libimobiledevice-win32/libplist
42 | - libiconv(windows only): https://www.gnu.org/software/libiconv/
43 | - openssl(windows only):https://github.com/openssl/openssl
44 | - WTL (windows only):https://sourceforge.net/projects/wtl/
45 | MacOS下,libxml2,libcurl,libsqlite3直接使用了Xcode自带的库,其它第三方库需自行编译。
libmp3lame需手动删除文件include/libmp3lame.sym中的行:lame_init_old
46 | Windows环境下,silk自带Visual Studio工程文件,可以直接利用Visual Studio编译,其余除了libplist之外,都通过vcpkg可以编译。libplist在vcpkg中也存在,但是在编译x64-windows-static target的时候报了错,于是直接通过Visual Studio建了工程进行编译。可以直接下载预编译好的静态库文件
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/docs/screenshots/mac.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BlueMatthew/WechatExporter/8f8ce412fc57c4c792cb519e9d1fb980e0f58cfd/docs/screenshots/mac.png
--------------------------------------------------------------------------------
/docs/screenshots/screenshot-mac.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BlueMatthew/WechatExporter/8f8ce412fc57c4c792cb519e9d1fb980e0f58cfd/docs/screenshots/screenshot-mac.png
--------------------------------------------------------------------------------
/docs/screenshots/screenshot-win.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BlueMatthew/WechatExporter/8f8ce412fc57c4c792cb519e9d1fb980e0f58cfd/docs/screenshots/screenshot-win.png
--------------------------------------------------------------------------------
/docs/screenshots/win.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BlueMatthew/WechatExporter/8f8ce412fc57c4c792cb519e9d1fb980e0f58cfd/docs/screenshots/win.png
--------------------------------------------------------------------------------
/docs/update.conf:
--------------------------------------------------------------------------------
1 | 1.8.0.8
2 | https://src.wakin.org/github/wxexp/
3 | https://src.wakin.org/github/wxexp/
--------------------------------------------------------------------------------
/libplist.README.md:
--------------------------------------------------------------------------------
1 | the libplist is for win32 from vcpkg as vcpkg install fails on x64-windows-static
2 | it should be from: https://github.com/libimobiledevice-win32/libplist
3 |
4 | For Mac OS, please use the code at: https://github.com/libimobiledevice/libplist
--------------------------------------------------------------------------------
/release:
--------------------------------------------------------------------------------
1 | releases
--------------------------------------------------------------------------------
/vcproject/AboutDlg.h:
--------------------------------------------------------------------------------
1 | // aboutdlg.h : interface of the CAboutDlg class
2 | //
3 | /////////////////////////////////////////////////////////////////////////////
4 |
5 | #pragma once
6 | #include
7 | #include "VersionDetector.h"
8 |
9 | class CAboutDlg : public CDialogImpl
10 | {
11 | public:
12 | enum { IDD = IDD_ABOUTBOX };
13 |
14 | BEGIN_MSG_MAP(CAboutDlg)
15 | MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
16 | COMMAND_ID_HANDLER(IDOK, OnCloseCmd)
17 | COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
18 | END_MSG_MAP()
19 |
20 | // Handler prototypes (uncomment arguments if needed):
21 | // LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
22 | // LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
23 | // LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/)
24 |
25 | LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
26 | {
27 | m_homePageLinkCtrl.SubclassWindow(GetDlgItem(IDC_VERSION));
28 | // Replace to current version
29 | // If the version is set in aboud dlg resource directly,
30 | // The code below won't bring error.
31 | // CStatic lblVersion = GetDlgItem(IDC_VERSION);
32 | CString version;
33 | m_homePageLinkCtrl.GetWindowText(version);
34 | VersionDetector vd;
35 | CString newVersion = vd.GetProductVersion();
36 | newVersion = TEXT("v") + newVersion;
37 | version.Replace(TEXT("v1.0"), newVersion);
38 | m_homePageLinkCtrl.SetLabel(version);
39 |
40 | m_homePageLinkCtrl.SetHyperLink(TEXT("https://github.com/BlueMatthew/WechatExporter"));
41 |
42 | CenterWindow(GetParent());
43 | return TRUE;
44 | }
45 |
46 | LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
47 | {
48 | EndDialog(wID);
49 | return 0;
50 | }
51 |
52 | protected:
53 | CHyperLink m_homePageLinkCtrl;
54 | };
55 |
--------------------------------------------------------------------------------
/vcproject/AppConfiguration.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | #define ASYNC_NONE 0
6 | #define ASYNC_ONSCROLL 1
7 | #define ASYNC_PAGER_NORMAL 2
8 | #define ASYNC_PAGER_ON_YEAR 3
9 | #define ASYNC_PAGER_ON_MONTH 4
10 |
11 | class AppConfiguration
12 | {
13 | public:
14 |
15 | enum { OUTPUT_FORMAT_HTML = 0, OUTPUT_FORMAT_TEXT, OUTPUT_FORMAT_PDF, OUTPUT_FORMAT_LAST };
16 |
17 | static void SetDescOrder(BOOL descOrder);
18 | static BOOL GetDescOrder();
19 | static UINT GetOutputFormat();
20 | static void SetOutputFormat(UINT outputFormat);
21 | static void SetSavingInSession(BOOL savingInSession);
22 | static BOOL GetSavingInSession();
23 |
24 | static void SetUsingRemoteEmoji(BOOL usingRemoteEmoji);
25 | static BOOL GetUsingRemoteEmoji();
26 |
27 | static void SetIncrementalExporting(BOOL incrementalExporting);
28 | static BOOL GetIncrementalExporting();
29 |
30 | static void SetLastOutputDir(LPCTSTR szOutputDir);
31 | static CString GetLastOrDefaultOutputDir();
32 | static CString GetDefaultOutputDir();
33 |
34 | static void SetLastBackupDir(LPCTSTR szBackupDir);
35 | static CString GetLastBackupDir();
36 | static CString GetDefaultBackupDir(BOOL bCheckExistence = TRUE);
37 |
38 | static DWORD GetLastCheckUpdateTime();
39 | static void SetLastCheckUpdateTime(DWORD lastCheckUpdateTime = 0);
40 |
41 | static void SetCheckingUpdateDisabled(BOOL disabled);
42 | static BOOL GetCheckingUpdateDisabled();
43 |
44 | static void SetLoadingDataOnScroll();
45 | static BOOL GetLoadingDataOnScroll();
46 |
47 | static void SetSyncLoading();
48 | static BOOL GetSyncLoading();
49 | static DWORD GetAsyncLoading();
50 | static void SetAsyncLoading(DWORD asyncLoading);
51 |
52 | static void SetNormalPagination();
53 | static BOOL GetNormalPagination();
54 | static void SetPaginationOnYear();
55 | static BOOL GetPaginationOnYear();
56 | static void SetPaginationOnMonth();
57 | static BOOL GetPaginationOnMonth();
58 |
59 | static void SetSupportingFilter(BOOL supportingFilter);
60 | static BOOL GetSupportingFilter();
61 |
62 | static void SetOutputDebugLogs(BOOL dbgLogs);
63 | static BOOL OutputDebugLogs();
64 |
65 | static void SetIncludingSubscriptions(BOOL includingSubscriptions);
66 | static BOOL IncludeSubscriptions();
67 |
68 | static void SetOpenningFolderAfterExp(BOOL openningFolderAfterExp);
69 | static BOOL GetOpenningFolderAfterExp();
70 |
71 | static BOOL IsPdfSupported();
72 |
73 | static void upgrade();
74 | static uint64_t BuildOptions();
75 |
76 | protected:
77 | static BOOL GetStringProperty(LPCTSTR name, CString& value);
78 | static BOOL SetStringProperty(LPCTSTR name, LPCTSTR value);
79 |
80 | static BOOL GetDwordProperty(LPCTSTR name, DWORD& value);
81 | static BOOL SetDwordProperty(LPCTSTR name, DWORD value);
82 | static DWORD GetDwordValue(LPCTSTR name, DWORD defaultValue);
83 |
84 | static BOOL IsAppInstalled(LPCTSTR name, BOOL lmOrCU);
85 |
86 | };
87 |
--------------------------------------------------------------------------------
/vcproject/BackupDlg.h:
--------------------------------------------------------------------------------
1 | // aboutdlg.h : interface of the CAboutDlg class
2 | //
3 | /////////////////////////////////////////////////////////////////////////////
4 |
5 | #pragma once
6 |
7 | #include
8 |
9 | class CBackupDlg : public CDialogImpl
10 | {
11 | public:
12 | enum { IDD = IDD_BACKUP_DLG };
13 |
14 | BEGIN_MSG_MAP(CBackupDlg)
15 | MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
16 | MESSAGE_HANDLER(WM_TIMER, OnTimer)
17 | // COMMAND_ID_HANDLER(IDOK, OnCloseCmd)
18 | MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
19 | COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
20 | END_MSG_MAP()
21 |
22 |
23 | CBackupDlg(const DeviceInfo& deviceInfo, const CString& outputDir) : m_deviceInfo(deviceInfo), m_outputDir(outputDir), m_backup(NULL), m_eventId(0), m_result(false)
24 | {
25 |
26 | }
27 |
28 | // Handler prototypes (uncomment arguments if needed):
29 | // LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
30 | // LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
31 | // LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/)
32 |
33 | LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
34 | {
35 | CenterWindow(GetParent());
36 |
37 | CProgressBarCtrl progressCtrl = GetDlgItem(IDC_PROGRESS);
38 | // progressCtrl.SetWindowText(TEXT(""));
39 | progressCtrl.ModifyStyle(PBS_MARQUEE, 0);
40 | progressCtrl.SetRange32(1, 100);
41 | progressCtrl.SetStep(1);
42 | progressCtrl.SetPos(0);
43 |
44 | CW2A outputDir(CT2W((LPCTSTR)m_outputDir), CP_UTF8);
45 | m_backup = new IDeviceBackup(m_deviceInfo, (LPCSTR)outputDir);
46 |
47 | m_task = std::async(std::launch::async, &IDeviceBackup::backup, m_backup);
48 |
49 | m_eventId = SetTimer(1, 200);
50 | return TRUE;
51 | }
52 |
53 | LRESULT OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
54 | {
55 | if (0 != m_eventId)
56 | {
57 | KillTimer(m_eventId);
58 | }
59 | CenterWindow(GetParent());
60 |
61 | return 0;
62 | }
63 |
64 | LRESULT OnTimer(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
65 | {
66 | if (NULL != m_backup)
67 | {
68 | double progress = m_backup->getOverallProgress();
69 | int pos = (int)(progress * 100);
70 | if (pos > 100)
71 | {
72 | pos = 100;
73 | }
74 | else if (pos < 0)
75 | {
76 | pos = 0;
77 | }
78 |
79 | CProgressBarCtrl progressCtrl = GetDlgItem(IDC_PROGRESS);
80 | if (pos != progressCtrl.GetPos())
81 | {
82 | progressCtrl.SetPos(pos);
83 | }
84 | }
85 | std::future_status status = m_task.wait_for(std::chrono::seconds(0));
86 | if (status == std::future_status::ready)
87 | {
88 | KillTimer(m_eventId);
89 | m_eventId = 0;
90 |
91 | m_result = m_task.get();
92 |
93 | EndDialog(IDOK);
94 | }
95 |
96 |
97 | return 0;
98 | }
99 |
100 | LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
101 | {
102 | EndDialog(wID);
103 | return 0;
104 | }
105 |
106 | bool getBackupResult() const
107 | {
108 | return m_result;
109 | }
110 |
111 | protected:
112 | // CHyperLink m_homePageLinkCtrl;
113 | const DeviceInfo& m_deviceInfo;
114 | CString m_outputDir;
115 | IDeviceBackup* m_backup;
116 | std::future m_task;
117 |
118 | UINT m_eventId;
119 |
120 | bool m_result;
121 | };
122 |
--------------------------------------------------------------------------------
/vcproject/Core.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "..\WechatExporter\core\FileSystem.h"
4 | #include "..\WechatExporter\core\Logger.h"
5 | #include "..\WechatExporter\core\PdfConverter.h"
6 | #include "..\WechatExporter\core\ExportOption.h"
7 | #include "..\WechatExporter\core\Exporter.h"
8 | #include "..\WechatExporter\core\Updater.h"
9 | #include "..\WechatExporter\core\IDeviceBackup.h"
10 | #include "..\WechatExporter\core\WechatSource.h"
11 |
--------------------------------------------------------------------------------
/vcproject/ExportNotifierImpl.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "stdafx.h"
4 | #include "Core.h"
5 |
6 | class ExportNotifierImpl : public ExportNotifier
7 | {
8 | protected:
9 | HWND m_hWnd;
10 |
11 | public:
12 | static const UINT WM_START = WM_USER + 10;
13 | static const UINT WM_COMPLETE = WM_USER + 11;
14 | static const UINT WM_PROGRESS = WM_USER + 12;
15 | static const UINT WM_USR_SESS_START = WM_USER + 13;
16 | static const UINT WM_USR_SESS_COMPLETE = WM_USER + 14;
17 | static const UINT WM_SESSION_START = WM_USER + 16;
18 | static const UINT WM_SESSION_COMPLETE = WM_USER + 17;
19 | static const UINT WM_SESSION_PROGRESS = WM_USER + 18;
20 | static const UINT WM_TASKS_START = WM_USER + 19;
21 | static const UINT WM_TASKS_COMPLETE = WM_USER + 20;
22 | static const UINT WM_TASKS_PROGRESS = WM_USER + 21;
23 | static const UINT WM_EN_END = WM_TASKS_PROGRESS;
24 |
25 | public:
26 | ExportNotifierImpl(HWND hWnd) : m_hWnd(hWnd)
27 | {
28 | }
29 |
30 | ~ExportNotifierImpl()
31 | {
32 | m_hWnd = NULL;
33 | }
34 |
35 | void onStart() const
36 | {
37 | ::PostMessage(m_hWnd, WM_START, (WPARAM)0, (LPARAM)1/*cancellable*/);
38 | }
39 |
40 | void onProgress(uint32_t numberOfMessages, uint32_t numberOfTotalMessages) const
41 | {
42 | ::PostMessage(m_hWnd, WM_PROGRESS, (WPARAM)numberOfMessages, (LPARAM)numberOfTotalMessages);
43 | }
44 |
45 | void onComplete(bool cancelled) const
46 | {
47 | ::PostMessage(m_hWnd, WM_COMPLETE, (WPARAM)0, (LPARAM)(cancelled ? 1 : 0));
48 | }
49 |
50 | void onUserSessionStart(const std::string& usrName, uint32_t numberOfSessions) const
51 | {
52 |
53 | }
54 |
55 | void onUserSessionComplete(const std::string& usrName) const
56 | {
57 |
58 | }
59 |
60 | void onSessionStart(const std::string& sessionUsrName, void * sessionData, uint32_t numberOfTotalMessages) const
61 | {
62 | ::PostMessage(m_hWnd, WM_SESSION_START, reinterpret_cast(sessionData), (LPARAM)numberOfTotalMessages);
63 | }
64 |
65 | void onSessionProgress(const std::string& sessionUsrName, void * sessionData, uint32_t numberOfMessages, uint32_t numberOfTotalMessages) const
66 | {
67 | ::PostMessage(m_hWnd, WM_SESSION_PROGRESS, reinterpret_cast(sessionData), (LPARAM)numberOfMessages);
68 | }
69 |
70 | void onSessionComplete(const std::string& sessionUsrName, void * sessionData, bool cancelled) const
71 | {
72 | ::PostMessage(m_hWnd, WM_SESSION_COMPLETE, reinterpret_cast(sessionData), (LPARAM)(cancelled ? 1 : 0));
73 | }
74 |
75 | void onTasksStart(const std::string& usrName, uint32_t numberOfTotalTasks) const
76 | {
77 | ::PostMessage(m_hWnd, WM_TASKS_START, (WPARAM)numberOfTotalTasks, 0);
78 | }
79 |
80 | void onTasksProgress(const std::string& usrName, uint32_t numberOfCompletedTasks, uint32_t numberOfTotalMessages) const
81 | {
82 | ::PostMessage(m_hWnd, WM_TASKS_PROGRESS, numberOfTotalMessages, (LPARAM)numberOfCompletedTasks);
83 | }
84 |
85 | void onTasksComplete(const std::string& usrName, bool cancelled) const
86 | {
87 | ::PostMessage(m_hWnd, WM_TASKS_COMPLETE, 0, (LPARAM)(cancelled ? 1 : 0));
88 | }
89 | };
90 |
91 |
--------------------------------------------------------------------------------
/vcproject/LogListBox.h:
--------------------------------------------------------------------------------
1 | #if !defined(AFX_LOGLISTBOX_H_INCLUDED_)
2 | #define AFX_LOGLISTBOX_H_INCLUDED_
3 |
4 | #include
5 | #include
6 | #pragma once
7 |
8 | #ifndef __cplusplus
9 | #error WTL requires C++ compilation (use a .cpp suffix)
10 | #endif
11 |
12 | #ifndef __ATLAPP_H__
13 | #error LogListBox.h requires atlapp.h to be included first
14 | #endif
15 |
16 | #ifndef __ATLCTRLS_H__
17 | #error LogListBox.h requires atlctrls.h to be included first
18 | #endif
19 |
20 | template
21 | class ATL_NO_VTABLE CLogListBoxImpl : public ATL::CWindowImpl< T, TBase, TWinTraits >
22 | {
23 | public:
24 | // DECLARE_WND_SUPERCLASS(_T("WTL_LogListBox"), GetWndClassName())
25 | DECLARE_WND_SUPERCLASS2(NULL, T, TBase::GetWndClassName())
26 | // DECLARE_WND_SUPERCLASS2(NULL, CLogListBox, CListBox::GetWndClassName())
27 | // DECLARE_WND_SUPERCLASS(_T("WTL_LogListBox"), GetWndClassName())
28 |
29 | // Message map
30 | BEGIN_MSG_MAP(CLogListBoxImpl)
31 | MESSAGE_HANDLER(WM_KEYDOWN, OnKeyDown)
32 | END_MSG_MAP()
33 |
34 | // Message handlers
35 | LRESULT OnKeyDown(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
36 | {
37 | if ((::GetKeyState(VK_CONTROL) & 0x8000) != 0)
38 | {
39 | if (wParam == 'A' || wParam == 'a')
40 | {
41 | SetSel(-1);
42 | }
43 | else if (wParam == 'C' || wParam == 'c')
44 | {
45 | int selCount = GetSelCount();
46 | if (selCount > 0)
47 | {
48 | std::vector rgIndex(selCount, 0);
49 | GetSelItems(selCount, &rgIndex[0]);
50 | CString contents;
51 | CString line;
52 | for (int idx = 0; idx < selCount; ++idx)
53 | {
54 | GetText(rgIndex[idx], line);
55 | contents.Append(line);
56 | contents.Append(TEXT("\r\n"));
57 | }
58 |
59 | int cch = contents.GetLength();
60 | if (cch > 0 && ::OpenClipboard(NULL))
61 | {
62 | ::EmptyClipboard();
63 |
64 | HGLOBAL hglbCopy = ::GlobalAlloc(GMEM_MOVEABLE, (cch + 1) * sizeof(TCHAR));
65 | if (NULL != hglbCopy)
66 | {
67 | // Lock the handle and copy the text to the buffer.
68 | LPTSTR lptstrCopy = (LPTSTR)::GlobalLock(hglbCopy);
69 | LPTSTR lptstrBuffer = contents.LockBuffer();
70 | memcpy(lptstrCopy, lptstrBuffer, cch * sizeof(TCHAR));
71 | contents.UnlockBuffer();
72 | lptstrCopy[cch] = (TCHAR)0; // null character
73 | ::GlobalUnlock(hglbCopy);
74 | // Place the handle on the clipboard.
75 |
76 | #ifdef _UNICODE
77 | ::SetClipboardData(CF_UNICODETEXT, hglbCopy);
78 | #else
79 | ::SetClipboardData(CF_TEXT, hglbCopy);
80 | #endif
81 |
82 | }
83 |
84 | ::CloseClipboard();
85 | if (NULL != hglbCopy) ::GlobalFree(hglbCopy);
86 | }
87 | }
88 | }
89 | }
90 |
91 | return 0;
92 | }
93 |
94 | };
95 |
96 |
97 |
98 | class CLogListBox : public CLogListBoxImpl
99 | {
100 | public:
101 | DECLARE_WND_SUPERCLASS(_T("WTL_LogListBox"), GetWndClassName())
102 |
103 | };
104 |
105 |
106 | #endif // !defined(AFX_LOGLISTBOX_H_INCLUDED_)
107 |
--------------------------------------------------------------------------------
/vcproject/LoggerImpl.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "stdafx.h"
4 | #include "Core.h"
5 | #include
6 | #include
7 |
8 | class LoggerImpl : public Logger
9 | {
10 | protected:
11 | #if !defined(NDEBUG) || defined(DBG_PERF)
12 | CRITICAL_SECTION m_cs;
13 | TCHAR m_szLogFile[MAX_PATH];
14 | #endif
15 | HWND m_hWndLog;
16 | public:
17 | LoggerImpl(HWND hWndLog) : m_hWndLog(hWndLog)
18 | {
19 | #if !defined(NDEBUG) || defined(DBG_PERF)
20 | InitializeCriticalSection(&m_cs);
21 | m_szLogFile[0] = 0;
22 | #endif
23 | }
24 |
25 | ~LoggerImpl()
26 | {
27 | m_hWndLog = NULL;
28 | #if !defined(NDEBUG) || defined(DBG_PERF)
29 | DeleteCriticalSection(&m_cs);
30 | #endif
31 | }
32 |
33 | void setLogPath(LPCTSTR lpszLogPath)
34 | {
35 | #if !defined(NDEBUG) || defined(DBG_PERF)
36 | EnterCriticalSection(&m_cs);
37 | _tcscpy(m_szLogFile, lpszLogPath);
38 | PathAppend(m_szLogFile, TEXT("log.txt"));
39 | HANDLE hFile = CreateFile(m_szLogFile, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
40 | if (INVALID_HANDLE_VALUE != hFile)
41 | {
42 | CloseHandle(hFile);
43 | }
44 | LeaveCriticalSection(&m_cs);
45 | #endif
46 | }
47 |
48 | void outputLog(LPCTSTR pszLog)
49 | {
50 | ::SendMessage(m_hWndLog, LB_ADDSTRING, 0, (LPARAM)pszLog);
51 | LRESULT count = ::SendMessage(m_hWndLog, LB_GETCOUNT, 0, 0L);
52 | ::SendMessage(m_hWndLog, LB_SETTOPINDEX, count - 1, 0L);
53 | }
54 |
55 | void write(const std::string& log)
56 | {
57 | #if !defined(NDEBUG) || defined(DBG_PERF)
58 | std::string timeString = getTimestampString(false, true) + ": ";
59 | #else
60 | std::string timeString = getTimestampString() + ": ";
61 | #endif
62 | CA2T szTime(timeString.c_str());
63 |
64 | #if !defined(NDEBUG) || defined(DBG_PERF)
65 | EnterCriticalSection(&m_cs);
66 | if (_tcslen(m_szLogFile) > 0)
67 | {
68 | HANDLE hFile = ::CreateFile(m_szLogFile, GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
69 | if (INVALID_HANDLE_VALUE != hFile)
70 | {
71 | ::SetFilePointer(hFile, 0, 0, FILE_END);
72 | DWORD dwBytesToWrite = static_cast(log.size());
73 | DWORD dwBytesWritten = 0;
74 | BOOL bErrorFlag = WriteFile(hFile, timeString.c_str(), timeString.size(), &dwBytesWritten, NULL);
75 | bErrorFlag = WriteFile(hFile, log.c_str(), dwBytesToWrite, &dwBytesWritten, NULL);
76 | if (bErrorFlag)
77 | {
78 | WriteFile(hFile, "\r\n", 2, &dwBytesWritten, NULL);
79 | }
80 | CloseHandle(hFile);
81 | }
82 | }
83 | LeaveCriticalSection(&m_cs);
84 | #endif
85 |
86 | CW2T pszT(CA2W(log.c_str(), CP_UTF8));
87 |
88 | std::vector szLog;
89 | szLog.resize(_tcslen(pszT) + _tcslen(szTime) + 1, 0);
90 |
91 | _tcscpy(&szLog[0], (LPCTSTR)szTime);
92 | _tcscat(&szLog[0], (LPCTSTR)pszT);
93 |
94 | outputLog(&szLog[0]);
95 | }
96 |
97 | void debug(const std::string& log)
98 | {
99 | // #if !defined(NDEBUG) || defined(DBG_PERF)
100 | write("[DBG] " + log);
101 | // #endif
102 | }
103 | };
104 |
105 |
--------------------------------------------------------------------------------
/vcproject/TextProgressBarCtrl.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 |
7 | template
8 | class ATL_NO_VTABLE CTextProgressBarCtrlT : public CWindowImpl, public CThemeImpl
9 | {
10 | public:
11 | CTextProgressBarCtrlT()
12 | {
13 | SetThemeClassList(L"PROGRESS");
14 | }
15 |
16 | BOOL SubclassWindow(HWND hWnd)
17 | {
18 | BOOL result = CWindowImpl::SubclassWindow(hWnd);
19 | if (result)
20 | {
21 | if (GetThemeClassList() != NULL)
22 | OpenThemeData();
23 | }
24 |
25 | return result;
26 | }
27 |
28 | BEGIN_MSG_MAP(CTextProgressBarCtrl)
29 | CHAIN_MSG_MAP(CThemeImpl)
30 | MESSAGE_HANDLER(WM_PAINT, OnPaint)
31 | MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBkgnd)
32 | DEFAULT_REFLECTION_HANDLER()
33 | END_MSG_MAP()
34 |
35 | // message handlers
36 |
37 | LRESULT OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
38 | {
39 | RECT rc;
40 | GetClientRect(&rc);
41 |
42 | CPaintDC dc(m_hWnd);
43 |
44 | if (rc.right > rc.left && rc.bottom > rc.top)
45 | {
46 | CMemoryDC dcMem(dc.m_hDC, rc);
47 |
48 | if (IsAppThemed())
49 | DrawThemedProgressBar(dcMem, rc);
50 | else
51 | DrawClassicProgressBar(dcMem, rc);
52 |
53 | DrawText(dcMem, rc);
54 | }
55 |
56 | bHandled = TRUE;
57 | return 1;
58 | }
59 |
60 | LRESULT OnEraseBkgnd(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
61 | {
62 | return 1; // we painted the background
63 | }
64 |
65 |
66 | protected:
67 |
68 | void CalcFillRect(CRect& rc)
69 | {
70 | int nLower = 0, nUpper = 0;
71 | GetRange(nLower, nUpper);
72 | if (nLower >= nUpper) nLower = nUpper - 1;
73 | int nPos = GetPos();
74 |
75 | if (nPos < nLower) nPos = nLower;
76 | if (nPos > nUpper) nPos = nUpper;
77 |
78 | DWORD dwStyle = GetStyle();
79 | BOOL bVertical = (dwStyle & PBS_VERTICAL) == PBS_VERTICAL;
80 |
81 | if (bVertical)
82 | rc.top = rc.bottom - (rc.bottom - rc.top) * (nPos - nLower) / (nUpper - nLower);
83 | else
84 | rc.right = rc.left + (rc.right - rc.left) * (nPos - nLower) / (nUpper - nLower);
85 | }
86 |
87 | void DrawThemedProgressBar(CMemoryDC& dc, const CRect& rc)
88 | {
89 | DrawThemeBackground(dc, PP_BAR, 0, &rc, NULL);
90 |
91 | CRect rcFill = rc;
92 | CalcFillRect(rcFill);
93 | DrawThemeBackground(dc, PP_FILL, PBFS_NORMAL, &rcFill, NULL);
94 | }
95 |
96 | void DrawClassicProgressBar(CMemoryDC& dc, const CRect& rc)
97 | {
98 | CRect rcEdge = rc;
99 | dc.DrawEdge(&rcEdge, EDGE_ETCHED, BF_RECT);
100 |
101 | CRect rc2 = rc;
102 | rc2.DeflateRect(1, 1, 1, 1);
103 | dc.FillSolidRect(&rc2, ::GetSysColor(COLOR_BTNFACE));
104 |
105 | CRect rcFill = rc2;
106 | if (rcFill.right > rcFill.left && rcFill.bottom > rcFill.top)
107 | {
108 | CalcFillRect(rcFill);
109 | dc.FillSolidRect(&rcFill, ::GetSysColor(COLOR_HIGHLIGHT));
110 | }
111 | }
112 |
113 | // draw text on the bar
114 | void DrawText(CMemoryDC& dc, const CRect& rc)
115 | {
116 | CString text;
117 | if (GetWindowText(text) > 0)
118 | {
119 | int oldBkMode = dc.SetBkMode(TRANSPARENT);
120 |
121 | HFONT hFont = GetFont();
122 | if (NULL == hFont)
123 | {
124 | hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
125 | }
126 | HFONT oldFont = dc.SelectFont(hFont);
127 | CRect rcText = rc;
128 | dc.DrawText((LPCTSTR)text, -1, &rcText, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
129 | dc.SelectFont(oldFont);
130 |
131 | dc.SetBkMode(oldBkMode);
132 | }
133 | }
134 | };
135 |
136 | class CTextProgressBarCtrl : public CTextProgressBarCtrlT
137 | {
138 | public:
139 | DECLARE_WND_SUPERCLASS(_T("WTL_progressbar"), GetWndClassName())
140 | };
141 |
--------------------------------------------------------------------------------
/vcproject/ToolTipButton.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | template
4 | class ATL_NO_VTABLE CToolTipButtonImpl : public ATL::CWindowImpl< T, TBase, TWinTraits >
5 | {
6 | public:
7 | DECLARE_WND_SUPERCLASS2(NULL, T, TBase::GetWndClassName())
8 |
9 | enum
10 | {
11 | _nImageNormal = 0,
12 | _nImagePushed,
13 | _nImageFocusOrHover,
14 | _nImageDisabled,
15 |
16 | _nImageCount = 4,
17 | };
18 |
19 | enum
20 | {
21 | ID_TIMER_FIRST = 1000,
22 | ID_TIMER_REPEAT = 1001
23 | };
24 |
25 | CToolTipCtrl m_tip;
26 | LPTSTR m_lpstrToolTipText;
27 |
28 | // Constructor/Destructor
29 | CToolTipButtonImpl() :
30 | m_lpstrToolTipText(NULL)
31 | {
32 |
33 | }
34 |
35 | ~CToolTipButtonImpl()
36 | {
37 | delete[] m_lpstrToolTipText;
38 | }
39 |
40 | // overridden to provide proper initialization
41 | BOOL SubclassWindow(HWND hWnd)
42 | {
43 | BOOL bRet = ATL::CWindowImpl< T, TBase, TWinTraits >::SubclassWindow(hWnd);
44 | if (bRet != FALSE)
45 | {
46 | T* pT = static_cast(this);
47 | pT->Init();
48 | }
49 |
50 | return bRet;
51 | }
52 |
53 | // Attributes
54 |
55 | int GetToolTipTextLength() const
56 | {
57 | return (m_lpstrToolTipText == NULL) ? -1 : lstrlen(m_lpstrToolTipText);
58 | }
59 |
60 | bool GetToolTipText(LPTSTR lpstrText, int nLength) const
61 | {
62 | ATLASSERT(lpstrText != NULL);
63 | if (m_lpstrToolTipText == NULL)
64 | return false;
65 |
66 | errno_t nRet = ATL::Checked::tcsncpy_s(lpstrText, nLength, m_lpstrToolTipText, _TRUNCATE);
67 |
68 | return ((nRet == 0) || (nRet == STRUNCATE));
69 | }
70 |
71 | bool SetToolTipText(LPCTSTR lpstrText)
72 | {
73 | if (m_lpstrToolTipText != NULL)
74 | {
75 | delete[] m_lpstrToolTipText;
76 | m_lpstrToolTipText = NULL;
77 | }
78 |
79 | if (lpstrText == NULL)
80 | {
81 | if (m_tip.IsWindow())
82 | m_tip.Activate(FALSE);
83 | return true;
84 | }
85 |
86 | int cchLen = lstrlen(lpstrText) + 1;
87 | ATLTRY(m_lpstrToolTipText = new TCHAR[cchLen]);
88 | if (m_lpstrToolTipText == NULL)
89 | return false;
90 |
91 | ATL::Checked::tcscpy_s(m_lpstrToolTipText, cchLen, lpstrText);
92 | if (m_tip.IsWindow())
93 | {
94 | m_tip.Activate(TRUE);
95 | m_tip.AddTool(this->m_hWnd, m_lpstrToolTipText);
96 | }
97 |
98 | return true;
99 | }
100 |
101 | // Overrideables
102 |
103 | // Message map and handlers
104 | BEGIN_MSG_MAP(CBitmapButtonImpl)
105 | MESSAGE_HANDLER(WM_CREATE, OnCreate)
106 | MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
107 | MESSAGE_RANGE_HANDLER(WM_MOUSEFIRST, WM_MOUSELAST, OnMouseMessage)
108 | // MESSAGE_HANDLER(WM_MOUSEMOVE, OnMouseMove)
109 | // MESSAGE_HANDLER(WM_MOUSELEAVE, OnMouseLeave)
110 | END_MSG_MAP()
111 |
112 | LRESULT OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)
113 | {
114 | T* pT = static_cast(this);
115 | pT->Init();
116 |
117 | bHandled = FALSE;
118 | return 1;
119 | }
120 |
121 | LRESULT OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)
122 | {
123 | if (m_tip.IsWindow())
124 | {
125 | m_tip.DestroyWindow();
126 | m_tip.m_hWnd = NULL;
127 | }
128 | bHandled = FALSE;
129 | return 1;
130 | }
131 |
132 | LRESULT OnMouseMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
133 | {
134 | MSG msg = { this->m_hWnd, uMsg, wParam, lParam };
135 | if (m_tip.IsWindow())
136 | m_tip.RelayEvent(&msg);
137 | bHandled = FALSE;
138 | return 1;
139 | }
140 |
141 | // Implementation
142 | void Init()
143 | {
144 |
145 | // create a tool tip
146 | m_tip.Create(this->m_hWnd);
147 | ATLASSERT(m_tip.IsWindow());
148 | if (m_tip.IsWindow() && (m_lpstrToolTipText != NULL))
149 | {
150 | m_tip.Activate(TRUE);
151 | m_tip.AddTool(this->m_hWnd, m_lpstrToolTipText);
152 | }
153 |
154 | }
155 |
156 | BOOL StartTrackMouseLeave()
157 | {
158 | TRACKMOUSEEVENT tme = {};
159 | tme.cbSize = sizeof(tme);
160 | tme.dwFlags = TME_LEAVE;
161 | tme.hwndTrack = this->m_hWnd;
162 | return ::TrackMouseEvent(&tme);
163 | }
164 | };
165 |
166 | class CToolTipButton : public CToolTipButtonImpl
167 | {
168 | public:
169 | DECLARE_WND_SUPERCLASS(_T("WTL_ToolTipButton"), GetWndClassName())
170 |
171 | CToolTipButton() :
172 | CToolTipButtonImpl()
173 | { }
174 | };
175 |
--------------------------------------------------------------------------------
/vcproject/VersionDetector.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "stdafx.h"
4 |
5 | class VersionDetector
6 | {
7 | public:
8 | CString GetProductVersion()
9 | {
10 | TCHAR szPath[MAX_PATH] = { 0 };
11 |
12 | GetModuleFileName(NULL, szPath, MAX_PATH);
13 |
14 | return GetProductVersion(szPath);
15 | }
16 |
17 | CString GetProductVersion(LPCTSTR szPath)
18 | {
19 | CString strResult;
20 |
21 | DWORD dwHandle;
22 | DWORD dwSize = GetFileVersionInfoSize(szPath, &dwHandle);
23 |
24 | if (dwSize > 0)
25 | {
26 | BYTE* pbBuf = new BYTE[dwSize];
27 | if (GetFileVersionInfo(szPath, dwHandle, dwSize, pbBuf))
28 | {
29 | UINT uiSize;
30 | BYTE* lpb;
31 | if (VerQueryValue(pbBuf,
32 | TEXT("\\VarFileInfo\\Translation"),
33 | (void**)&lpb,
34 | &uiSize))
35 | {
36 | WORD* lpw = (WORD*)lpb;
37 | CString strQuery;
38 | strQuery.Format(TEXT("\\StringFileInfo\\%04x%04x\\ProductVersion"), lpw[0], lpw[1]);
39 | if (VerQueryValue(pbBuf,
40 | const_cast((LPCTSTR)strQuery),
41 | (void**)&lpb,
42 | &uiSize) && uiSize > 0)
43 | {
44 | strResult = (LPCTSTR)lpb;
45 | }
46 | }
47 | }
48 | delete[] pbBuf;
49 | }
50 |
51 | return strResult;
52 | }
53 | };
--------------------------------------------------------------------------------
/vcproject/ViewHelper.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include // for COM smart pointers
5 | #include // for COM smart pointers
6 | #include
7 | #include
8 | #include
9 | #include
10 |
11 | #define MB_TIMEDOUT 32000
12 |
13 | int MessageBoxTimeoutA(IN HWND hWnd, IN LPCSTR lpText,
14 | IN LPCSTR lpCaption, IN UINT uType,
15 | IN WORD wLanguageId, IN DWORD dwMilliseconds);
16 | int MessageBoxTimeoutW(IN HWND hWnd, IN LPCWSTR lpText,
17 | IN LPCWSTR lpCaption, IN UINT uType,
18 | IN WORD wLanguageId, IN DWORD dwMilliseconds);
19 |
20 | #ifdef UNICODE
21 | #define MessageBoxTimeout MessageBoxTimeoutW
22 | #else
23 | #define MessageBoxTimeout MessageBoxTimeoutA
24 | #endif
25 | int MsgBox(HWND hWnd, UINT uStrId, UINT uType = MB_OK);
26 | int MsgBox(HWND hWnd, const CString& text, UINT uType = MB_OK);
27 | void SetComboBoxCurSel(HWND hWnd, CComboBox &cbm, int nCurSel);
28 | void CheckAllItems(CListViewCtrl& listViewCtrl, BOOL fChecked);
29 | void SetHeaderCheckState(CListViewCtrl& listViewCtrl, BOOL fChecked);
30 | BOOL SetHeaderCheckState(CListViewCtrl& listViewCtrl);
31 |
32 | template< typename T >
33 | void ThrowIfFailed(HRESULT hr, T&& msg)
34 | {
35 | if (FAILED(hr))
36 | throw std::system_error{ hr, std::system_category(), std::forward(msg) };
37 | }
38 |
39 | // Deleter for a PIDL allocated by the shell.
40 | struct CoTaskMemDeleter
41 | {
42 | void operator()(ITEMIDLIST* pidl) const { ::CoTaskMemFree(pidl); }
43 | };
44 | // A smart pointer for PIDLs.
45 | using UniquePidlPtr = std::unique_ptr< ITEMIDLIST, CoTaskMemDeleter >;
46 | BOOL OpenFolder(LPCTSTR szFolder);
47 |
--------------------------------------------------------------------------------
/vcproject/WechatExporter.cpp:
--------------------------------------------------------------------------------
1 | // WechatExporter.cpp : main source file for WechatExporter.exe
2 | //
3 |
4 | #include "stdafx.h"
5 |
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include "ToolTipButton.h"
11 |
12 | #include "resource.h"
13 |
14 | #include "Core.h"
15 |
16 | #include "BackupDlg.h"
17 | #include "View.h"
18 | #include "aboutdlg.h"
19 | #include "MainFrm.h"
20 |
21 | CAppModule _Module;
22 |
23 | int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT)
24 | {
25 | CMessageLoop theLoop;
26 | _Module.AddMessageLoop(&theLoop);
27 |
28 | CMainFrame wndMain;
29 |
30 | if(wndMain.CreateEx() == NULL)
31 | {
32 | ATLTRACE(_T("Main window creation failed!\n"));
33 | return 0;
34 | }
35 |
36 | wndMain.ShowWindow(nCmdShow);
37 |
38 | int nRet = theLoop.Run();
39 |
40 | _Module.RemoveMessageLoop();
41 | return nRet;
42 | }
43 |
44 | int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpstrCmdLine, int nCmdShow)
45 | {
46 | HRESULT hRes = ::CoInitialize(NULL);
47 | ATLASSERT(SUCCEEDED(hRes));
48 |
49 | if (GetUserDefaultUILanguage() == MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED))
50 | {
51 | ::SetThreadUILanguage(MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED));
52 | }
53 | else
54 | {
55 | ::SetThreadUILanguage(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US));
56 | }
57 |
58 | AtlInitCommonControls(ICC_PROGRESS_CLASS | ICC_BAR_CLASSES | ICC_LISTVIEW_CLASSES | ICC_USEREX_CLASSES); // add flags to support other controls
59 |
60 | hRes = _Module.Init(NULL, hInstance);
61 | ATLASSERT(SUCCEEDED(hRes));
62 |
63 | TCHAR buffer[MAX_PATH] = { 0 };
64 | DWORD dwRet = GetModuleFileName(NULL, buffer, MAX_PATH);
65 | if (dwRet > 0)
66 | {
67 | if (PathRemoveFileSpec(buffer))
68 | {
69 | PathAppend(buffer, TEXT("Dlls"));
70 | SetDllDirectory(buffer);
71 | }
72 | }
73 | #ifndef NDEBUG
74 | else
75 | {
76 | assert(false);
77 | }
78 | #endif
79 |
80 | int nRet = Run(lpstrCmdLine, nCmdShow);
81 |
82 | _Module.Term();
83 | ::CoUninitialize();
84 |
85 | return nRet;
86 | }
87 |
--------------------------------------------------------------------------------
/vcproject/WechatExporter.h:
--------------------------------------------------------------------------------
1 | // WechatExporter.h
2 |
--------------------------------------------------------------------------------
/vcproject/WechatExporter.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BlueMatthew/WechatExporter/8f8ce412fc57c4c792cb519e9d1fb980e0f58cfd/vcproject/WechatExporter.rc
--------------------------------------------------------------------------------
/vcproject/WechatExporter.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28307.1259
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WechatExporter", "WechatExporter.vcxproj", "{F57219E8-8B1F-41E3-B553-03C1884E8E4D}"
7 | EndProject
8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WechatExporterCmd", "WechatExporterCmd.vcxproj", "{C0637D9A-3C23-495C-B661-5FDCD2169583}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|x64 = Debug|x64
13 | Debug|x86 = Debug|x86
14 | Release|x64 = Release|x64
15 | Release|x86 = Release|x86
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {F57219E8-8B1F-41E3-B553-03C1884E8E4D}.Debug|x64.ActiveCfg = Debug|x64
19 | {F57219E8-8B1F-41E3-B553-03C1884E8E4D}.Debug|x64.Build.0 = Debug|x64
20 | {F57219E8-8B1F-41E3-B553-03C1884E8E4D}.Debug|x86.ActiveCfg = Debug|Win32
21 | {F57219E8-8B1F-41E3-B553-03C1884E8E4D}.Debug|x86.Build.0 = Debug|Win32
22 | {F57219E8-8B1F-41E3-B553-03C1884E8E4D}.Release|x64.ActiveCfg = Release|x64
23 | {F57219E8-8B1F-41E3-B553-03C1884E8E4D}.Release|x64.Build.0 = Release|x64
24 | {F57219E8-8B1F-41E3-B553-03C1884E8E4D}.Release|x86.ActiveCfg = Release|Win32
25 | {F57219E8-8B1F-41E3-B553-03C1884E8E4D}.Release|x86.Build.0 = Release|Win32
26 | {C0637D9A-3C23-495C-B661-5FDCD2169583}.Debug|x64.ActiveCfg = Debug|x64
27 | {C0637D9A-3C23-495C-B661-5FDCD2169583}.Debug|x64.Build.0 = Debug|x64
28 | {C0637D9A-3C23-495C-B661-5FDCD2169583}.Debug|x86.ActiveCfg = Debug|Win32
29 | {C0637D9A-3C23-495C-B661-5FDCD2169583}.Debug|x86.Build.0 = Debug|Win32
30 | {C0637D9A-3C23-495C-B661-5FDCD2169583}.Release|x64.ActiveCfg = Release|x64
31 | {C0637D9A-3C23-495C-B661-5FDCD2169583}.Release|x64.Build.0 = Release|x64
32 | {C0637D9A-3C23-495C-B661-5FDCD2169583}.Release|x86.ActiveCfg = Release|Win32
33 | {C0637D9A-3C23-495C-B661-5FDCD2169583}.Release|x86.Build.0 = Release|Win32
34 | EndGlobalSection
35 | GlobalSection(SolutionProperties) = preSolution
36 | HideSolutionNode = FALSE
37 | EndGlobalSection
38 | GlobalSection(ExtensibilityGlobals) = postSolution
39 | SolutionGuid = {D4BEDF3C-C880-4E96-939D-8D1BCBEF9ED3}
40 | EndGlobalSection
41 | EndGlobal
42 |
--------------------------------------------------------------------------------
/vcproject/res/WechatExporter.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BlueMatthew/WechatExporter/8f8ce412fc57c4c792cb519e9d1fb980e0f58cfd/vcproject/res/WechatExporter.ico
--------------------------------------------------------------------------------
/vcproject/res/iPhone.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BlueMatthew/WechatExporter/8f8ce412fc57c4c792cb519e9d1fb980e0f58cfd/vcproject/res/iPhone.ico
--------------------------------------------------------------------------------
/vcproject/res/iTunes.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BlueMatthew/WechatExporter/8f8ce412fc57c4c792cb519e9d1fb980e0f58cfd/vcproject/res/iTunes.ico
--------------------------------------------------------------------------------
/vcproject/res/idr_main.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BlueMatthew/WechatExporter/8f8ce412fc57c4c792cb519e9d1fb980e0f58cfd/vcproject/res/idr_main.ico
--------------------------------------------------------------------------------
/vcproject/res/toolbar.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BlueMatthew/WechatExporter/8f8ce412fc57c4c792cb519e9d1fb980e0f58cfd/vcproject/res/toolbar.bmp
--------------------------------------------------------------------------------
/vcproject/stdafx.cpp:
--------------------------------------------------------------------------------
1 | // stdafx.cpp : source file that includes just the standard includes
2 | // WechatExporter.pch will be the pre-compiled header
3 | // stdafx.obj will contain the pre-compiled type information
4 |
5 | #include "stdafx.h"
6 |
--------------------------------------------------------------------------------
/vcproject/stdafx.h:
--------------------------------------------------------------------------------
1 | // stdafx.h : include file for standard system include files,
2 | // or project specific include files that are used frequently, but
3 | // are changed infrequently
4 | //
5 |
6 | #pragma once
7 |
8 | // Change these values to use different versions
9 | #define WINVER 0x0601 // Windows 7
10 | #define _WIN32_WINNT 0x0601
11 | #define _WIN32_IE 0x0700
12 | #define _RICHEDIT_VER 0x0500
13 |
14 | #include
15 | #include
16 | #include
17 |
18 | extern CAppModule _Module;
19 |
20 | #include
21 | #include
22 |
23 | #if defined _M_IX86
24 | #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
25 | #elif defined _M_IA64
26 | #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
27 | #elif defined _M_X64
28 | #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
29 | #else
30 | #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
31 | #endif
32 |
--------------------------------------------------------------------------------