Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

CDialogBar in a child window

Posted on 1998-09-01
2
Medium Priority
?
468 Views
Last Modified: 2013-11-19
Does anyone know how to create a dialog bar in a child window of a mdi application?
0
Comment
Question by:Coma
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Expert Comment

by:danny_pav
ID: 1321560
Having never done this, I would suggest you do the same thing you would do to put a CDialogBar in the SDI Frame Window or MDI Parent and do that to the MDI Child Window.
0
 
LVL 1

Accepted Solution

by:
elf_k earned 300 total points
ID: 1321561
try something like this:

class CScriptFrame : public CMDIChildWnd
{
//...
protected:
    CScriptBar m_ScriptBar; // CDialogBar-derived
}

BOOL CScriptFrame::PreCreateWindow(CREATESTRUCT& cs)
{
// this prevent incorrect redraw in some cases
      cs.style|=WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
      return CMDIChildWnd::PreCreateWindow(cs);
}

int CScriptFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
    if(CMDIChildWnd::OnCreate(lpCreateStruct)==-1)
         return -1;
    m_ScriptBar.Create(this,IDD_SCRIPTBAR,CBRS_TOP,IDD_SCRIPTBAR);
    m_ScriptBar.SetBarStyle(
            m_ScriptBar.GetBarStyle() & ~(CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT)
            );
    return 0;
}

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question