aboutsummaryrefslogtreecommitdiff
path: root/c/win.h
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-22 22:22:29 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-22 22:22:29 +0200
commit5d0979480ff50390b3883795ec2093e0d3d6193b (patch)
tree34a5fc5d18cb2d9cc87c01e6eb2eb40e0f3d5050 /c/win.h
parent8566655b85f0a4e515d57f6686636db516116f95 (diff)
downloadEpisodeBrowser-5d0979480ff50390b3883795ec2093e0d3d6193b.tar.gz
Open episodes without Prolog.
Diffstat (limited to 'c/win.h')
-rw-r--r--c/win.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/c/win.h b/c/win.h
index 26a21b2..62cb2ac 100644
--- a/c/win.h
+++ b/c/win.h
@@ -7,12 +7,19 @@
/* Run given procedure at creation of next window. */
void WithNextWindow(void (*proc)(HWND));
+
/* Display message box centered in main window. */
int EBMessageBox(std::wstring_view text, std::wstring_view data, UINT uType);
+
/* Show message box for current exception. */
-void ShowException(const wchar_t* fmt, const wchar_t* title, UINT uType = MB_ICONWARNING) noexcept;
+void ShowException(
+ const wchar_t* fmt = L"An error occurred: %s",
+ const wchar_t* title = L"Error",
+ UINT uType = MB_ICONWARNING) noexcept;
+
/* Retrieve mouse position relative to given window's client area. */
int GetRelativeCursorPos(HWND hWnd, POINT* pt) noexcept;
+
/* Cached values from GetSystemMetrics. */
template <int I> auto Metric = GetSystemMetrics(I);