Skip to content

Commit

Permalink
Merge pull request #2 from KondeU/dev
Browse files Browse the repository at this point in the history
AutoDiskCopier v3.1(fixed) 合入
  • Loading branch information
KondeU committed Aug 21, 2021
2 parents 21dcc9a + 81e73d5 commit 73fcb2e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion AutoDiskCopier_v3/src/AutoDiskCopier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
RegisterHotKey(hwnd, 0, MOD_CONTROL | MOD_ALT | MOD_SHIFT, 'U');

//托盘图标
adc.m_ni.SetTip(TEXT("AutoDiskCopier v3.0"));
adc.m_ni.SetTip(TEXT("AutoDiskCopier v3.1"));
adc.m_ni.SetIcon(((CREATESTRUCT*)lParam)->hInstance, MAKEINTRESOURCE(IDI_ICON));

if (adc.m_bEnableNotifyIcon)
Expand Down
12 changes: 8 additions & 4 deletions AutoDiskCopier_v3/src/AutoDiskCopier.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#include<imagehlp.h>
#pragma comment(lib, "imagehlp.lib")

#include <thread>

#include"resource.h"

#include"CmnDlg.h"
Expand Down Expand Up @@ -130,8 +132,12 @@ class CAutoDiskCopier
}
}

/*_beginthread(&(CAutoDiskCopier::CopyingThread), 0, (void *)szCopyDiskPath);*/
CopyingThread(szCopyDiskPath); //
std::thread copier = std::thread([this](PCTSTR szInputCopyDiskPath) {
TCHAR szCopyDiskPath[MAX_PATH] = { 0 };
wsprintf(szCopyDiskPath, TEXT("%s"), szInputCopyDiskPath);
CopyingThread(szCopyDiskPath);
}, szCopyDiskPath);
copier.detach();
}

void SetDlgInfo(HWND hwnd)
Expand Down Expand Up @@ -261,8 +267,6 @@ class CAutoDiskCopier

//复制文件
Copy(szSavePath, szCopyDiskPath);

/*_endthread();*/
}

int CheckIsKeyFileSame(PCTSTR szCopyDiskPath, PCTSTR szKeyFilePath)
Expand Down
Binary file modified AutoDiskCopier_v3/src/AutoDiskCopier.rc
Binary file not shown.

0 comments on commit 73fcb2e

Please sign in to comment.