Address cpplint issue "Using C-style cast. Use reinterpret_cast<BYTE*>(...) instead [readability/casting] [4]"
This commit is contained in:
parent
91cff2e6c7
commit
9b7fbd4d22
4 changed files with 41 additions and 26 deletions
|
@ -31,9 +31,11 @@ struct ScreenMetrics {
|
|||
|
||||
ScreenMetrics() {
|
||||
typedef HRESULT WINAPI GetDpiForMonitor_t(HMONITOR, int, UINT*, UINT*);
|
||||
auto GetDpiForMonitor =
|
||||
(GetDpiForMonitor_t*)GetProcAddress(GetModuleHandle(TEXT("shcore")),
|
||||
"GetDpiForMonitor");
|
||||
|
||||
auto GetDpiForMonitor = reinterpret_cast<GetDpiForMonitor_t*>(
|
||||
GetProcAddress(GetModuleHandle(TEXT("shcore")),
|
||||
"GetDpiForMonitor"));
|
||||
|
||||
if (GetDpiForMonitor) {
|
||||
auto monitor = MonitorFromPoint({}, MONITOR_DEFAULTTOPRIMARY);
|
||||
if (GetDpiForMonitor(monitor, 0, &dpi_x, &dpi_y) == S_OK)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue