TFrameStand icon indicating copy to clipboard operation
TFrameStand copied to clipboard

SDL2 Window inside TFormStand

Open azrael11 opened this issue 2 years ago • 1 comments

Hello,

I Create a FMX Form with name frm_sdl2. I Create a second Form with name frm_view.

In form frm_sdl2 i add a TFormStand, TRectangle and a button1.

i create a handle and the a window_render

sdl2_handle := FMX.Platform.Win.WindowHandleToPlatform(frm_view.Handle).Wnd;
  if window_render = nil then
    window_render := SDL_CreateWindowFrom(pointer(sdl2_handle));

Now i try to add frm_view in frm_sdl2 rectangle1 when i press button1

procedure Tfrm_sdl2.Button1Click(Sender: TObject);
var
  view_form: TFormInfo<Tfrm_game>;
//  f_test: TFormInfo<Tfrm_test>;
begin
//  f_test:= FormStand.GetFormInfo<Tfrm_test>(True, rectangle1);
//  f_test.show;
  view_form := FormStand.GetFormInfo<Tfrm_view>(True, rectangle1);
  view_form.Form.Visible := true;
  view_form.Show;
end;

The result is a popup window not nested that i want. In the code above i add a f_test with Tfrm_test has a button and it work fine. So what am i missing here?

azrael11 avatar Feb 19 '23 06:02 azrael11