Home > Mobile >  Cannot resolve the external symbol of __imp__ScreenToClient
Cannot resolve the external symbol of __imp__ScreenToClient

Time:03-17

Mainwindow. Obj: 1: error: LNK2019: cannot resolve the external symbol of __imp__ScreenToClient @ 8, the symbol in the function of "public: __thiscall mainwindow: : mainwindow (class QWidget *)" (?????? 0 mainwindow @ @ QAE @ PAVQWidget @ @ @ Z) referenced

#include
#include
 
QRect the rect.
HWND HWND=(HWND) this - & gt; WinId ();
The rect=frameGeometry ();
QDebug () & lt; TagPOINT point {the rect. (x), the rect. Y ()};
ScreenToClient (HWND, & amp; Point);
QDebug () & lt; <& Point;

Tip when using ScreenToClient function cannot resolve, but windouw. H already include, why would that be, is what don't you have reference library

CodePudding user response:

Lack of libraries, outside the class to add # pragma comment (lib, "User32. Lib") or in pro file link User32. Lib library
  •  Tags:  
  • Qt
  • Related