Hi,
I have 2 separate dockable panes in my application
I can remove close button in each CDockablePane by removing the flags "AFX_CBRS_CLOSE" in the create function.
If they are separated on frame, they are not having close button, but as soon as I combine them into the same tabs, the close button are showing up.
Please help me.
Thanks.
What I have tried:
To resolve this problem I overrode the function virtual CTabbedPane*CreateTabbedPane(); in each subclassed dockablepane class.
CTabbedPane* CClassView::CreateTabbedPane()
{
CTabbedPane* pTabbedPane = CDockablePane::CreateTabbedPane();
ASSERT_VALID(pTabbedPane);
#define AFX_NON_CLOSE_DOCKING_PANE_STYLEAFX_CBRS_FLOAT | AFX_CBRS_RESIZE | AFX_CBRS_AUTOHIDE
pTabbedPane->SetControlBarStyle(AFX_NON_CLOSE_DOCKING_PANE_STYLE);
pTabbedPane->RecalcLayout();
return pTabbedPane;
}
After clearing the registry setting, When executing the application first time, the tabbed pane which contains multiple dockablepanes has no close button.
When just reopening the application without doing anything on it, the tabbed pane which contains multiple dockable panes has close button.
I shared the sample application created in VS2008 in the below onedrive path.
https://aspiresysinc-my.sharepoint.com/:u:/g/personal/sujitha_ramamoorthy_aspiresys_com/EXpl4YmZ9JlAqTz4w_YKIJsBcOziO9tyNsqF9UFBub8-0w?e=dntvIa
In my sample application the tabbedpane has 2 dockable panes named fileview and classview.
In vs2015 also I am facing same problem.
I dont want to clear the registry settings each time before opening the application.