Problems with modeless child dialog. - Programmer

This is a discussion on Problems with modeless child dialog. - Programmer ; Hi. I have created a dialog window, that I want to appear (eventually) as a modeless child window inside my app. I do it this way: dlg = new CMyDialog; dlg->Create(IDD_DIALOG, this); dlg->ShowWindow(SW_SHOW); I get expected behaviour when the dialogs ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Problems with modeless child dialog.

  1. Problems with modeless child dialog.

    Hi.

    I have created a dialog window, that I want to appear (eventually) as a
    modeless child window inside my app.

    I do it this way:
    dlg = new CMyDialog;
    dlg->Create(IDD_DIALOG, this);
    dlg->ShowWindow(SW_SHOW);

    I get expected behaviour when the dialogs Style property is set to
    Overlapped, or Popup, but when I change it to Child, all I see is some
    of the dialogs controls displayed on the parent window, but nothing is
    clickable, and nothing is redrawn if I move anything.

    I noticed some other people have had this problem, but I cant see it
    answered anywhere.

    Also, eventually I want maximise and minimize buttons on this dialogs
    toolbar, but the Child style seems to grey out these options.

    Whats the standard way to get a modeless child window with minimize and
    maximise buttons, something that works like a document view in a MDI app?

    Thanks

    Kurt


  2. Re: Problems with modeless child dialog.

    Kurt Häusler wrote:

    > Hi.
    >
    > I have created a dialog window, that I want to appear (eventually) as a
    > modeless child window inside my app.
    >
    > I do it this way:
    > dlg = new CMyDialog;
    > dlg->Create(IDD_DIALOG, this);
    > dlg->ShowWindow(SW_SHOW);
    >
    > I get expected behaviour when the dialogs Style property is set to
    > Overlapped, or Popup, but when I change it to Child, all I see is some
    > of the dialogs controls displayed on the parent window, but nothing is
    > clickable, and nothing is redrawn if I move anything.
    >
    > I noticed some other people have had this problem, but I cant see it
    > answered anywhere.
    >
    > Also, eventually I want maximise and minimize buttons on this dialogs
    > toolbar, but the Child style seems to grey out these options.
    >
    > Whats the standard way to get a modeless child window with minimize and
    > maximise buttons, something that works like a document view in a MDI app?
    >
    > Thanks
    >
    > Kurt
    >


    Kurt,

    I believe that the 'Child' style should only be used when this dialog is
    to be embedded inside another window.

    To create a 'normal' dialog, you should use 'Overlapped' so that a full
    title bar (and max/min/close buttons) is shown.

    HTH,

    Paul.


+ Reply to Thread