Board index » cppbuilder » MDI challenges

MDI challenges

    I am creating MDI child forms at runtime, including all the controls,
and then moving them around and resizing the form for a better appearance.
The problem is that as soon as the MDI child form is created, it is visible,
and you see all the controls flying around, which is cool to watch, but only
for the first couple times : )
    Is there anyway to not display the MDI child form immediately, or hide
it till I'm done updating all the positions and sizes?
    Another question, I have some controls that use anchors, and once the
form gets resized and controls moved, the anchors no longer are
representative of what they were originally set as.  Is there anyway to fix
this?  Example, control placed in lower left, anchored to bottom and left.
When the form is resized by my creation code, the anchor no longer stays,
and ends up towards the upper left.

Any suggestions would be greatly appreciated!
Sean Smith

 

Re:MDI challenges


For your first question: LockWindowUpdate code works pretty good in my
program. Check if it works for you. There have been few mails on this in the
past month. Search for Flickering and Child in deja.com.

Vijay

 file://--- create a new MDI child window ----
  LockWindowUpdate(ClientHandle);     file://The Lock statements help in
create the Child Maximized
 TAscChild* NewChild = new TAscChild(Application);
 NewChild->Caption = Name;
file://You can try putting you code for sizing all your children here
  LockWindowUpdate(NULL);

Re:MDI challenges


Quote
Vijay <kovv...@tamu.edu> wrote in message

news:8cu3sa$ajc5@bornews.borland.com...
Quote
> For your first question: LockWindowUpdate code works pretty good in my
> program. Check if it works for you. There have been few mails on this in
the
> past month. Search for Flickering and Child in deja.com.

> Vijay

Thank you very much. That is exactly what I needed for the first problem!
Now that funky second one : )

Sean

Other Threads