aboutsummaryrefslogtreecommitdiff
path: root/c/win.h
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-24 03:01:10 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-24 03:01:10 +0200
commitccb7d14a8b1ad6d80308c14a3f0b209d66c3c88d (patch)
treedb79708df0f22a9cb721bbadb644bbcb5f6e975b /c/win.h
parent9c237e1537238ebe95289ed6df82f6d43c482944 (diff)
downloadEpisodeBrowser-ccb7d14a8b1ad6d80308c14a3f0b209d66c3c88d.tar.gz
Add FetchScreenwriters. Improve thread communication.
Diffstat (limited to 'c/win.h')
-rw-r--r--c/win.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/c/win.h b/c/win.h
index 62cb2ac..834aaec 100644
--- a/c/win.h
+++ b/c/win.h
@@ -4,6 +4,7 @@
#include <optional>
#include <string_view>
#include <windows.h>
+#include <commctrl.h>
/* Run given procedure at creation of next window. */
void WithNextWindow(void (*proc)(HWND));
@@ -125,9 +126,8 @@ inline BOOL SetWindowRect(const HWND hWnd, const RECT r)
return SetWindowRect(hWnd, r.left, r.top, r.right, r.bottom);
}
-/* The following functions call uxtheme.dll functions, if uxtheme.dll
- * exists, and otherwise do nothing. */
-
+/* The following two functions call uxtheme.dll functions, if
+ * uxtheme.dll exists, and otherwise do nothing. */
inline BOOL EBIsThemeActive()
{
extern BOOL (*IsThemeActive)();
@@ -141,4 +141,10 @@ inline BOOL EBSetWindowTheme(const HWND hWnd, const wchar_t* const pszSubAppName
return SetWindowTheme? SetWindowTheme(hWnd, pszSubAppName, pszSubIdList): 0;
}
+inline void Status(const wchar_t* msg, unsigned short i = 0)
+{
+ extern HWND g_hWndStatus;
+ SendMessage(g_hWndStatus, SB_SETTEXT, MAKEWPARAM(i,0), reinterpret_cast<LPARAM>(msg));
+}
+
#endif