Click here to Skip to main content
15,889,867 members

Comments by suncuigang (Top 4 by date)

suncuigang 21-May-13 21:01pm View    
I found , when I use CToolbar,there was no this problem.But when using CMFCToolbar, it had this problem. I will debug step by step to check!
I want creating a MDI project,which has"Tabbed documents", "a toobar in mainframe EnableDocking CBRS_ALIGN_ANY ",and"a toolbar in each childframe Docking CBRS_ALIGN_LEFT ". When creating a MDI project, I choose"Tabbed documents" ,"use a menu bar and toolbar","user-defined toolbars and images","Personalized menu behavior".It is used CMFCToolbar default.
suncuigang 19-May-13 23:20pm View    
Hello,Karstenk.
I don't know why the m_wndChildToolBar can not docking anyway, even though I add

m_wndChildToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockPane(&m_wndChildToolBar);
in CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
Do you know?
suncuigang 17-May-13 2:21am View    
in the mainframe.cpp,
if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_wndToolBar.LoadToolBar(/*theApp.m_bHiColorIcons ? IDR_MAINFRAME_256 :*/ IDR_MAINFRAME))
I used IDR_MAINFRAME,the icons are visible.
seems the toolbar colors in mainframe and childframe must be same!
Thanks, Karstenk!
suncuigang 16-May-13 20:44pm View    
IDR_TOOLBAR1 is new created. It i with height 15,width 16 ,16 colors. It is located in res/toolbar1.bmp.
but after debuging, the images in the toolbar of chindframe are invisible.