Skip to content

Mica support on Win32 platform #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/SlimApp/platforms/win32.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>

#ifdef SA_Win11
#include <dwmapi.h>
#endif // optional Windows 11 Mica - Make sure to link to dwmapi.lib!
#ifndef NDEBUG
#include <tchar.h>
#include <stdio.h>
Expand Down Expand Up @@ -276,6 +278,12 @@ int APIENTRY WinMain(HINSTANCE hInstance,
hInstance,
null
);
#ifdef SA_Win11
int wDm = 1;
int wBgType = 2;
DwmSetWindowAttribute(window,20,&wDm,4);
DwmSetWindowAttribute(window,38,&wBgType,4);
#endif // optional Windows 11 Mica - Make sure to link to dwmapi.lib!
if (!window)
return -1;

Expand Down Expand Up @@ -303,4 +311,4 @@ int APIENTRY WinMain(HINSTANCE hInstance,
}

return 0;
}
}