I have done this, but the button is outside the window, Someone could give me a hand:
BTNAME = RandomName(6);
tblButtonProps = {};
tblButtonProps.FontName = "Arial";
tblButtonProps.ButtonFile = (_SourceFolder .. "\\AutoPlay\\Buttons\\rss.btn");
tblButtonProps.Visible = true;
tblButtonProps.Enabled = true;
tblButtonProps.Y = 30;
tblButtonProps.X = 300;
tblButtonProps.Width = 50;
tblButtonProps.Height = 30;
tblButtonProps.TooltipText = "GUARDAR";
Page.CreateObject(OBJECT_BUTTON,BTNAME, tblButtonProps);
PopHwnd = WinApi.CreatePopupWindow(0, "Insertar Municipios", WS_VISIBLE.."|"..WS_OVERLAPPED.."|"..WS_CAPTION.." |"..WS_SYSMENU, 30, 300, 245, 280, Application.GetWndHandle(), 0);
WinApi.CreateWindowEx(0, "BUTTON", "Inserte el Nombre:", WS_CHILD.."|"..WS_VISIBLE.."|"..BS_GROUPBOX.."|".. BS_CENTER, 5, 10, 220, 100, PopHwnd, 0, 0, 0);
LbHwnd = Button.GetProperties(BTNAME).WindowHandle;
WinApi.ShowWindow(LbHwnd, SW_HIDE);
WinApi.SetParent(LbHwnd,PopHwnd);
WinApi.ShowWindow(LbHwnd, SW_SHOW);
BTNAME = RandomName(6);
tblButtonProps = {};
tblButtonProps.FontName = "Arial";
tblButtonProps.ButtonFile = (_SourceFolder .. "\\AutoPlay\\Buttons\\rss.btn");
tblButtonProps.Visible = true;
tblButtonProps.Enabled = true;
tblButtonProps.Y = 30;
tblButtonProps.X = 300;
tblButtonProps.Width = 50;
tblButtonProps.Height = 30;
tblButtonProps.TooltipText = "GUARDAR";
Page.CreateObject(OBJECT_BUTTON,BTNAME, tblButtonProps);
PopHwnd = WinApi.CreatePopupWindow(0, "Insertar Municipios", WS_VISIBLE.."|"..WS_OVERLAPPED.."|"..WS_CAPTION.." |"..WS_SYSMENU, 30, 300, 245, 280, Application.GetWndHandle(), 0);
WinApi.CreateWindowEx(0, "BUTTON", "Inserte el Nombre:", WS_CHILD.."|"..WS_VISIBLE.."|"..BS_GROUPBOX.."|".. BS_CENTER, 5, 10, 220, 100, PopHwnd, 0, 0, 0);
LbHwnd = Button.GetProperties(BTNAME).WindowHandle;
WinApi.ShowWindow(LbHwnd, SW_HIDE);
WinApi.SetParent(LbHwnd,PopHwnd);
WinApi.ShowWindow(LbHwnd, SW_SHOW);