Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL2 Window inside TFormStand #80

Open
azrael11 opened this issue Feb 19, 2023 · 1 comment
Open

SDL2 Window inside TFormStand #80

azrael11 opened this issue Feb 19, 2023 · 1 comment
Assignees

Comments

@azrael11
Copy link

azrael11 commented Feb 19, 2023

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?

@andrea-magni andrea-magni changed the title SDL2 Window inside TFormStad SDL2 Window inside TFormStand May 10, 2023
@andrea-magni andrea-magni self-assigned this May 10, 2023
@andrea-magni
Copy link
Owner

Please provide an simple project showing the issue. I am not an expert of SDL library.

Sincerely,
Andrea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants