Solved

Creating A DialogBar.

Posted on 1997-10-18
2
383 Views
Last Modified: 2013-11-20
Whats the best way to create a dialog bar and attach it to code.  I can create a DialogBar in the resource editor by using the Insert...|DialogBar option.

But when I use ClassWizard to create a new module, I cna't select DialogBar as the base class.

How should I go about it?
0
Comment
Question by:gav061697
2 Comments
 
LVL 1

Accepted Solution

by:
ohell earned 50 total points
ID: 1308407
If wizard doesn't know about the dialog bar, you just do it manually, I guess. If you want to override the behavior, override a class from CDialogBar, and if not, just call CDialogBar's Create fxn in your parnt frame's OnCreate(), passing the ID of the dialog bar resource to the create fxn...

      if (!m_dialogBar.Create(this, IDD_MyDialogBar, CBRS_TOP | CBRS_TOOLTIPS | CBRS_FLYBY |CBRS_HIDE_INPLACE, ID_TOOLS_DIALOGBAR ))
      {
            TRACE0("Failed to create dialog bar m_dialogBar \n");
            return -1;            // fail to create
      }

And you handle the messages in the frame.

0
 

Expert Comment

by:jorkin
ID: 10727121
I am creating a DialogBar manually, in the way you have described, but I still have one problem:

In the resource editor, I added an edit box to the DialogBar.

Now, I want to associate a CEdit control with the edit box.  Normally, I would go to the wizard and add a variable.  But since the wizard doesn't know about the DialogBar class, I can't do that.

What is the manual alternative?

Thanks.
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need a Shell script to start a service checking the port 6 52
method notes when mouse over in eclipse 5 87
FizzBuzz challenge 9 82
wordappend challenge 8 201
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: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

828 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