Board index » cppbuilder » About the MDIChild's align...

About the MDIChild's align...


2007-11-11 02:47:24 AM
cppbuilder32
Hi all, I have a question about MDIChild form's "Align" property.
How do I let my MDIChild's width near the MDIForm when I set MDIChild's
"Align" property to "AlTop"?
Thx.
 
 

Re:About the MDIChild's align...

"remmurds" < XXXX@XXXXX.COM >wrote in message
Quote
How do I let my MDIChild's width near the MDIForm when
I set MDIChild's "Align" property to "AlTop"?
I do not understand what you are asking for. Please clearify.
Gambit
 

Re:About the MDIChild's align...

For example, if my desktop is 1280 * 1024,
when I let my MDIChild's align to be "AlTop",
the Child's width will be 1024 too.
I wish my Child's width as wide as MDIForm's clientwidth.
How to get it?
Thank you for your response:)
"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >
Quote
"remmurds" < XXXX@XXXXX.COM >wrote in message
news:4735fcf0$ XXXX@XXXXX.COM ...

>How do I let my MDIChild's width near the MDIForm when
>I set MDIChild's "Align" property to "AlTop"?

I do not understand what you are asking for. Please clearify.


Gambit

 

{smallsort}

Re:About the MDIChild's align...

Hi remmurds
remmurds says:
Quote

For example, if my desktop is 1280 * 1024,
when I let my MDIChild's align to be "AlTop",
the Child's width will be 1024 too.
I wish my Child's width as wide as MDIForm's clientwidth.
How to get it?

Thank you for your response:)
I have never used MDIForms so this might be stupid..
Have You set the parent of the MDIChild to the MDIform ?
Kind regards
Asger
 

Re:About the MDIChild's align...

Quote
For example, if my desktop is 1280 * 1024,
when I let my MDIChild's align to be "AlTop",
the Child's width will be 1024 too.
I wish my Child's width as wide as MDIForm's clientwidth.
How to get it?
Forget the Align property. That will not work.
If you have 3 or less child windows, just call the main form's Tile()
method. If 4 or more, get the MDI client window's width:
RECT r;
::GetClientRect( ClientHandle, &r );
and set each child's width equal to this rectangle's width. If you
want all childs to tile horizontally, do some arithmetic to determine
each child's height, then position each child accordingly using its
Top and Left properties.
Adam
 

Re:About the MDIChild's align...

Thank you for your response:)
I've solved this ploblem.
"Adam" < XXXX@XXXXX.COM >
Quote
Forget the Align property. That will not work.

If you have 3 or less child windows, just call the main form's Tile()
method. If 4 or more, get the MDI client window's width:

RECT r;
::GetClientRect( ClientHandle, &r );

and set each child's width equal to this rectangle's width. If you
want all childs to tile horizontally, do some arithmetic to determine
each child's height, then position each child accordingly using its
Top and Left properties.

Adam