mfc-feature-pack

Find out which colours are in use when using the MFC Feature pack in Office 2007 style

I'm updating some of our legacy C++ code to use the "MFC feature pack" that Microsoft released for Visual Studio 2008. We've used the new classes to derive our application from CFrameWndEx, and are applying the Office 2007 styles to give our application a more modern appearance. This gives us gradient filled window titles, status bars et...

Icons on menus of MFC Feature Pack classes

There are three places where menus show up in the new MFC functionality (Feature Pack): In menu bars (CMFCMenuBar) In popup menus (CMFCPopupMenu) In the 'dropdown menu' version of CMFCButton I want to put icons (high-color and with transparancy) in the menus in all of them. I have found CFrameWndEx::OnDrawMenuImage() which I can use ...

Can you use CMFCVisualManager with a dialog based application?

Can you use CMFCVisualManager with a dialog based application to change the applications appearance? If so how is it done? The idea is to change the shape, colour etc. of controls such as push buttons using the MFC Feature Pack released with MSVC 2008. ...

How to use CMFCListCtrl with CListView?

I'd like to use the new CMFCListCtrl features with my CListView class (and, of course, the new CMFCHeaderCtrl inside it). Unfortunately, you can't use Attach() or SubclassWindow() because the SysListView32 window is already associated with a CListView object. Do I have to override CListView's OnCmdMsg() and route all messages to my own ...

Converting registry access to db calls from MFC Feature Pack

We may start converting an old VS2003 MFC project to use the fancy new features provided by the MFC Feature Pack and VS2008. Several of the new UI controls would be very nice except for one thing - they automatically save their information to the registry. I don't have a problem with the registry, but for the multiple environments the us...

Creating Docking Panes in CView instead of CMainFrame

When creating an MDI Application with "Visual Studio" style using the AppWizard of VS2008 (plus Feature Pack), the CMainFrame class gets a method CreateDockingWindows(). Since I don't want all panes to be always visible but display them depending on the type of the active document, I made those windows to members of my views and also mo...

How do I display a tooltip for a CMFCRibbonButton in the status bar?

I have a CMFCRibbonStatusBar in my mainframe to which I add a CMFCRibbonButtonsGroup which again has a CMFCRibbonButton. This button has the same ID as a menu entry. Creating the button is done as follows: CMFCRibbonButtonsGroup* pBGroup = new CMFCRibbonButtonsGroup(); CMFCToolBarImages images; images.SetImageSize(CSize(32, 16)); // N...

How do I display custom tooltips in a CTreeCtrl?

I have a class derived from CTreeCtrl. In OnCreate() I replace the default CToolTipCtrl object with a custom one: int CMyTreeCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CTreeCtrl::OnCreate(lpCreateStruct) == -1) return -1; // Replace tool tip with our own which will // ask us for the text to display with a T...

CMFCToolTipCtrl or CTooltipManager examples?

Has anyone tried using these new VS2008 MFC classes yet? I can't seem to find any examples anywhere. Even the VS2008 samples(1) don't mention these classes. (They use CToolTip.) (1) Update: My mistake. I had downloaded the non-SP1 samples. I see that the SP1 samples have samples specifically for the 2008 Feature Pack, including the DlgT...

How can I place a MFC CFormView inside a CDockablePane?

Hello all, How can I place a MFC CFormView inside a CDockablePane which was introduced in the VS 2008 MFC Feature Pack? Thanks. ...

Should the new MFC Feature pack contols appear in VS toolbox

I'm trying to use some of the new MFC feature pack controls on an existing MFC app, with VS2008 SP1. None of the new controls appear in the dialog-editor toolbox. Should I expect them to be there, and if so, do people have any suggestion for how to get them to appear? ...

Dynamically resizing CMFCPropertySheet with PropSheetLook_OneNoteTabs style

Hi everybody, I'm trying to resize dynamically a CMFCPropertySheet to add a custom control at the bottom of each page. As all Property Pages are not of the same height, I have a mechanism to increase the size if necessary. For this, I have overridden the OnActivatePage method and by using SetWindowPos, I can resize the sheet, first, then...

CVSListBox notification after delete

I've just added one of the new (MFC Feature Pack) CVSListBox controls to a project. The list of items in the control is tracked by some other objects in my application, so I need to take lots of notifications from the list-box when anything changes so that I can update other stuff. For those that don't know the control, there is a butt...

CMFCRebar problem

Hello and thanks in advance. I am trying to use some classes from the MFC Feature Pack to improve the look&feel of my MFC application. In my application I use one CReBar object to dock three different toolbars. I have updated the class of this object to use CMFCReBar but it doesn´t look well when using some visual styles. It seems a p...

MFC DockablePane not floating or hiding

Is there any way to make a MFC DockablePane (from the new Feature Pack) that is docked in a window not able to float or to hide (and even disable the context menu that allows the user to select the states - dockable, float, hide etc.) What I basically want is to have 3 panes on a window that can change their horizontal dimensions, but n...

Disable/Enable Ribbon Buttons for MFC Feature Pack

I am using the MFC Feature Pack and I have some buttons on a ribbon bar, instances of CMFCRibbonButton. The problem is that I would like to enable and disable some of them in certain conditions, but at runtime. How can I do this? because there is no specific method for this...I heard that a solution would be to attach/detach the event ha...

Is the MS Ribbon/Office UI License worth worrying about?

Imagine I want to create an application which is very similar to MS Word 2007, using C++ in VS2008 and the MFC Feature Pack. For the ribbon, there are 3 options available to me: Use the ribbon from MFC Feature Pack without acquiring a license. Probably dodgy in the long run. You're all right until your product becomes a global success,...

Is it possible to remove CMFCRibbonPanel from CMFCRibbonCategory?

Hi, i'm looking for a trick to remove an CMFCRibbonPanel from CMFCRibbonCategory. There is just AddPanel() function in the CMFCRibbonCategory, but no RemovePanel(). Do I really need to rebuild my whole CMFCRibbonCategory to do this? EDIT: Just for clarification, what i want is to remove panel itself from the category and not the elem...

Changing image of a menu button in a CMFCToolbar

Hello, I have a menu button inside a CMFCToolbar and I would like to replace the bitmap of the button each time a different entry is selected in the menu as each entry has its own icon. I succeed in changing the icon using CMFCToolBarMenuButton::SetImage but it changes the icon in the menu entry too... Too bad. Here is a sample...

Adding drop down arrows to CMFCToolBar buttons

Can anyone explain how to add dropdown arrows to CMFCToolBar toolbar buttons - like for undo/redo buttons. We had this with CToolBar by using the TBSTYLE_EX_DRAWDDARROWS style and TBN_DROPDOWN notification. This doesn't seem to work with CMFCToolBar. These dropdown arrows i believe are added to the VisualStudioDemo MFC feature pack de...