因为Windows 10在左侧,右侧和底部都有细小的看不见的边框,它用于握住鼠标以调整大小。

边框可能看起来像这样:(7,0,7,7 左,上,右,下)

第一种方法,使用GetWindowRect()

GetWindowRect(hwnd, &rect);
rect.left += 7;
rect.top -= 0;
rect.right -= 7;
rect.bottom -= 7;

第二种方法,使用DwmGetWindowAttribute()

DwmGetWindowAttribute(hWnd, DWMWA_EXTENDED_FRAME_BOUNDS, (PVOID)&rect, sizeof(rect));

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-12
  • 2022-12-23
  • 2021-11-27
  • 2021-11-27
  • 2021-09-07
猜你喜欢
  • 2021-08-18
  • 2021-11-27
  • 2021-06-07
  • 2022-01-16
  • 2022-12-23
  • 2021-05-27
相关资源
相似解决方案