function FmxObjectToWnd(FmxControl: TPresentedControl):NativeUInt;
var
Idx: Integer;
begin
Result:= 0;
if FmxControl.ControlType = TControlType.Platform then
for Idx := 0 to FmxControl.ChildrenCount - 1 do begin
if FmxControl.Children[Idx] is TWinNativeScene then begin
Exit(TWinNativeScene(FmxControl.Children[Idx]).Handle.Wnd);
end;
end;
end;