Child window bug???

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • strid3r
    New Member
    • Mar 2008
    • 4

    Child window bug???

    Hi,

    I have an application in C++ Builder 6 that has three different child forms. when I start the program the first and second child forms are hidden till I execute them as they should be but the third one which I created as the last is shown (and it doesn't have proper dimensions). I don't know wtf is going on. It should be working ok..

    btw I call the windows with:
    Code:
    Form = new TForm(Application);
    any help really appreciated
  • Studlyami
    Recognized Expert Contributor
    • Sep 2007
    • 464

    #2
    when you display the other two windows are the dimensions right? Run the program through a debugger and check the size of the form. In C++ Builder you can specify the size/location of the form during design time. Perhaps this tutorial will be of some help.

    Is this just a size problem or is there something else going on? You can always size the form dynamically during runtime and see if that fixes the problem.

    Comment

    • strid3r
      New Member
      • Mar 2008
      • 4

      #3
      No the size is only a side effect of this bug or whatever it is. My primary objective is having all three child windows hidden till I call them but the third always shows itself on creating the parent window. It's just very odd..

      Comment

      • Studlyami
        Recognized Expert Contributor
        • Sep 2007
        • 464

        #4
        That is odd. Could you please post up more code. Specifically the place where you create the parent window, then the place where you create the 3 child windows. Then the place where you show/hide the windows.

        Comment

        • strid3r
          New Member
          • Mar 2008
          • 4

          #5
          I know that it's odd. There's nothing where I create parent window. I create the three child windows all the same. When there were only two of them everything was ok. After I added the third one it started doing strange things. And I'm not showing or hiding them at all. OnClose I use: Action = caFree otherwise the window won't close..

          Comment

          • strid3r
            New Member
            • Mar 2008
            • 4

            #6
            I solved it:) It was because in mdiapp.cpp builder was creating this form
            Code:
             Application->CreateForm(__classid(TForm2), &Form2);
            thanks for all help;)

            Comment

            Working...