0

I use Visual Studio 2015 and information from

https://learn.microsoft.com/nl-nl/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows

The compiler don't recognize GetSystemMetricsForDpi()

#include "winuser.h"
[...]
void CSizingControlBar::LoadState(LPCTSTR lpszProfileName)
{
[...]
          pInfo->m_pointPos.y +=  ::GetSystemMetricsForDpi(SM_CYSMCAPTION) + 1;
[...]
}

Errors:

Error C3861 'GetSystemMetricsForDpi': identifier not found

Error C2039 'GetSystemMetricsForDpi': is not a member of '`global namespace''

Can anyone help me to solve this?

  • from https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getsystemmetricsfordpi , Minimum supported client: Windows 10, version 1607 [desktop apps only]. Is it your case? And by the way, 2 parameters are expected... – prog-fh Apr 16 '20 at 12:10
  • Yes, I was at that link. I have Wondows 10, version 1709 – C.W. Braaksma Apr 16 '20 at 12:36
  • do you [target at least Windows 10 SDK](https://learn.microsoft.com/en-us/cpp/windows/how-to-use-the-windows-10-sdk-in-a-windows-desktop-application?view=vs-2015) Build 14393? – magicandre1981 Apr 17 '20 at 13:39
  • Sorry, for the late answer. I have Windows SDK - Windows 10.0.17763.132 – C.W. Braaksma Apr 28 '20 at 09:16

0 Answers0