In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

MDIclient

Xailer professional forum in English
Responder
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

MDIclient

Mensaje por Ingo Junge-Herrmann »

Ignacio,
because I didn't find any description how Xailer handles the MDI-windows
can I post some question here:
1.) if setting the nFormType to ftMIDIFRAME will the MDIclient be created
automatically or how must I do it?
2.) how can I draw labels on the MDIclient? When I draw them on the MDIframe
created by Xailer they are shown on each childwindow too.
3. Is there a method processing WM_MDISETMENU or have I change the menus
between frame and child myself?
Thanks in advance
Ingo
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

MDIclient

Mensaje por jfgimenez »

Ingo,
> 1.) if setting the nFormType to ftMIDIFRAME will the MDIclient be created
> automatically or how must I do it?
It's created automatically, just when the form is shown. If you need to
create if before (i.e. to access it from the OnInitialize event), simply
call the method ::CreateMDIClient()
In either cases, the MDIClient object is stored in ::oMdiClient
> 2.) how can I draw labels on the MDIclient? When I draw them on the
> MDIframe
> created by Xailer they are shown on each childwindow too.
The problem is that the mdiclient fills all client area of the form. If you
place any non-aligned control onto the form, then the mdiclient hides it.
The only way to paint anything on the mdiclient area is to use its OnPainted
event; but it's not accesible from the inspector, so you have to assign it
by hand:
METHOD FormInitialize( oSender )
...
::CreateMdiClient()
::oMdiClient:OnPainted := "PaintMyForm"
RETURN Nil
METHOD PaintMyForm( oSender, hDC, cPaintStruct )
MoveTo( 0, 0 )
LineTo( 200, 200 )
...
RETURN Nil
ITOH, you can assign any background image to the form, and it will be shown
without problem.
> 3. Is there a method processing WM_MDISETMENU or have I change the menus
> between frame and child myself?
Just assign the correct submenu object to the property ::oMdiMenu. I.e.:
MENU ::oMenu
MENUITEM "File"
MENU
...
ENDMENU
...
MENUITEM "Window"
MENU ::oMdiMenu // See here !!!
MENUITEM "Cascade" ACTION ::oMdiClient:Cascade()
MENUITEM "Mosaic" ACTION ::oMdiClient:Tile()
SEPARATOR
MENUITEM "Close all" ACTION ::oMdiClient:CloseAll()
ENDMENU
ENDMENU
--
Regards,
Jose F. Gimenez
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

MDIclient

Mensaje por jfgimenez »

Ingo,
> 1.) if setting the nFormType to ftMIDIFRAME will the MDIclient be created
> automatically or how must I do it?
It's created automatically, just when the form is shown. If you need to
create if before (i.e. to access it from the OnInitialize event), simply
call the method ::CreateMDIClient()
In either cases, the MDIClient object is stored in ::oMdiClient
> 2.) how can I draw labels on the MDIclient? When I draw them on the
> MDIframe
> created by Xailer they are shown on each childwindow too.
The problem is that the mdiclient fills all client area of the form. If you
place any non-aligned control onto the form, then the mdiclient hides it.
The only way to paint anything on the mdiclient area is to use its OnPainted
event; but it's not accesible from the inspector, so you have to assign it
by hand:
METHOD FormInitialize( oSender )
...
::CreateMdiClient()
::oMdiClient:OnPainted := "PaintMyForm"
RETURN Nil
METHOD PaintMyForm( oSender, hDC, cPaintStruct )
MoveTo( 0, 0 )
LineTo( 200, 200 )
...
RETURN Nil
ITOH, you can assign any background image to the form, and it will be shown
without problem.
> 3. Is there a method processing WM_MDISETMENU or have I change the menus
> between frame and child myself?
Just assign the correct submenu object to the property ::oMdiMenu. I.e.:
MENU ::oMenu
MENUITEM "File"
MENU
...
ENDMENU
...
MENUITEM "Window"
MENU ::oMdiMenu // See here !!!
MENUITEM "Cascade" ACTION ::oMdiClient:Cascade()
MENUITEM "Mosaic" ACTION ::oMdiClient:Tile()
SEPARATOR
MENUITEM "Close all" ACTION ::oMdiClient:CloseAll()
ENDMENU
ENDMENU
--
Regards,
Jose F. Gimenez
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

MDIclient

Mensaje por Ingo Junge-Herrmann »

Jose,
thank you for the quick answer.
>> 1.) if setting the nFormType to ftMIDIFRAME will the MDIclient be created
>> automatically or how must I do it?
>
>It's created automatically, just when the form is shown. If you need to
>create if before (i.e. to access it from the OnInitialize event), simply
>call the method ::CreateMDIClient()
>
>In either cases, the MDIClient object is stored in ::oMdiClient
Okay, now I know there is a property oMdiClient
>> 2.) how can I draw labels on the MDIclient? When I draw them on the
>> MDIframe
>> created by Xailer they are shown on each childwindow too.
>
>The problem is that the mdiclient fills all client area of the form. If
you
>place any non-aligned control onto the form, then the mdiclient hides it.
>The only way to paint anything on the mdiclient area is to use its OnPainted
>event; but it's not accesible from the inspector, so you have to assign
it
>by hand:
>
> METHOD FormInitialize( oSender )
> ...
> ::CreateMdiClient()
> ::oMdiClient:OnPainted := "PaintMyForm"
> RETURN Nil
>
> METHOD PaintMyForm( oSender, hDC, cPaintStruct )
> MoveTo( 0, 0 )
> LineTo( 200, 200 )
> ...
> RETURN Nil
>ITOH, you can assign any background image to the form, and it will be shown
>without problem.
>
I'm going an other way. I'm using a transparent bevel over the background
image with the label on it. Initializing a child window I hide the bevel
and show it again when child window is closing.
Is that okay?
>
>> 3. Is there a method processing WM_MDISETMENU or have I change the menus
>> between frame and child myself?
>
>Just assign the correct submenu object to the property ::oMdiMenu. I.e.:
>
> MENU ::oMenu
> MENUITEM "File"
> MENU
> ...
> ENDMENU
> ...
> MENUITEM "Window"
> MENU ::oMdiMenu // See here !!!
> MENUITEM "Cascade" ACTION ::oMdiClient:Cascade()
> MENUITEM "Mosaic" ACTION ::oMdiClient:Tile()
> SEPARATOR
> MENUITEM "Close all" ACTION ::oMdiClient:CloseAll()
> ENDMENU
> ENDMENU
>
Sorry that's not what I mean,
In a MDI form the menu bar and/or toolbar is shared between all child windows.
In FW16 I was using so far the menu of a focused child window automatically
turned to the menu of the MDI window.
In Xailer it is not so - have I to code it myself?
Regards
Ingo
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

MDIclient

Mensaje por Ingo Junge-Herrmann »

Jose,
thank you for the quick answer.
>> 1.) if setting the nFormType to ftMIDIFRAME will the MDIclient be created
>> automatically or how must I do it?
>
>It's created automatically, just when the form is shown. If you need to
>create if before (i.e. to access it from the OnInitialize event), simply
>call the method ::CreateMDIClient()
>
>In either cases, the MDIClient object is stored in ::oMdiClient
Okay, now I know there is a property oMdiClient
>> 2.) how can I draw labels on the MDIclient? When I draw them on the
>> MDIframe
>> created by Xailer they are shown on each childwindow too.
>
>The problem is that the mdiclient fills all client area of the form. If
you
>place any non-aligned control onto the form, then the mdiclient hides it.
>The only way to paint anything on the mdiclient area is to use its OnPainted
>event; but it's not accesible from the inspector, so you have to assign
it
>by hand:
>
> METHOD FormInitialize( oSender )
> ...
> ::CreateMdiClient()
> ::oMdiClient:OnPainted := "PaintMyForm"
> RETURN Nil
>
> METHOD PaintMyForm( oSender, hDC, cPaintStruct )
> MoveTo( 0, 0 )
> LineTo( 200, 200 )
> ...
> RETURN Nil
>ITOH, you can assign any background image to the form, and it will be shown
>without problem.
>
I'm going an other way. I'm using a transparent bevel over the background
image with the label on it. Initializing a child window I hide the bevel
and show it again when child window is closing.
Is that okay?
>
>> 3. Is there a method processing WM_MDISETMENU or have I change the menus
>> between frame and child myself?
>
>Just assign the correct submenu object to the property ::oMdiMenu. I.e.:
>
> MENU ::oMenu
> MENUITEM "File"
> MENU
> ...
> ENDMENU
> ...
> MENUITEM "Window"
> MENU ::oMdiMenu // See here !!!
> MENUITEM "Cascade" ACTION ::oMdiClient:Cascade()
> MENUITEM "Mosaic" ACTION ::oMdiClient:Tile()
> SEPARATOR
> MENUITEM "Close all" ACTION ::oMdiClient:CloseAll()
> ENDMENU
> ENDMENU
>
Sorry that's not what I mean,
In a MDI form the menu bar and/or toolbar is shared between all child windows.
In FW16 I was using so far the menu of a focused child window automatically
turned to the menu of the MDI window.
In Xailer it is not so - have I to code it myself?
Regards
Ingo
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

MDIclient

Mensaje por jfgimenez »

Ingo,
> I'm going an other way. I'm using a transparent bevel over the background
> image with the label on it. Initializing a child window I hide the bevel
> and show it again when child window is closing.
>
> Is that okay?
Well, it's not the regular way to do it, but it could work. You should place
the bevel aligned to alCLIENT, and you have to hide (or show) it when there
are (or aren't) child windows. That way, the MdiClient control gets resized
to cover all the client area or to be reduced to a single line of pixels.
> Sorry that's not what I mean,
> In a MDI form the menu bar and/or toolbar is shared between all child
> windows.
> In FW16 I was using so far the menu of a focused child window
> automatically
> turned to the menu of the MDI window.
>
> In Xailer it is not so - have I to code it myself?
I didn't ever try to do it, sorry. I'll need some research on this subject
to make it work in Xailer.
--
Un saludo,
José F. Giménez
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

MDIclient

Mensaje por jfgimenez »

Ingo,
> I'm going an other way. I'm using a transparent bevel over the background
> image with the label on it. Initializing a child window I hide the bevel
> and show it again when child window is closing.
>
> Is that okay?
Well, it's not the regular way to do it, but it could work. You should place
the bevel aligned to alCLIENT, and you have to hide (or show) it when there
are (or aren't) child windows. That way, the MdiClient control gets resized
to cover all the client area or to be reduced to a single line of pixels.
> Sorry that's not what I mean,
> In a MDI form the menu bar and/or toolbar is shared between all child
> windows.
> In FW16 I was using so far the menu of a focused child window
> automatically
> turned to the menu of the MDI window.
>
> In Xailer it is not so - have I to code it myself?
I didn't ever try to do it, sorry. I'll need some research on this subject
to make it work in Xailer.
--
Un saludo,
José F. Giménez
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

MDIclient

Mensaje por Ingo Junge-Herrmann »


Jose,
>I didn't ever try to do it, sorry. I'll need some research on this subject
>to make it work in Xailer.
Here some screenshots to explain what I mean (from my app build in FW):
on picture "mdi-menu" you see the menu of the mdiframe without any child
open
when I open a childwindow the child-menu turns to the frame-menu (picture
"childmenu.bmp")
In Xailer when I open a child window with menu the frame-menu will still
stay at place and the childmenu is not shown (see picture "xailer.bmp")
Is this the regular behaviour?
Regards
Ingo
--

Attached files pictures.zip (9.4 KB)Â
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

MDIclient

Mensaje por Ingo Junge-Herrmann »


Jose,
>I didn't ever try to do it, sorry. I'll need some research on this subject
>to make it work in Xailer.
Here some screenshots to explain what I mean (from my app build in FW):
on picture "mdi-menu" you see the menu of the mdiframe without any child
open
when I open a childwindow the child-menu turns to the frame-menu (picture
"childmenu.bmp")
In Xailer when I open a child window with menu the frame-menu will still
stay at place and the childmenu is not shown (see picture "xailer.bmp")
Is this the regular behaviour?
Regards
Ingo
--

Attached files pictures.zip (9.4 KB)Â
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

MDIclient

Mensaje por Ingo Junge-Herrmann »

Jose,
>> I'm going an other way. I'm using a transparent bevel over the background
>> image with the label on it. Initializing a child window I hide the bevel
>> and show it again when child window is closing.
>>
>> Is that okay?
>
>Well, it's not the regular way to do it, but it could work. You should place
>the bevel aligned to alCLIENT, and you have to hide (or show) it when there
>are (or aren't) child windows. That way, the MdiClient control gets resized
>to cover all the client area or to be reduced to a single line of pixels.
What about this way:
METHOD FormShow( oSender ) CLASS TMain
SetParent(::oBevel:Handle,::oMdiClient:Handle)
RETURN Nil
Is this a regular way?
Regards
Ingo
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

MDIclient

Mensaje por Ingo Junge-Herrmann »

Jose,
>> I'm going an other way. I'm using a transparent bevel over the background
>> image with the label on it. Initializing a child window I hide the bevel
>> and show it again when child window is closing.
>>
>> Is that okay?
>
>Well, it's not the regular way to do it, but it could work. You should place
>the bevel aligned to alCLIENT, and you have to hide (or show) it when there
>are (or aren't) child windows. That way, the MdiClient control gets resized
>to cover all the client area or to be reduced to a single line of pixels.
What about this way:
METHOD FormShow( oSender ) CLASS TMain
SetParent(::oBevel:Handle,::oMdiClient:Handle)
RETURN Nil
Is this a regular way?
Regards
Ingo
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

MDIclient

Mensaje por jfgimenez »

Ingo,
thanks for the tip. I'll review it ASAP.
--
Regards,
Jose F. Gimenez
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

MDIclient

Mensaje por jfgimenez »

Ingo,
thanks for the tip. I'll review it ASAP.
--
Regards,
Jose F. Gimenez
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

MDIclient

Mensaje por jfgimenez »

Ingo,
> What about this way:
>
> METHOD FormShow( oSender ) CLASS TMain
> SetParent(::oBevel:Handle,::oMdiClient:Handle)
> RETURN Nil
>
> Is this a regular way?
Well, I've not tested it, but so if you hide the bevel then the mdiclient is
hidden also.
--
Regards,
Jose F. Gimenez
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

MDIclient

Mensaje por jfgimenez »

Ingo,
> What about this way:
>
> METHOD FormShow( oSender ) CLASS TMain
> SetParent(::oBevel:Handle,::oMdiClient:Handle)
> RETURN Nil
>
> Is this a regular way?
Well, I've not tested it, but so if you hide the bevel then the mdiclient is
hidden also.
--
Regards,
Jose F. Gimenez
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

MDIclient

Mensaje por Ingo Junge-Herrmann »

"Jose F. Gimenez" <jfgimenez@wanadoo.es> wrote:
>Ingo,
>
>> What about this way:
>>
>> METHOD FormShow( oSender ) CLASS TMain
>> SetParent(::oBevel:Handle,::oMdiClient:Handle)
>> RETURN Nil
>>
>> Is this a regular way?
>
>Well, I've not tested it, but so if you hide the bevel then the mdiclient
is
>hidden also.
>
It works without hiding the bevel.
Regards
Ingo
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

MDIclient

Mensaje por Ingo Junge-Herrmann »

"Jose F. Gimenez" <jfgimenez@wanadoo.es> wrote:
>Ingo,
>
>> What about this way:
>>
>> METHOD FormShow( oSender ) CLASS TMain
>> SetParent(::oBevel:Handle,::oMdiClient:Handle)
>> RETURN Nil
>>
>> Is this a regular way?
>
>Well, I've not tested it, but so if you hide the bevel then the mdiclient
is
>hidden also.
>
It works without hiding the bevel.
Regards
Ingo
Responder