Thanks.

Ok,  I have found a work around for IupMessageAlarm, by creating a "parent"
dialog in iup whose parent is the main application.

However I can not work out how to access the iup dialog name to use in
SetAttribute which wants a string.

If I use an IUP dialog as the parent for iup.Getparam() how do I get the
name to use in

iup.SetAttribute("PARENTDIALOG",h)

so iup.GetParam can be a child of the "parent" sub window.

On Fri, 28 Feb 2020 at 18:11, Antonio Scuri <antonio.sc...@gmail.com> wrote:

>   Hi,
>
>   *PARENTDIALOG *is the name of a dialog in IUP. In IupLua, if you set an
> IUP object Ihandle as attribute will automatically finds its name, or even
> generates a name, and do the association. For example,
>
> parent_dialog1 = iup.dialog{...
>
> child_dialog = iup.dialog{ parentdialog =  parent_dialog1, ...
>
>   In IupLua, the handle of a dialog or image, or any resource, is
> automatically translated to its name, when set as an attribute of another
> dialog or element.
>
>   *NATIVEPARENT *explicitly states that instead of a regular IUP handle,
> it expects a "native" handle, in that case you can use a HWND in Windows.
> In any other situation, you can not.
>
>   If you have a window that is not a regular IUP dialog, you can use it as
> parent only using this attribute. I don't think you will be able to use it
> as parent for a IupAlarm, neither in IupMessageAlarm where a Ihandle is
> expected.
>
> Best,
> Scuri
>
>
> Em sex., 28 de fev. de 2020 às 11:21, Jane Taubman <janetaub...@gmail.com>
> escreveu:
> >
> > Back in June Antonio posted
> >
> >   IupAlarm and IupGetParam internally use IupDialogs, but both are
> functions that create and show pre-defined dialogs. Usually they are
> configured through a callback (IupGetParam) or global attributes
> (IupAlarm). Although they are not NATIVEPARENT friendly. It will be not
> simple to use NATIVEPARENT with them, but it is possible, at least for
> IupGetParam.
> >
> >
> >
> > I am using function which returns a light user object which can be used
> with standard dialogues using
> > h = fhGetContextInfo("CI_PARENT_HWND")
> > iup.SetAttribute(filedlg, "NATIVEPARENT",h);  -- Set the parent window
> handle
> >
> > where filedlg is a standard iup dialog.
> >
> > However using
> > iup.SetGlobal("PARENTDIALOG",fhGetContextInfo("CI_PARENT_HWND"))
> >
> > fails saying it wants a string and not a light user object.
> >
> > I also get the same problem with
> >
> > local h=fhGetContextInfo('CI_PARENT_HWND')
> > local r = iup.MessageAlarm(h, 'Question' , sQuestion..'?', 'YESNO')
> >
> > Is there a way to get from the light user object I have to something
> usable with these dialogues please.
> >
> >
> >
> > --
> > Jane.
> >
> > Jane Taubman | www.rjt.org.uk | www.taubman.org.uk | www.fhug.org.uk
> > _______________________________________________
> > Iup-users mailing list
> > Iup-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/iup-users
> _______________________________________________
> Iup-users mailing list
> Iup-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/iup-users
>


-- 
Jane.

Jane Taubman | www.rjt.org.uk | www.taubman.org.uk | www.fhug.org.uk
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to