为什么在afxwin.h文件中我找不到ScreenToClient函数的HWND类型参数的重载形式?

huangapple go评论72阅读模式
英文:

Why didn't I find an overloaded form with HWND type parameters for the ScreenToClient function in the afxwin. h file?

问题

为什么在afxwin.h文件中我找不到ScreenToClient函数的HWND类型参数的重载形式?在afxwin.h文件中,只有两个与ScreenToClient相关的重载,一个是LPPOINT类型,另一个是LPRECT类型?我应该如何指定父控件?

英文:

Why didn't I find an overloaded form with HWND type parameters for the ScreenToClient function in the afxwin. h file? In the afxwin. h file, there are only two overloads related to ScreenToClient, one of which is of type LPPOINT and the other is of type LPRECT? How should I specify the parent control?

为什么在afxwin.h文件中我找不到ScreenToClient函数的HWND类型参数的重载形式?

答案1

得分: 0

你正在查看的重载方法是CWnd类的非静态成员。因此,您调用这些方法的CWnd派生对象所属的HWND是所使用的父控件。

听起来您可能更希望查找位于winuser.h而不是afxwin.h中的独立Win32 API函数。

英文:

The overloaded methods you are looking at are non-static members of the CWnd class. So, the HWND that belongs to whatever CWnd-drived object you call the methods on is the parent control that gets used.

It sounds like you are instead looking for the standalone Win32 API functions that are in winuser.h not afxwin.h.

huangapple
  • 本文由 发表于 2023年6月6日 11:34:22
  • 转载请务必保留本文链接:https://go.coder-hub.com/76411290.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定