对于这种边框样式,我使用 GetWindowRect:
我总是想获得全窗口的坐标。感谢您的帮助
最佳答案
这有效:
uses
Winapi.DwmApi;
procedure TForm1.Button1Click(Sender: TObject);
var
R: TRect;
begin
if (Win32MajorVersion >= 6) and DwmCompositionEnabled then
DwmGetWindowAttribute(Handle, DWMWA_EXTENDED_FRAME_BOUNDS, @R, SizeOf(R))
else
Windows.GetWindowRect(Handle, R);
ShowMessage(IntToStr(R.Right - R.Left))
end;
关于delphi - GetWindowRect 检测 bsSingle BoarderStyle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25219882/