3 * Native Windows file dialog routines
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 2006 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
12 #ifndef __FILE_DLG_WIN32_H__
13 #define __FILE_DLG_WIN32_H__
17 #endif /* __cplusplus */
20 * @brief set_thread_per_monitor_v2_awareness
22 * Qt <= 5.9 supports setting old (Windows 8.1) per-monitor DPI awareness
23 * via Qt:AA_EnableHighDpiScaling. We do this in main.cpp. In order for
24 * native dialogs to be rendered correctly we need to set per-monitor
25 * *v2* awareness prior to creating the dialog, which we can do here.
26 * Qt < 5.14(?) or so doesn't render correctly when per-monitor v2 awareness
27 * is enabled, so we need to revert our thread context when we're done.
28 * Qt >= 6.0 is per-monitor DPI awareness v2 by default, so this doesn't
31 * @return The current thread DPI awareness context, which should
32 * be passed to revert_thread_per_monitor_v2_awareness.
34 HANDLE
set_thread_per_monitor_v2_awareness(void);
37 * @brief revert_thread_per_monitor_v2_awareness
40 void revert_thread_per_monitor_v2_awareness(HANDLE context
);
44 #endif /* __cplusplus */
46 #endif /* __FILE_DLG_WIN32_H__ */