diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:10:11 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:10:11 +0200 |
commit | c0cdb2ad99a1e2a6ade5ce76c91177a79258e669 (patch) | |
tree | 4701a015385d9a6a5a4ba99a8f1f5d400fff26b1 /shared/Taskbar_Seven | |
parent | 3.13 (diff) | |
download | FreeFileSync-c0cdb2ad99a1e2a6ade5ce76c91177a79258e669.tar.gz FreeFileSync-c0cdb2ad99a1e2a6ade5ce76c91177a79258e669.tar.bz2 FreeFileSync-c0cdb2ad99a1e2a6ade5ce76c91177a79258e669.zip |
3.14
Diffstat (limited to 'shared/Taskbar_Seven')
-rw-r--r-- | shared/Taskbar_Seven/dll_main.cpp | 10 | ||||
-rw-r--r-- | shared/Taskbar_Seven/taskbar.cpp | 38 | ||||
-rw-r--r-- | shared/Taskbar_Seven/taskbar.h | 14 |
3 files changed, 35 insertions, 27 deletions
diff --git a/shared/Taskbar_Seven/dll_main.cpp b/shared/Taskbar_Seven/dll_main.cpp index d23e5c48..ab387012 100644 --- a/shared/Taskbar_Seven/dll_main.cpp +++ b/shared/Taskbar_Seven/dll_main.cpp @@ -15,11 +15,11 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, { switch (fdwReason) { - case DLL_PROCESS_ATTACH: - case DLL_PROCESS_DETACH: - case DLL_THREAD_ATTACH: - case DLL_THREAD_DETACH: - break; + case DLL_PROCESS_ATTACH: + case DLL_PROCESS_DETACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + break; } return TRUE; } diff --git a/shared/Taskbar_Seven/taskbar.cpp b/shared/Taskbar_Seven/taskbar.cpp index c853eb5d..297a0739 100644 --- a/shared/Taskbar_Seven/taskbar.cpp +++ b/shared/Taskbar_Seven/taskbar.cpp @@ -46,26 +46,26 @@ ComPtr<ITaskbarList3> getInstance() bool tbseven::setStatus(void* hwnd, //HWND: window assciated to the taskbar icon - TaskBarStatus status) + TaskBarStatus status) { TBPFLAG flag = TBPF_NORMAL; switch (status) { - case STATUS_NOPROGRESS: - flag = TBPF_NOPROGRESS; - break; - case STATUS_INDETERMINATE: - flag = TBPF_INDETERMINATE; - break; - case STATUS_NORMAL: - flag = TBPF_NORMAL; - break; - case STATUS_ERROR: - flag = TBPF_ERROR; - break; - case STATUS_PAUSED: - flag = TBPF_PAUSED; - break; + case STATUS_NOPROGRESS: + flag = TBPF_NOPROGRESS; + break; + case STATUS_INDETERMINATE: + flag = TBPF_INDETERMINATE; + break; + case STATUS_NORMAL: + flag = TBPF_NORMAL; + break; + case STATUS_ERROR: + flag = TBPF_ERROR; + break; + case STATUS_PAUSED: + flag = TBPF_PAUSED; + break; } ComPtr<ITaskbarList3> taskbarlist = getInstance(); @@ -73,7 +73,7 @@ bool tbseven::setStatus(void* hwnd, //HWND: window assciated to the taskbar icon return false; HRESULT hr = taskbarlist->SetProgressState(static_cast<HWND>(hwnd), //[in] HWND hwnd, - flag); //[in] TBPFLAG tbpFlags + flag); //[in] TBPFLAG tbpFlags if (FAILED(hr)) { lastErrorMessage = generateErrorMsg(L"Error calling \"SetProgressState\".", hr); @@ -85,8 +85,8 @@ bool tbseven::setStatus(void* hwnd, //HWND: window assciated to the taskbar icon bool tbseven::setProgress(void* hwnd, //HWND: window assciated to the taskbar icon - size_t current, - size_t total) + size_t current, + size_t total) { ComPtr<ITaskbarList3> taskbarlist = getInstance(); if (!taskbarlist) //error msg already set diff --git a/shared/Taskbar_Seven/taskbar.h b/shared/Taskbar_Seven/taskbar.h index 295cdbcd..7b6efbb5 100644 --- a/shared/Taskbar_Seven/taskbar.h +++ b/shared/Taskbar_Seven/taskbar.h @@ -16,6 +16,10 @@ namespace tbseven { +/*-------------- + |declarations| + --------------*/ + enum TaskBarStatus { STATUS_NOPROGRESS, @@ -42,13 +46,17 @@ bool setProgress(void* hwnd, //HWND: window assciated to the taskbar icon DLL_FUNCTION_DECLARATION void getLastError(wchar_t* errorMessage, size_t errorBufferLen); - -//function typedefs +/*---------- + |typedefs| + ----------*/ typedef bool (*SetStatusFct)(void* hwnd, TaskBarStatus status); typedef bool (*SetProgressFct)(void* hwnd, size_t current, size_t total); typedef void (*GetLastErrorFct)(wchar_t* errorMessage, size_t errorBufferLen); -//function names (use const pointers to ensure internal linkage) +/*-------------- + |symbol names| + --------------*/ +//(use const pointers to ensure internal linkage) const char* const setStatusFctName = "setStatus"; const char* const setProgressFctName = "setProgress"; const char* const getLastErrorFctName = "getLastError"; |