mfc-feature-pack

Docking control bars/panes to CMDIFrameWndEx?

In one of our applications I've used some of the MFC classes to allow docking a sidebar window, approximately like so: CDialogBar* bar = new CDialogBar; bar->Create(this, IDD, WS_CHILD | WS_VISIBLE | CBRS_RIGHT | CBRS_TOOLTIPS, IDD)); bar->EnableDocking(CBRS_ALIGN_ANY); EnableDocking(CBRS_ALIGN_RIGHT | CBRS_ALIGN_LEFT); DockControlBar(b...

Cannot edit labels in a CListCtrl

I'm building a project with MFC Feature Pack. Is this project I have a window which includes a CView, which includes a CListCtrl-derived object. The object includes the LVS_EDITLABELS flag. Somehow I cannot edit the CListCtrl icon labels by two-time clicking (not double-clicking) on the icon label. After I select the item with a single ...

How can I add a ribbon menu to an existing MFC application?

Microsoft Visual C++ 2008 Feature Pack has ribbon menu support. Is it possible to make use of that in an existing MFC application that was not created with a ribbon menu? ...

Tracing MFC message handling

Trying to upgrade an MFC app to use the new MFC feature pack, we are loosing the messages from a context menu. The menu appears and can be clicked, but the message seems not to be handled anywhere. We overrode OnCmdMsg() in lots of places but to no avail, the context menu's command message are not caught. Is there a way, tool, or approa...

How do I make a CMFCToolBar recognize image masks?

I have a CMFCToolBar-derived class and an insance thereof is the member of a CDockablePane-derived class. I looked at the VisualStudioDemo sample to see how it's done and have this so far: int CMyPane::OnCreate(LPCREATESTRUCT lpCreateStruct) { // Removed all "return -1 on error" code for better readability CDockablePane::OnCre...

How to remove the close button from an MFC caption bar

Is there an easy way to remove the close button from an MFC feature pack caption bar? (I don't mean the window caption, I'm talking about the little information bar that can appear at the top of the client area in these apps - ie:CMFCCaptionBar) Thanks ...

How do I dynamically change the text of a CMFCRibbonLabel

My CMDIFrameWndEx derived main frame window uses a CMFCRibbonStatusBar to which I add a CMFCRibbonLabel. I'd like to change the text of this label at runtime: m_pLabel->SetText(description); m_pLabel->Redraw(); It only updates the text but not the rectangle in which to draw it. So if the original text was too short, the new string won...

How to modify the tool rect of a CToolTipCtrl?

This question is related to this one. In a CDockablePane derived class I have a CTreeCtrl member for which I add a ToolTip in OnCreate(): int CMyPane::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CDockablePane::OnCreate(lpCreateStruct) == -1) return -1; const DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | W...

Is it possible to add CMFCToolBar to a dialog?

Hi! I just tryed the standard way for adding CToolbar to a dialog on the new CMFCToolBar. But it doesn't work. Befor I dip into the new implementation, I want to know if it actually possible? ...

MFC feature pack - dockable file explorer and dockable properties window

I'm new to MFC and is a bit confused with the new features of "MFC feature pack." Through the wizard I now have an application that looks like an IDE - has a dockable file explorer on the left side and a dockable properties window on the right side. I'm already able to get the selected items on the file explorer window through ON_WM_LBUT...

MFC feature pack - Couldn't show the dockable pane once closed

By using the wizard, and selecting Office 2007 style, you can come up with a UI that looks like an IDE - a dockable file explorer pane on the left, and a dockable properties pane on the right. However, when you close these dockable panes, there's no way you can show them again. Even if you recompile the project. I searched through so...

MFC feature pack - how to update the property grid control

I'm new to MFC and is a bit confused with the new features of "MFC feature pack." Through the wizard I now have an application that looks like an IDE - has a dockable file explorer on the left side and a dockable properties window on the right side. I'm able to get the selected items on the file explorer window through ON_WM_LBUTTONDBLCL...

MFC feature pack - How to get the font, style and size using CMFCPropertyGridProperty::GetValue

Hi All, By using CMFCPropertyGridProperty::GetValue I'm able to get the contents of the property grid. I have one property though that gets the font, where when you click on it, shows a dialog box to select the font, size and style. Using this code: CMFCPropertyGridProperty* pCurSel = m_wndPropList.GetCurSel(); CString test = pCurSe...

MFC Feature Pack Bug? Ribbon Based GUI does not restore after hibernation (sleep mode)

Hello, I've forced with a possible bug feature of MFC Feature Pack under Windows Vista. It can be easily recreated: Create a new SDI app using MFC Feature Pack (with Ribbon based interface). You can also add some floating panels if you want; Do not change anything, just build a Release; Close the Visual Studio, run the application and...

Error in CFont?

Hi All, I have a property grid on the right side of my app. By clicking on a tree item on the left side, properties of the clicked item are shown on the right side. However, whenever I change the value on the property grid control, the items turn in BOLD format and I get an error pointing to line 154 of MFC's afxpropertygridtooltipctrl....

MFC Tabbed Documents - how to enable middle-mouse button to close document?

If you create a new MFC application (with MFC Feature Pack), and using all the defaults, click Finish. It creates an MDI application with the new "Tabbed Documents" style. I think these are great except it really annoys me that I can't close a Tabbed Document window by middle-clicking on the tab. This is possible in Firefox, IE, Chro...

MFC PropertyGrid notify when a value has been changed

I have the MFC Feature Pack and I use the PropertyGrid in VS C++. Now I want to call a function of the dialog when each Property of the Property grid is changed. When I catch the WM_PROPERTYCHANGED message it only triggers if I press return or klick out of the property after editing. But I want this function to trigger after each change...

How to attach CFormView derived class to CMFCTabCrtl?

I have created MFC MDI project with base class CFormView, ribbon, caption bar etc. In CMainFrame, OnCreate() calls EnableMDITabbedGroups() which automatically adds one tab and attaches CMyProjectView view. Now I want to add second tab and attach second view to that tab. I created new dialog and added CFormView derived class to it. Her...

How to refresh the CMFCRibbonBar after adding/updating an item

After adding a ribbon item, or calling a method that updates an item, the ribbon does not refresh correctly. Sometimes it's OK after resizing the window but most of the time the panel is in a collapsed state. I tried all the functions I could think of, ReposPanels, RecalcWidths, RecalcLayout etc etc but nothing worked... ...

How to get the font size from CMFCPropertyFontProperty

Hi All, I'm using this code block to get the font name, style and size selected by the user from the font dialog of CMFCPropertyFontProperty control. I'm already able to get the name and the style, but the size seems to return a different value. *CMFCPropertyGridProperty pCurSel = m_wndPropList.GetCurSel(); CMFCPropertyGridFontProper...