CXTToolBar in a CFormView |
Post Reply |
Author | |
spike
Groupie Joined: 13 May 2003 Location: United States Status: Offline Points: 48 |
Post Options
Thanks(0)
Posted: 13 May 2003 at 9:36am |
I added the following code to a form view to add a toolbar to the top of the form... int CProjectGenInfoFormView::OnCreate(LPCREATESTRUCT lpCreateStruct) CImageList imageList; m_wndToolBar.CreateEx(this, TBSTYLE_FLAT | TBSTYLE_LIST | TBSTYLE_TRANSPARENT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); //AddButton is my own function, works ok m_wndToolBar.AddButton( 0, ID_PROJECTGENINFO_NEW, IDI_ICON1, "&New" ); m_wndToolBar.MoveWindow( 2, 2, 400, 32 ); }
The problem is that the toolbar does not become enabled until the View is activated, once the view is deactivated the toolbar is deactivated. Is there a way to keep it activated at all times?
Thanks |
|
kstowell
Admin Group Joined: 25 January 2003 Location: MIchigan, USA Status: Offline Points: 496 |
Post Options
Thanks(0)
|
Hello, Take a look at the FlatTabView sample project. You need to create your toolbar as a child of the CMDIChildWnd for your view to do this correctly. See CChildFrame::OnCreate for more details...hope this helps. Best regards, |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |