Re: How to I get the object for the address bar?
In MFC terms I think you have a dialog bar with a combo box on it. The
mainframe has a member variable (m_wndAddressDlgBar) for the dialog bar. To
get access to the CComboBox I suggest you put a function in CMainFrame,
something like this, to get a pointer to the dialog bar's child control.
CComboBox* CMainFrame::GetAddressCombo()
{
return m_wndAddressDlgBar.GetDlgItem(IDC_SOMETHING);
}
You will have to look up what you used for the ID of the combo box by
looking at its properties in the dialog editor.
"Daum" <Daum@discussions.microsoft.com> wrote in message
news:B272916B-9068-4AB0-87EA-2C6FC2E2D0A7@microsoft.com...
I created the address bar using the VC++ resource editor.
To create the address bar, I used "Dialog"->"IDD_DIALOGBAR".
And then, i inserted the address bar into the IDD_DIALOGBAR using the
dialog
controll tool.
After that, I made the dialog bar dock to the mainframe by inserting below
lines into "CMainFrame::OnCreate()"
if ( !m_wndAddressDlgBar.Create (this, IDD_ADDRESS_DIALOGBAR,
CBRS_TOP, AFX_IDW_CONTROLBAR_LAST - 1 ))
{
TRACE0("Failed to create the address dialogbar\n");
return -1; // fail to create
}
m_wndAddressDlgBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndAddressDlgBar);
Thank you.
Daum
"AliR" wrote:
What is an address bar? Is it a CToolbar, CRebar, or are we talking about
the address bar that comes with the HTMLCtrl?
Who creates this address bar?
AliR.
"Daum" <Daum@discussions.microsoft.com> wrote in message
news:40133D15-42F4-4513-9FD3-1E56D18D4163@microsoft.com...
Hello all,
I don't know if this is a stupid question, but please help me.
The mainframe of my application has:
- Address bar with a combo box
- Tool bar
- FORMVIEW Dialog.
I want to control the address bar(display string into the combo box in
the
address bar) from a FORMVIEW dialog event handler.
Because I don't know the object for the address bar, I couldn't do it.
How to I get the object for the combo box(IDC_COMBO_DIRECTORY) or
address
bar?
Do I need to send a message to the class of the address bar?
Please let me know how to do it.
- Daum
--
Scott McPhillips [VC++ MVP]