Solved

Creating A DialogBar.

Posted on 1997-10-18
2
381 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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 is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

867 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now