hi Expert,
I have two monitors, both are high definition monitor. And I set dpi aware manually to PROCESS_PER_MONITOR_DPI_AWARE, then the right click context menu position is far away from the browser if the browser is on the second monitor.
I know that CefEnableHighDPISupport() only set PROCESS_SYSTEM_DPI_AWARE from the cef source code, the context menu shows at right position no matter where's the browser.
CefClient does not work either.
Here is my code:
typedef HRESULT(__stdcall *SetProcessDPIAwareFunc)(PROCESS_DPI_AWARENESS);
HMODULE hUser32 = LoadLibrary(L"Shcore.dll");
if (hUser32)
{
SetProcessDPIAwareFunc setDPIAware = (SetProcessDPIAwareFunc)GetProcAddress(hUser32, "SetProcessDpiAwareness");
if (setDPIAware)
{
setDPIAware(PROCESS_PER_MONITOR_DPI_AWARE);
}
FreeLibrary(hUser32);
}
Thanks