I have an old style MFC MDI application. Now that VS 2010 has included a ribbon in VC++, I would like to upgrade my application with MFC ribbons. I also would like to give the user an option to retain the old style if he prefers to. That is the user should be able to switch between the classic view and the modern ribbon view while the application is running. Could you help me with achieving this please?
Many thanks.
There is on best walkthrough given by MSDN Walkthrough: Updating the MFC Scribble Application which may help you else provide your code or where exactly you are stuck.
Related
In Windows 10, you can activate different buttons (e.g. task view button, windows ink workspace button, contacts button) by opening the context menu of the taskbar.
This is something different than the classic tray icons, and similar to deskbands (which has been deprecated?).
An example of the contacts button:
How can one achieve this? Is there a API for this? Are there documents available?
I think that you might be interested in Shell Extensions/ Taskbar Extensions - Deskbands, please refer to following web-sides for more informations:
https://learn.microsoft.com/en-us/windows/desktop/shell/taskbar-extensions#deskbands
https://msdn.microsoft.com/en-us/library/windows/desktop/ff468984(v=vs.85).aspx
How to write a shell extension in C++?
https://msdn.microsoft.com/en-us/magazine/dd942846.aspx
Perhaps the Taskbar API of Windows should be helpful in your case. Please note that the explorer.exe would be responsible for loading your extension, so that writing it in C# might have some limitations due to different CLR runtimes loaded.
It's commonly called a tray icon or NotifyIcon.
The official class is still in Windows Forms, if you want to be more modern have a look here on what your options are in WPF.
I have two projects, an old project using the Win32 API that has an old toolbar using Win32 graphics and another one using MFC code with better graphics (I am creating a ribbon toolbar similar to the one that Microsoft Office uses). The MFC classes I use inherit from CDialogEx and CWinApp.
What I am trying to do is to place the ribbon toolbar in my Win32 window and replace the old one. I am already referencing the MFC project using it as a static library and can call the classes from my Win32 project but I can't get to show the new toolbar yet.
What do I need to do in order to achieve this?
It might be much easier to create the freamework with the MFC and move the old code into the new framework.
It is possible to create a MFC project without Doc/View architecture.
The MFC Ribbons will and can only live inside a CMFCFrameWnd that is part of a CWinAppEx... extracting just the ribbon code into a plain Win32 application should fail.
But there is also a Win32 Ribbon Framework. It might be much easier to implement this into your old Win32 project.
How to implement this is described here.
In Codeproject you find a sample how to use it.
I just wondering how Windows create this window?
I mean what styles applied to that window, I just want these styles on my project.
As info I use MS Visual C++ 2008.
Thanks
There's no easy way! There's no public API for using "the Windows 8 style", or the style of any other release. You'll just have to replicate it by hand, comparing it pixel-for-pixel against a screenshot. Then update your application with the next release of Windows!
Because they change the metrics of these sorts of dialogs with each release, they can't produce a public library for "system-themed dialogs", because Microsoft would then be unable to change the design for fear of breaking someone's application that maybe uses a bit too much text, for example.
I have never used MFC so far. I'd like to learn how creating a simple tabcontrol in a SDI application. I'am looking for a very beginner guide or a tutorial? Could you help me?
Thanks
I've not installed it on this machine, but as far as i remember, there is a wizard alowing you to create a dialog-based TabCtrl-Application. You could get all you ned to know from htere. Also you may find this Link useful:
http://www.codeguru.com/cpp/controls/controls/tabcontrols/article.php/c5239/Creating-a-CTabCtrl-Application.htm
Please bear in mind that the TabCtrl is just the tabs, not the space they show – this is a window that you have to make visible, so the usual approach is a couple of windows with the same screen location and the tabctrl makes one visible and hides the others by clicking on it.
I am writing a C++ application and I have a Login Box that's shown in a regular Dialog Box Frame. I see that some people can SKIN the entire dialog box and makes it look really nice. I was wondering if anyone can give me some pointers as to how to do that.
I'd need more details to give you a good answer.
The answer very much depends on which OS you're using and how you're programming your GUI (for example on Windows - plain Win32, MFC, ATL, Qt, Windows Forms, WPF etc etc).
If you're just using the Windows API here's a link to get you started.
http://www.codeproject.com/KB/dialog/skinstyle.aspx
Beware: custom skinning dialog boxes can be a very large task if you want to customise the look of every control as you end up writing very complicated custom controls.
Alternatively do you just want to make sure that your dialogs appear with Windows XP visual style rather than pre-XP style? This will require changes to your application to use the new common controls and visual style. Note that this changes the behaviour of some Windows APIs and can potentially have side effects (see ISOLATION_AWARE_ENABLED).