|  | 
| Dock CXTPToolBar at bottom of CMDIChildWn | 
| Post Reply   | 
| Author | |
| CamG   Newbie   Joined: 28 February 2004 Status: Offline Points: 4 |  Post Options  Thanks(0)  Quote  Reply  Topic: Dock CXTPToolBar at bottom of CMDIChildWn Posted: 28 February 2004 at 9:09pm | 
| Scenario: MDI application, want to dock toolbar at bottom of child window. CChildFrame is derived from CMDIChildWnd, and m_wndToolBar is a CXTPToolBar. Code below results in toolbar docked at top - anyone with any ideas as to why? I even threw in a call to RepositionBars() for good measure. 
 intCChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { 
 
 } Edited by CamG | |
|  | |
| SuperMario   Senior Member     Joined: 14 February 2004 Status: Offline Points: 18057 |  Post Options  Thanks(0)  Quote  Reply  Posted: 28 February 2004 at 11:16pm | 
| 
   Are you looking to have one toolbar that is docked at the bottom of the
main MDI form that will be under the child window?  Or do you want
a separate toolbar for each child window that is docked to the bottom
of each window?
    | |
|  | |
| CamG   Newbie   Joined: 28 February 2004 Status: Offline Points: 4 |  Post Options  Thanks(0)  Quote  Reply  Posted: 28 February 2004 at 11:36pm | 
| One separate toolbar per child window, docked and fixed (no grab handle, customisation, etc.). I have several doc views, and the view loaded into the child window will set the toolbar's configuration (i.e. selects which toolbar resource is loaded). | |
|  | |
| CamG   Newbie   Joined: 28 February 2004 Status: Offline Points: 4 |  Post Options  Thanks(0)  Quote  Reply  Posted: 29 February 2004 at 2:57am | 
| Came up with another approach which gives better results, but not quite right yet... int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)  CXTPCommandBars* pCommandBars = CXTPCommandBars::CreateCommandBars();   pCommandBars->GetCommandBarsOptions()->bSyncFloa tingBars = TRUE;      // Create ToolBar  if (!pToolBar || !pToolBar->LoadToolBar(IDR_CHILDFRAME))  pToolBar->ModifyStyle(CBRS_GRIPPER, 0); The toolbar is now a proper child of the MDIChildWnd and is docked bottom, but hiding the gripper and customise toolbar button is proving to be problematic. The call to pToolBar->ModifyStyle(CBRS_GRIPPER, 0) has no effect. 
 | |
|  | |
| Oleg   Senior Member   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |  Post Options  Thanks(0)  Quote  Reply  Posted: 04 March 2004 at 12:56pm | 
| call ModifyBarStyle instead ModifyStyle. set XTP_COMMANDBARS_OPTIONS::bShowExpandButtonAlways = FALSE | |
| 
     Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS | |
|  | |
| 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 |