mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-27 15:44:12 +08:00
.
This commit is contained in:
parent
163d3321ff
commit
6c9e4e1243
@ -19,7 +19,7 @@ target_link_libraries(winsharedutils tinymp3 rapidfuzz wil webview2 Mfplat mfuui
|
||||
target_link_options(winsharedutils PRIVATE "/DELAYLOAD:Mmdevapi.dll")
|
||||
target_link_options(winsharedutils PRIVATE "/DELAYLOAD:Mfplat.dll")
|
||||
else()
|
||||
target_link_libraries(winsharedutils tinymp3 wil)
|
||||
target_link_libraries(winsharedutils tinymp3)
|
||||
endif()
|
||||
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
|
||||
set_target_properties(winsharedutils PROPERTIES OUTPUT_NAME "winsharedutils64")
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
#ifndef WINXP
|
||||
#include <wil/com.h>
|
||||
#include <uiautomation.h>
|
||||
#endif
|
||||
DECLARE_API void showintab(HWND hwnd, bool show, bool tool)
|
||||
{
|
||||
// WS_EX_TOOLWINDOW可以立即生效,WS_EX_APPWINDOW必须切换焦点才生效。但是WS_EX_TOOLWINDOW会改变窗口样式,因此只对无边框窗口使用。
|
||||
@ -160,6 +161,7 @@ DECLARE_API bool check_window_viewable(HWND hwnd)
|
||||
|
||||
DECLARE_API void GetSelectedText(void (*cb)(const wchar_t *))
|
||||
{
|
||||
#ifndef WINXP
|
||||
CoInitialize(nullptr);
|
||||
try
|
||||
{
|
||||
@ -213,4 +215,5 @@ DECLARE_API void GetSelectedText(void (*cb)(const wchar_t *))
|
||||
printf(e.what());
|
||||
}
|
||||
CoUninitialize();
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user