error: 'WM_DPICHANGED' undeclared (first use in this function); did you mean 'WM_USERCHANGED'?|

How to solve the following two kinds of errors? thank!
The software version I use:

It looks like your post got cut off. Are you using CodeBlocks or Visual Studio?

This error usually indicates that your Windows SDK version is too old or its compatibility mode is set too low. As far as I know WM_DPICHANGED was added in Windows 8.

maybe you use mingw32_x64 to build lvgl, you should add -D_WIN32_WINNT=0x0601 option to define _WIN32_WINNT equal to 0x0601

mingw set _WIN32_WINNT=0x0501 by default(WINVER=_WIN32_WINNT), if WINVER lower than 0x0601, WM_DPICHANGED do not define.