mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-26 07:04:12 +08:00
dwm
This commit is contained in:
parent
6f51724dba
commit
53b87c3cbe
@ -74,7 +74,6 @@
|
||||
|
||||
#pragma comment(lib, "shlwapi.lib")
|
||||
#pragma comment(lib, "winmm.lib")
|
||||
#pragma comment(lib, "dwmapi.lib")
|
||||
#pragma comment(lib, "Psapi.lib")
|
||||
#pragma comment(lib, "Version.lib")
|
||||
|
||||
|
@ -12,7 +12,7 @@ generate_product_version(
|
||||
|
||||
add_library(winrtutils MODULE winrtsnapshot.cpp winrtocr.cpp livecaptions.cpp ${versioninfo})
|
||||
target_precompile_headers(winrtutils REUSE_FROM pch)
|
||||
target_link_libraries(winrtutils wil)
|
||||
target_link_libraries(winrtutils wil dwmapi)
|
||||
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
|
||||
set_target_properties(winrtutils PROPERTIES OUTPUT_NAME "winrtutils64")
|
||||
else()
|
||||
|
@ -86,6 +86,7 @@ typedef BOOL(WINAPI *pfnSetWindowCompositionAttribute)(HWND, WINDOWCOMPOSITIONAT
|
||||
|
||||
DECLARE_API bool setAcrylicEffect(HWND hwnd, bool isEnableShadow)
|
||||
{
|
||||
#ifndef WINXP
|
||||
// win7全都用areo
|
||||
DWM_BLURBEHIND bb = {0};
|
||||
bb.dwFlags = DWM_BB_ENABLE;
|
||||
@ -101,9 +102,13 @@ DECLARE_API bool setAcrylicEffect(HWND hwnd, bool isEnableShadow)
|
||||
auto accentFlags = isEnableShadow ? (DWORD(0x20 | 0x40 | 0x80 | 0x100)) : 0;
|
||||
accentPolicy.AccentFlags = accentFlags;
|
||||
return setWindowCompositionAttribute(hwnd, &winCompAttrData);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
DECLARE_API bool setAeroEffect(HWND hwnd, bool isEnableShadow)
|
||||
{
|
||||
#ifndef WINXP
|
||||
DWM_BLURBEHIND bb = {0};
|
||||
bb.dwFlags = DWM_BB_ENABLE;
|
||||
bb.fEnable = true;
|
||||
@ -116,9 +121,13 @@ DECLARE_API bool setAeroEffect(HWND hwnd, bool isEnableShadow)
|
||||
auto accentFlags = isEnableShadow ? (DWORD(0x20 | 0x40 | 0x80 | 0x100)) : 0;
|
||||
accentPolicy.AccentFlags = accentFlags;
|
||||
return setWindowCompositionAttribute(hwnd, &winCompAttrData);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
DECLARE_API bool clearEffect(HWND hwnd)
|
||||
{
|
||||
#ifndef WINXP
|
||||
DWM_BLURBEHIND bb = {0};
|
||||
bb.dwFlags = DWM_BB_ENABLE;
|
||||
bb.fEnable = false;
|
||||
@ -128,4 +137,7 @@ DECLARE_API bool clearEffect(HWND hwnd)
|
||||
common
|
||||
accentPolicy.AccentState = ACCENT_DISABLED;
|
||||
return setWindowCompositionAttribute(hwnd, &winCompAttrData);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
@ -15,7 +15,7 @@ applicationloopbackaudio/runer.cpp applicationloopbackaudio/LoopbackCapture.cpp
|
||||
SimpleBrowser.cpp MWebBrowser.cpp icon.cpp ${versioninfo})
|
||||
target_precompile_headers(winsharedutils REUSE_FROM pch)
|
||||
if(NOT WINXP)
|
||||
target_link_libraries(winsharedutils tinymp3 rapidfuzz wil webview2 Mfplat mfuuid Mmdevapi)
|
||||
target_link_libraries(winsharedutils tinymp3 rapidfuzz wil webview2 Mfplat mfuuid Mmdevapi dwmapi)
|
||||
target_link_options(winsharedutils PRIVATE "/DELAYLOAD:Mmdevapi.dll")
|
||||
target_link_options(winsharedutils PRIVATE "/DELAYLOAD:Mfplat.dll")
|
||||
else()
|
||||
|
Loading…
x
Reference in New Issue
Block a user