• Advertisement

Archived

This topic is now archived and is closed to further replies.

Child window

This topic is 6748 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
A Docking toolbar......that's what I meant. I can't get such a thing. Indeed it is for shortcuts.

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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......

Share this post


Link to post
Share on other sites

  • Advertisement