|
Prev: Dynamically creating CDockablePanes
Next: Executing applications across a network (possible OT)
From: David Webber on 2 May 2008 10:56 Recently (28 April) I reported problems with toolbars and common-controls-6 in an MFC9.0 MDI application running under Vista. The appearance is unsatisfactory even in a vanilla MDI app created with the VS2008 app wizard. The toolbar creation line it gives you is: 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(IDR_MAINFRAME)) {... which results in the ugly appearance: http://www.mozart.co.uk/questions/testproject-toolbar.gif The cure is to replace TBSTYLE_FLAT by TBSTYLE_FLAT|TBSTYLE_TRANSPARENT and all is well: http://www.mozart.co.uk/questions/testproject-toolbar-fixed.gif It used to be (IIRC) that either of TBSTYLE_FLAT or TBSTYLE_TRANSPARENT had the desired effect with common controls 6, but it appears that you need both (or at least TBSTYLE_TRANSPARENT) in MFC9.0. I assume it is an oversight in the app wizard code that it doesn't do this. Anyway, that's one problem sorted (I hope). Onward and upward! Dave -- David Webber Author of 'Mozart the Music Processor' http://www.mozart.co.uk For discussion/support see http://www.mozart.co.uk/mozartists/mailinglist.htm
From: Ajay Kalra on 2 May 2008 14:59 On May 2, 10:56 am, "David Webber" <d...(a)musical-dot-demon-dot-co.uk> wrote: > Recently (28 April) I reported problems with toolbars and common-controls-6 > in an MFC9.0 MDI application running under Vista. > > The appearance is unsatisfactory even in a vanilla MDI app created with the > VS2008 app wizard. > > The toolbar creation line it gives you is: > > 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(IDR_MAINFRAME)) > {... > > which results in the ugly appearance: > > http://www.mozart.co.uk/questions/testproject-toolbar.gif > > The cure is to replace TBSTYLE_FLAT by > > TBSTYLE_FLAT|TBSTYLE_TRANSPARENT > > and all is well: > > http://www.mozart.co.uk/questions/testproject-toolbar-fixed.gif > > It used to be (IIRC) that either of TBSTYLE_FLAT or TBSTYLE_TRANSPARENT had > the desired effect with common controls 6, but it appears that you need both > (or at least TBSTYLE_TRANSPARENT) in MFC9.0. I assume it is an oversight > in the app wizard code that it doesn't do this. > > Anyway, that's one problem sorted (I hope). Onward and upward! > > Dave > -- > David Webber > Author of 'Mozart the Music Processor'http://www.mozart.co.uk > For discussion/support seehttp://www.mozart.co.uk/mozartists/mailinglist.htm Looks like you are the one of the chosen ones who is brave enough to try new functionality. -- Ajay
|
Pages: 1 Prev: Dynamically creating CDockablePanes Next: Executing applications across a network (possible OT) |