指针的用法

来源:互联网 发布:私人飞机知乎 编辑:程序博客网 时间:2024/06/05 22:58
DWORD dwStyle;
RECT  rect;


SetRectEmpty(lprc);
dwStyle = GetWindowLongPtr(psb->hwnd, GWL_STYLE);
if( (dwStyle & WS_HSCROLL) && (dwStyle & WS_VSCROLL) ) {
GetClientRect(psb->hwnd, &rect);
ClientToScreen(psb->hwnd, (LPPOINT)&rect);

ClientToScreen(psb->hwnd, ((LPPOINT)&rect)+1);


最后这两个 客户端 坐标转化为 屏幕坐标 

和 ClientToScreen(psb->hwnd, &rect);是一样的 。

((LPPOINT)&rect)+1 是(right,bottom),也就是右下角点转换的。

原创粉丝点击