From 805cc4cec440525629758af918d50a850209ec0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Tue, 9 Aug 2022 21:49:18 +0200 Subject: Add WithNextWindow function. I'm not sure if this clarifies or complicates the control flow. My hope is the former. --- c/win.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'c/win.h') diff --git a/c/win.h b/c/win.h index ff38ce0..30d3cc5 100644 --- a/c/win.h +++ b/c/win.h @@ -4,10 +4,12 @@ #include #include +/* Run given procedure at creation of next window. */ +void WithNextWindow(void (*proc)(HWND)); /* Display message box centered in main window. */ int EBMessageBox(const wchar_t* wszText, const wchar_t* wszCaption, UINT uType); /* Retrieve mouse position relative to given window's client area. */ -int GetRelativeCursorPos(HWND hWnd, POINT* pt); +int GetRelativeCursorPos(HWND hWnd, POINT* pt) noexcept; /* Cached values from GetSystemMetrics. */ template auto Metric = GetSystemMetrics(I); -- cgit v1.2.3