Message 1 of 3
Closing a CAcUiDockControlBar

Not applicable
09-10-2002
07:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello!
I have a CAcUiDockControlBar which I have a CTreeCtrl and a CListCtrl
in. I use Create() to create the controlbar.
I'm using this to start/create it
extern CODEdit *gpDocBar;
CMDIFrameWnd *pAcadFrame = acedGetAcadFrame();
if (!gpDocBar)
{
gpDocBar = new CODEdit;
CAcModuleResourceOverride resOverride;
const char dlgName[] = "Editering av Objektdata";
gpDocBar->Create(pAcadFrame, dlgName);
gpDocBar->EnableDocking(CBRS_ALIGN_ANY);
gpDocBar->RestoreControlBar();
}
else
pAcadFrame->ShowControlBar(gpDocBar, TRUE, FALSE);
CODEdit is the CAcUiDocControlBar, and is declared global (.at the
moment anyway.)
with this code the TreeCtrl and the ListCtrl will contain the same
values as when I used the gpDocBar last. I don't want this! I want to
start with an empty TreeCtrl and an empty ListCtrl everytime I start
the controlbar.
So I added the OnClosing() method and did a DeleteAllItems() for both
the TreeCtrl and the ListCtrl. and then called
CAdUiDockControlBar::OnClosing(); like the manual says.
PROBLEM: The ControlBar will not close!
The OnClosing() will perform but the ControlBar is still open.
Anyone! What am I doing wrong??
// Anders
--
bool CODEdit::OnClosing()
{
m_wndTree.DeleteAllItems();
m_wndList->DeleteAllItems();
CAdUiDockControlBar::OnClosing();
return true;
}
I have a CAcUiDockControlBar which I have a CTreeCtrl and a CListCtrl
in. I use Create() to create the controlbar.
I'm using this to start/create it
extern CODEdit *gpDocBar;
CMDIFrameWnd *pAcadFrame = acedGetAcadFrame();
if (!gpDocBar)
{
gpDocBar = new CODEdit;
CAcModuleResourceOverride resOverride;
const char dlgName[] = "Editering av Objektdata";
gpDocBar->Create(pAcadFrame, dlgName);
gpDocBar->EnableDocking(CBRS_ALIGN_ANY);
gpDocBar->RestoreControlBar();
}
else
pAcadFrame->ShowControlBar(gpDocBar, TRUE, FALSE);
CODEdit is the CAcUiDocControlBar, and is declared global (.at the
moment anyway.)
with this code the TreeCtrl and the ListCtrl will contain the same
values as when I used the gpDocBar last. I don't want this! I want to
start with an empty TreeCtrl and an empty ListCtrl everytime I start
the controlbar.
So I added the OnClosing() method and did a DeleteAllItems() for both
the TreeCtrl and the ListCtrl. and then called
CAdUiDockControlBar::OnClosing(); like the manual says.
PROBLEM: The ControlBar will not close!
The OnClosing() will perform but the ControlBar is still open.
Anyone! What am I doing wrong??
// Anders
--
bool CODEdit::OnClosing()
{
m_wndTree.DeleteAllItems();
m_wndList->DeleteAllItems();
CAdUiDockControlBar::OnClosing();
return true;
}