When you insert the component a class is not normally created. Instead, your MainFrame class will have a member of type CDialogBar.
What I normally do is declare a new class manually just above the CMainFrame class declaration which is derived from CDialogBar and then change the CDialogBar member in CMainFrame to be of my new new class type, for example:
// in mainfram.h file
// declare a new class derived from CDialogBar
class MyDialogBar : public CDialogBar
{
};
// now change the CDialogBar member in
// CMainFrame to type MyDialogBar
class CMainFrame : public CMDIFrameWnd
{
... exisiting class members here ...
MyDialogBar m_wndDlgBar;
// change from type CDialogBar to new class
... exisiting class members here ...
};
The reason you are declaring a new class which is derived from CDialogBar is to give you some control over the bar. Remember, a DialogBar is
NOT a dialog!! However, you can implement a lot of functionality that you would normally have in a dialog because CDialogBar is a decendant of CWnd.
Only problem is, you have to manually implement the functionality that Class Wizard would otherwise insert for you such as message maps, etc.
In the simplest form, you can manipulate items in your dialog bar by using the GetDlgItem() function. For example, say you have inserted a list box control to your dialog bar resource with an ID of IDD_MYLIST. You can manipulate the list box like this:
// first get a pointer to the control
CListBox* myList = (CListBox*)m_wndDlgBar.GetDlgItem(IDD_MYLIST);
// now do something to the list
myList->AddString("Hello World!"

;
If you need any more help on this just let me know.
