I’m using the GetTitleBarInfo function in this way
procedure TForm1.Button1Click(Sender: TObject);
var
TitleInfo : TTitleBarInfo;
begin
ZeroMemory(@TitleInfo, SizeOf(TitleInfo));
GetTitleBarInfo(Handle, TitleInfo);
ShowMessage(IntToStr(TitleInfo.rcTitleBar.Left));
end;
But none of the GetTitleBarInfo return values (all the values are zero), what I’m missing?
The documentation of the
GetTitleBarInfofunction states that you must set the cbSize member tosizeof(TTitleBarInfo) before calling this function, also you must check the boolean result returned by the function.