mfc-feature-pack

CMDIChildWnd look & feel on Windows-10

删除回忆录丶 提交于 2021-02-19 05:51:51
问题 I have an MDI application. It has been developed over the years. On Windows-7 everything looks native. When I start the application on windows-10, normal dialogs will have the windows-10 look & feel. But all child views still have the Windows-7 look & feel. I tried to change from CMDIChildWnd to CMDIChildWndEx but it made no difference to the window look & feel (except of another border style around the client rect). I do not want to change all child views to dock panes as it will change the

CMFCButton with Vista Style

六月ゝ 毕业季﹏ 提交于 2021-02-04 15:29:41
问题 I can't seem to get a CMFCButton to be displayed in Vista style in a dialog box application. I'm using VS2008 with MFC Feature Pack. Here are some steps to reproduce my problem: Create a new MFC Project; Specify a Dialog based project. Add two buttons to the main dialog. Add a variable for each button. Make one of the variables a CButton, the other one a CMFCButton. Compile and run. test app picture http://img7.imageshack.us/img7/3/testapp.png As you can see, the CButton has the correct style

Why is CMFCMenuBar not utilizing the accelerator table?

强颜欢笑 提交于 2020-01-11 03:34:07
问题 In a doc/view project using VS2008, a MFCMenuBar seems to load the correct MENU resource (IDR_MAINFRAME) from the project, since adding and removing menu items is reflected in the menu's UI. It even appends the accelerators to the default menu items (e.g. Ctrl+O to the Open... item). However, the accelerator table (IDR_MAINFRAME) doesn't seem to be connected to the menu. Changing the default Ctrl+O for Open... to something like Ctrl+7 doesn't work. The Ctrl+O is still appended to the Open...

Derive a custom class from CMFCVisualManagerOffice2007

别说谁变了你拦得住时间么 提交于 2020-01-06 15:18:50
问题 I was trying to derive a custom class from CMFCVisualManagerOffice2007. Can you suggest me steps to be followed in order to derive a CCustomMFCVisualManagerOffice2007? I am getting following error: error C2248: 'CMFCVisualManagerOffice2007::CMFCVisualManagerOffice2007': cannot access protected member declared in class 'CMFCVisualManagerOffice2007' I am looking for something on the lines of: MFC CMFCVisualManager Override 来源: https://stackoverflow.com/questions/42635165/derive-a-custom-class

MFC Feature Pack - How to add accelerators without deleting user's customization

陌路散爱 提交于 2019-12-31 03:09:04
问题 I want to add new accelerators to my MFC Feature Pack application. The problem is the app loads the accelerators already stored in the registry, thus disabling the new ones I've added. I know I could delete the Keyboard-# key in the registry, but that would delete any customization made to the accelerators by the user. Is there any way to add the new accelerators to the ones posibly defined by the users? 来源: https://stackoverflow.com/questions/6568610/mfc-feature-pack-how-to-add-accelerators

Icons on menus of MFC Feature Pack classes

自古美人都是妖i 提交于 2019-12-30 04:32:25
问题 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 to custom draw the icons in front of the menu bar items. It's not very convenient, having to implement icon drawing in 2008, but it works. For the others I haven

Resizing docked pane in STOCK Visual Studio 2012 MFC app leaves artifacts under Windows 10, why?

你。 提交于 2019-12-25 02:55:36
问题 I support several Visual Studio 2012 MFC applications, and all of them are exhibiting the same bad behavior on Windows 10 only: resizing a docked pane (via mouse) leaves artifacts, i.e. garbage on the screen. The garbage looks like a series of lines that correspond to the intermediate positions of the pane edge being dragged. I can reproduce this behavior with a stock VS 2012 application, which proves that it's got nothing to do with my code. Here are simple instructions for replicating the

VS 2008 MFC Feature Pack - How do I

落爺英雄遲暮 提交于 2019-12-25 00:26:11
问题 I have an application I'm writing using the MFC Feature pack. It uses Document/View. Since these classes are derived from "normal" MFC classes, these questions may not be Feature Pack specific. When a change is made, I add an asterisk * to the name on the tab, and the word (modified) to the main window title using the following code: tabval = "Report_" + pDoc->rptData.reportId.Strip(); winval = tabval; if (changed) { tabval += " *"; winval += " (modified)"; } frame->SetTitle(tabval); frame-

Ribbon button items with large images and checkboxes

╄→гoц情女王★ 提交于 2019-12-24 12:35:13
问题 I've got a menu attached to a split ribbon button like this (VS2008, Feature Pack): std::auto_ptr<CMFCRibbonButton> apBtn3(new CMFCRibbonButton(ID_RIBBON_BTN_3, _T("Split Button"), 2, 2)); apBtn3->SetMenu(IDR_RIBBON_MENU_1, TRUE); apBtn3->SetAlwaysLargeImage(); apBtn3->RemoveSubItem(0); std::auto_ptr<CMFCRibbonButton> apSubButton(new CMFCRibbonButton(ID_RIBBON_MBTN_1, _T("Item 1"), 2, 2)); apSubButton->SetAlwaysLargeImage(); apBtn3->AddSubItem(apSubButton.release(), 0); pPanel1->Add(apBtn3

How to set a CMFCPropertyListCtrl's column width?

自闭症网瘾萝莉.ら 提交于 2019-12-23 12:13:50
问题 I'm adding properties to an object of type CMFCPropertyGridCtrl like this: myPropertyListCtrl.AddProperty( new CMFCPropertyGridProperty( _T("Name"), foo.GetName()) ); The result is that only the second column is visible but not the first that should contain "Name". I found CMFCPropertyGridCtrl::GetPropertyColumnWidth() but there appears to be no corresponding Set... method... I looked at the NewControls sample, in which the column sizing appears to be fully automatic. However, I couldn't find