投射到 LPPOINT

问题描述 投票:0回答:1

在以下场景中是否需要将

POINT
参数转换为
LPPOINT

POINT point;
ClientToScreen(somehwnd, (LPPOINT) &point);

或者以下内容就足够了:

POINT point;
ClientToScreen(somehwnd, &point);

此 Win32 文档 使用强制转换,而 此 Win32 文档 不使用强制转换。

c++ winapi
1个回答
2
投票

LPPOINT
POINT*
的类型别名。表达式
&point
的类型为
POINT*
。不需要演员。

© www.soinside.com 2019 - 2024. All rights reserved.