Solved

CDialogBar in a child window

Posted on 1998-09-01
2
448 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 100 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Folder Comparison 12 55
unable to delete all specified values regedit 38 888
sum13 challenge 24 149
FizzBuzz challenge 9 87
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 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