diff options
Diffstat (limited to 'c/win32.cpp')
-rw-r--r-- | c/win32.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/c/win32.cpp b/c/win32.cpp index e1053a3..83488d4 100644 --- a/c/win32.cpp +++ b/c/win32.cpp @@ -17,7 +17,7 @@ std::wstring WideFromNarrow(const std::string_view src, const int cp) int cchWide = MultiByteToWideChar(cp, 0, src.data(), cchNarrow, nullptr, 0); std::wstring dst(cchWide, 0); if (!MultiByteToWideChar(cp, 0, src.data(), cchNarrow, dst.data(), cchWide)) - throw Err(WINDOWS, L"Narrow string could not be converted to wide string: %s."); + throw Err(WINDOWS, L"Narrow string could not be converted to wide string"); return dst; } @@ -37,7 +37,7 @@ void WithNextWindow(void (*proc)(HWND)) { if (nCode == HCBT_CREATEWND) { if (!UnhookWindowsHookEx(hHook)) - throw Err(WINDOWS, L"Window hook could not be removed: %s."); + throw Err(WINDOWS, L"Window hook could not be removed"); procNext(reinterpret_cast<HWND>(wParam)); return 0; } else @@ -46,7 +46,7 @@ void WithNextWindow(void (*proc)(HWND)) procNext = proc; if (!(hHook = SetWindowsHookExW(WH_CBT, procCBT, nullptr, GetCurrentThreadId()))) - throw Err(WINDOWS, L"Window hook could not be set: %s."); + throw Err(WINDOWS, L"Window hook could not be set"); } /* Display next created window in the center of given window. */ @@ -72,7 +72,7 @@ static void CenterNextWindow(HWND hWnd) } else if (nCode == HCBT_ACTIVATE && reinterpret_cast<HWND>(wParam) == hWndNext) { if (!UnhookWindowsHookEx(hHook)) - throw Err(WINDOWS, L"Window hook could not be removed: %s."); + throw Err(WINDOWS, L"Window hook could not be removed"); long lStyle = GetWindowLongW(hWndNext, GWL_STYLE); if (!(lStyle & WS_POPUP)) return 0; @@ -94,7 +94,7 @@ static void CenterNextWindow(HWND hWnd) hWndParent = hWnd; hWndNext = nullptr; if (!(hHook = SetWindowsHookExW(WH_CBT, procCBT, nullptr, GetCurrentThreadId()))) - throw Err(WINDOWS, L"Window hook could not be set: %s."); + throw Err(WINDOWS, L"Window hook could not be set"); } int EBMessageBox(const std::wstring_view text, const std::wstring_view caption, const UINT uType) @@ -133,7 +133,7 @@ Library::Library(const wchar_t* const lib) { m_hModule = LoadLibraryW(lib); if (!m_hModule) - throw Err(WINDOWS, L"Library "s + lib + L" could not be loaded: %s."); + throw Err(WINDOWS, L"Library "s + lib + L" could not be loaded"); } Library::~Library() |