aboutsummaryrefslogtreecommitdiff
path: root/c/common.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-19 14:12:20 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-19 14:12:20 +0200
commitaac409bdd73fd96d256f87285a7c9b959d2117b3 (patch)
treea8f32498741c6588beddc1ef6700e20b9339ab57 /c/common.cpp
parent61f7d770dbeb5df98b94d9e8cef0c4c86e396447 (diff)
downloadEpisodeBrowser-aac409bdd73fd96d256f87285a7c9b959d2117b3.tar.gz
Remove EBMessageBoxA.
Diffstat (limited to 'c/common.cpp')
-rw-r--r--c/common.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/c/common.cpp b/c/common.cpp
index 2259b69..494c382 100644
--- a/c/common.cpp
+++ b/c/common.cpp
@@ -86,19 +86,8 @@ int EBMessageBox(const TCHAR* const tszText, const TCHAR* const tszCaption, cons
extern HWND g_hWnd;
HHOOK hHook = SetWindowsHookEx(WH_CBT, CBTProc, 0, GetCurrentThreadId());
if (!hHook) return 0;
- MessageBox(g_hWnd, tszText, tszCaption, uType);
+ int r = MessageBox(g_hWnd, tszText, tszCaption, uType);
UnhookWindowsHookEx(hHook);
if (!hHook) throw Win32Error(GetLastError());
- return 0;
-}
-
-int EBMessageBoxA(const char* const szText, const char* const szCaption, const unsigned uType)
-{
- extern HWND g_hWnd;
- HHOOK hHook = SetWindowsHookEx(WH_CBT, CBTProc, 0, GetCurrentThreadId());
- if (!hHook) return 0;
- MessageBoxA(g_hWnd, szText, szCaption, uType);
- UnhookWindowsHookEx(hHook);
- if (!hHook) throw Win32Error(GetLastError());
- return 0;
+ return r;
}