How do you create Multiple Modeless Child Dialogs in a SDI app? - Programmer

This is a discussion on How do you create Multiple Modeless Child Dialogs in a SDI app? - Programmer ; I have created a bare bones SDI app, created some Dialog's via the resource tab and associated these dialog's with base class CDialog. (via the Class Wizard). Everything is fine. I create three Modeless Dialog's that appear normally. But if ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: How do you create Multiple Modeless Child Dialogs in a SDI app?

  1. How do you create Multiple Modeless Child Dialogs in a SDI app?

    I have created a bare bones SDI app, created some Dialog's via the
    resource tab and associated these dialog's with base class CDialog.
    (via the Class Wizard).

    Everything is fine. I create three Modeless Dialog's that appear
    normally.

    But if I go via into the Resource Tab and make all three Dialog's
    "Child", none of them show up when i create them!. Fine. I make the
    MainFrm's style to "cs.style = WS_CAPTION|WS_SYSMENU|WS_CLIPCHILDREN;
    ". The last dialog i create is fine; the other's are *there*, but i
    can't see them. If i pop up a message box and move it around, the
    other two dialog's get "painted" where ever i move the message box.
    It looks like the child dialog box's are not getting repainted or
    something.

    I read somewhere that if i want to create multiple modeless child
    dialog boxes i have to create them with the "CFrameWnd" and NOT
    "CDialog". Is that True? How can i create an SDI app who's View has
    multiple child windows?

    -alex-

  2. Re: How do you create Multiple Modeless Child Dialogs in a SDI app?

    It all depends on what you are trying to do with the dialogs.

    From what you have said here, it think that your modeless dialogs are on top
    of each other, when you define a dialog as a WS_CHILD dialog, it is confined
    within the parent's frame. If you want that then you would have to move each
    one using SetWindowPos.

    If you want them to float around, then get rid of the child flag, you can't
    have a WS_POP up and WS_CHILD at the same time.

    "Alex Gray" wrote in message
    news:50347d7a.0310061825.44b7e549@posting.google.c om...
    > I have created a bare bones SDI app, created some Dialog's via the
    > resource tab and associated these dialog's with base class CDialog.
    > (via the Class Wizard).
    >
    > Everything is fine. I create three Modeless Dialog's that appear
    > normally.
    >
    > But if I go via into the Resource Tab and make all three Dialog's
    > "Child", none of them show up when i create them!. Fine. I make the
    > MainFrm's style to "cs.style = WS_CAPTION|WS_SYSMENU|WS_CLIPCHILDREN;
    > ". The last dialog i create is fine; the other's are *there*, but i
    > can't see them. If i pop up a message box and move it around, the
    > other two dialog's get "painted" where ever i move the message box.
    > It looks like the child dialog box's are not getting repainted or
    > something.
    >
    > I read somewhere that if i want to create multiple modeless child
    > dialog boxes i have to create them with the "CFrameWnd" and NOT
    > "CDialog". Is that True? How can i create an SDI app who's View has
    > multiple child windows?
    >
    > -alex-




+ Reply to Thread