Размер видео: 1280 X 720853 X 480640 X 360
Показать панель управления
Автовоспроизведение
Автоповтор
Perfect 👏🏻
Great! can you do the same for Flutter Web?
I think it will be
1-#include #include #include #include #include "flutter_window.h"#include "utils.h"źź2-enum ACCENT_STATE { ACCENT_ENABLE_BLURBEHIND = 3,};struct ACCENT_POLICY { ACCENT_STATE AccentState; DWORD AccentFlags; DWORD GradientColor; DWORD AnimationId;};struct WINDOWCOMPOSITIONATTRIBDATA { int Attrib; PVOID pvData; SIZE_T cbData;};typedef BOOL(WINAPI *pfnSetWindowCompositionAttribute)(HWND, WINDOWCOMPOSITIONATTRIBDATA *);void EnableBlur(HWND hwnd) { HMODULE hUser = GetModuleHandle(L"user32.dll"); if (hUser) { pfnSetWindowCompositionAttribute SetWindowCompositionAttribute = (pfnSetWindowCompositionAttribute)GetProcAddress(hUser, "SetWindowCompositionAttribute"); if (SetWindowCompositionAttribute) { ACCENT_POLICY accent = {ACCENT_ENABLE_BLURBEHIND, 0, 0, 0}; WINDOWCOMPOSITIONATTRIBDATA data = {19, &accent, sizeof(accent)}; SetWindowCompositionAttribute(hwnd, &data); } }}3-HWND hwnd = window.GetHandle(); EnableBlur(hwnd);
Perfect 👏🏻
Great! can you do the same for Flutter Web?
I think it will be
1-
#include
#include
#include
#include
#include "flutter_window.h"
#include "utils.h"
źź
2-
enum ACCENT_STATE {
ACCENT_ENABLE_BLURBEHIND = 3,
};
struct ACCENT_POLICY {
ACCENT_STATE AccentState;
DWORD AccentFlags;
DWORD GradientColor;
DWORD AnimationId;
};
struct WINDOWCOMPOSITIONATTRIBDATA {
int Attrib;
PVOID pvData;
SIZE_T cbData;
};
typedef BOOL(WINAPI *pfnSetWindowCompositionAttribute)(HWND, WINDOWCOMPOSITIONATTRIBDATA *);
void EnableBlur(HWND hwnd) {
HMODULE hUser = GetModuleHandle(L"user32.dll");
if (hUser) {
pfnSetWindowCompositionAttribute SetWindowCompositionAttribute =
(pfnSetWindowCompositionAttribute)GetProcAddress(hUser, "SetWindowCompositionAttribute");
if (SetWindowCompositionAttribute) {
ACCENT_POLICY accent = {ACCENT_ENABLE_BLURBEHIND, 0, 0, 0};
WINDOWCOMPOSITIONATTRIBDATA data = {19, &accent, sizeof(accent)};
SetWindowCompositionAttribute(hwnd, &data);
}
}
}
3-
HWND hwnd = window.GetHandle();
EnableBlur(hwnd);