Child window

Started by
2 comments, last by CJ 24 years, 5 months ago
Few questions:

- Why not just make it an MDI and get it over with?

- If it's for shortcuts, why use a child window when you could use a docking toolbar? (If the answer involves checkboxes, dropdowns, etc, you can do that in a toolbar)

- What's not active, and why do you want to replace your child window?

Generally child dialogs are only supposed to come up on a DoModal from the parent, and the data in them isn't processed until the DoModal returns an IDOK. Alternatively you could try using PostMessage or SendMessage back to your parent, but this whole thing kind of sounds kluged... maybe I'm just misunderstanding *smile*

-fel

~ The opinions stated by this individual are the opinions of this individual and not the opinions of her company, any organization she might be part of, her parrot, or anyone else. ~
Advertisement
A Docking toolbar......that's what I meant. I can't get such a thing. Indeed it is for shortcuts.

------------------
Dance with me......

I've got currently an MFC application, and I've got a modeless dialog.

Now, since it's SDI. I can't get it to be an active child within the program itself.

I've got my main program, and within that, I've got another child window, which is suposed to have buttons and stuff, for short cuts. Now, if I want to click on one of those buttons.......it won't be active. I can't even replace that child window. How to make it working?

I use:

new CTransformToolbar(GetActiveWindow()); // in MainFrm.cpp

and the constructor of the dialog box itself holds:

CDialog::Create(IDD_TOOLBAR_DIALOG, pParent);
ShowWindow(SW_SHOW);

What's wrong?

I would be happy with an answer......

------------------
Dance with me......

Do this in your OnCreate:

  m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |    CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);  m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);  EnableDocking(CBRS_ALIGN_ANY);  DockControlBar(&m_wndToolBar);

luck.
-fel

~ The opinions stated by this individual are the opinions of this individual and not the opinions of her company, any organization she might be part of, her parrot, or anyone else. ~

This topic is closed to new replies.

Advertisement