Here's some simple code that will get what you want done. You can modify it to change the titles/headers or whatnot.
XML file (save in Unicode)
quote:
<Interfaces xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance">
<Window Id = "WindowA" Version = "1">
<Attributes>
<Caption>Caption Here</Caption>
</Attributes>
<TitleBar>
<Title><Text>Title Here</Text></Title>
</TitleBar>
<Position ClientWidth = "200" ClientHeight = "68"/>
<Controls>
<Control xsi:type = "StaticControl" Id = "Label">
<Position Left = "10" Top = "20" Width = "150"/>
<Caption>Hoeveel geld heb je gerkregen?</Caption>
</Control>
<Control xsi:type = "EditControl" Id = "EditFld">
<Position Left = "10" Top = "35" Width = "180"/>
</Control>
<Control xsi:type = "ButtonControl" Id = "OkBtn">
<Position Left = "150" Top = "50" Width = "40"/>
<Caption>Ok</Caption>
</Control>
</Controls>
</Window>
</Interfaces>
To open the window, use this line
quote:
MsgPlus.CreateWnd("ExampleWnd.xml", "WindowA");
To get the info, you'll need a function
quote:
function OnWindowAEvent_CtrlClicked (PlusWnd, ControlId)
{
if (ControlId == "OkBtn")
{
PlusWnd.GetControlText ("EditFld");
}
}
The line PlusWnd.GetControlText ("EditFld") will return you a String, and you can handle that however you wish. You might want to dummy proof and make sure that the field isn't blank or that they don't preemptively close the window.