Bonjour à tous,
je crée 2 toolbar avec
(Elles sont invisibles au départ)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 if (!m_wndToolBar1.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_DISABLED | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_FLOAT_MULTI | CBRS_BORDER_3D ) || !m_wndToolBar1.LoadToolBar(IDR_TRAJECTOIRES_1A4)) { TRACE0("Failed to create toolbar1\n"); return -1; // fail to create } if (!m_wndToolBar2.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_DISABLED | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_BORDER_3D ) || !m_wndToolBar2.LoadToolBar(IDR_TRAJECTOIRE_MANUELLE)) { TRACE0("Failed to create toolbar2\n"); return -1; // fail to create } m_wndToolBar1.EnableDocking(CBRS_ALIGN_TOP); m_wndToolBar2.EnableDocking(CBRS_ALIGN_TOP); EnableDocking(CBRS_ALIGN_TOP); DockControlBar(&m_wndToolBar1,AFX_IDW_DOCKBAR_TOP) DockControlBar(&m_wndToolBar2,AFX_IDW_DOCKBAR_TOP)
Puis je les fais apparaitre par
ou
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 pMainWindow->ShowControlBar(ToolBarTrajectoire1a4, TRUE,TRUE ); ToolBarTrajectoire1a4->SetWindowPos(NULL,0,30,64,32,SWP_SHOWWINDOW);pour avoir l'une, l'autre ou les 2 ensemble.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 pMainWindow->ShowControlBar(ToolBarTrajectoireManuelle, TRUE,TRUE ); ToolBarTrajectoireManuelle->SetWindowPos(NULL,600,30,64,32,SWP_SHOWWINDOW);
Mon problème : quand j'affiche les 2 en même temps,le position latérale est correcte, mais elle s'affichent sur deux lignes différentes, alors que je les voudrais sur la même ligne
Comment corriger ça ?
Merci d'avance
Philippe
Partager