[Lazarus] Win API function calls with array as parameter

Michael W. Vogel m-w-vogel at gmx.de
Wed Jan 20 17:05:31 CET 2016


You can try:

TileWindows(0, MDITILE_HORIZONTAL, Screen.WorkAreaRect, 
Length(MyHandles), MyHandles[0]);

or

TileWindows(0, MDITILE_HORIZONTAL, Screen.WorkAreaRect, High(MyHandles) 
+ 1, MyHandles[0]);


Simple Test works for me:

uses
   ..., windows, LCLType;

procedure TForm1.Button1Click(Sender: TObject);
var
   Wnds: array[0..1] of HWND;
begin
   Wnds[0] := Handle;
   Wnds[1] := Form2.Handle;
   TileWindows(0, MDITILE_HORIZONTAL, Screen.WorkAreaRect, Length(Wnds), 
Wnds[0]);
end;




More information about the Lazarus mailing list