void CMainFrame::OnViewDlgbar() 
{
if (m_wndDlgBar.IsFloating())
{
CFrameWnd* pFrame = m_wndDlgBar.GetParentFrame();
if ((pFrame != NULL) && ::IsWindow(pFrame->m_hWnd))
pFrame->ShowWindow(!pFrame->IsWindowVisible() ? SW_SHOW : SW_HIDE);
}
else
{
m_wndDlgBar.ShowWindow(!m_wndDlgBar.IsWindowVisible() ? SW_SHOW : SW_HIDE);
RecalcLayout();
}
}