aboutsummaryrefslogtreecommitdiff
path: root/c/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c/main.cpp')
-rw-r--r--c/main.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/c/main.cpp b/c/main.cpp
index d76225e..32187c8 100644
--- a/c/main.cpp
+++ b/c/main.cpp
@@ -1,4 +1,5 @@
#include <exception>
+#include <stdexcept>
#include <windows.h>
#include <commctrl.h>
#include <uxtheme.h>
@@ -165,16 +166,16 @@ static LRESULT CALLBACK CBTProc(const int nCode, const WPARAM wParam, const LPAR
g_hWnd = (HWND)wParam;
/* Look up constants. */
- if (auto lib = maybe_make<Library>(L"User32.dll");
+ if (auto lib = Library::Maybe(L"User32.dll");
auto GetDpiForWindow = lib->GetProcAddress<UINT(HWND)>("GetDpiForWindow"))
g_dpi = GetDpiForWindow(g_hWnd);
- if (auto lib = maybe_make<Library>(L"uxtheme.dll");
+ if (auto lib = Library::Maybe(L"uxtheme.dll");
lib->GetProcAddress<void>("SetWindowTheme"))
g_bThemes = 1;
- if (auto lib = maybe_make<Library>(L"User32.dll");
- lib->GetProcAddress<void>("SystemParametersInfo" WA)) {
+ if (auto lib = Library::Maybe(L"User32.dll");
+ lib->GetProcAddress<void>("SystemParametersInfoW")) {
NONCLIENTMETRICS m;
m.cbSize = sizeof(NONCLIENTMETRICS);
require(SystemParametersInfo(SPI_GETNONCLIENTMETRICS,