Daily Archives: 2007/11/07

MFCUpdate: MFC now has a “Visual Manager” and will add “Office 2007 Ribbon” controls! And many more features!!!

Really great news for MFC developers!

Microsoft announced a hugh investment in MFC which is currently being finished and available in March 2008. It will be an add-on for VS2008. Next month there will be an Release Candidate (RC) available.

Here is just a small overview:

If you just recompile with VS2008, then you have the vista-common-controls (for example the new OpenFileDIalog; of course, you can also use the old-style dialog, if you want!).

If you change some small parts of your code, you can use the new visual manager. Several styles are currently available and you can also write your own visual manager to implement your own style! And the best: You can change the style during runtime!
Also the menu icons will be automatically displayed by looking at the toolbar icons!

Also by adding some code, you can use the Office 2007 Ribbon Controls! Customizing the Toolbar by the user! (of course, everything is highly customizable by the programmer, you always can disable these features). Commands-Routing and all other stuff are not changed! Just add some code and then you has then new styles.

Also Docking is now for free aviable in MFC (DockingPane)!

MS also made a strong commitment to native code. If Office will have a new UI, MFC will also be implementing this style in the next version.

And the best: All the UI controls are supported starting with Windows 2000 and just uses native code (so no need to have Office2007 or Vista to enable these features)!!!

If you changing the Theme in the UI-Settings of the OS, it depends on what Visual Manager have used. The “Windows-Visual-Manager” will follow the OS settings of the OS.

I have made some pictures from the session, you can download it here: http://blog.kalmbachnet.de/files/TechEd2007_MFCNext.zip (39 MB). Enjoy!

Just some small (funny) notes at the end:

  • Expression Blend is written in MFC! The main frame is MFC and only the content is WPF 😉
  • Most controls are “ported” from BGCSoft into MFC!
  • For Ribbon, there is currently no designer available, it must be done in code.
  • The VC++ team will put a video on Channel9 in the next hours/days, so you can also see this imporvements:

TechEd-Developer Session: VC++ and Windows Vista: A Natural Fit

Kate Gregory showed that C++/CLI is the best and sometimes the only (allowed) language to access all the Vista features.
In short:

  • Only in VC++ you can access all Vista features
  • Some Vista features are easier to access from VC++
  • Some Vista features are only accessible from VC++ 😉
  • Some Vista features must be written in native code (like PropertyHandler, ThumbnailHandler)
  • C++/CLI is a “natural” and “must have” tool to fully develop for Windows Vista
  • C++/CLI is the best language for InterOp

The first impressions about TechEd Developer / Great news about C++

Maybe my exüectatiosn were too high… in general I would say that most of the sessions do not go deep. Mostly they only touch the surface…

Of course, there are also some exceptions: All C++ sessions are realy great!

The first session was “What’s new in Visual C++ 2008”. Just a short overview:

  • Vista only: In the Project Properties under “Manifest” you now can explicite set the UAC-Level (asInvoker, highestAvailability, requireAdministrator); so no need to specify this “by hand”; if you upgrade your project it will by default generate an manifest with UAC set to “asInvoker”, so you do not face virtualization problems under Vista
  • Class designer for C++; but only for viewing; there is currently now two-way direction for editing in the class designer and reflection this changes in he code; but better than nothing…
  • Vista-only: Randomizing the base address; this allows vista to use a random base address at startup; this helps to prevent code-injection into the process; this is also on by default for all MS DLLs. Also you can mark your program that it can deal with “data execution prevention /NXCOMPAT)
  • Multiprocessor build for cl.exe! This is also great news! It will allow to speed up the build process even if you just have one project (in VS2005 multi processor support was only possible if you had many solutioons which did not depend on each other)
  • Incremental build for managed code
  • Many areas with performance improvements in VS2005, like: Load solution performance, editor/IntelliSense responsiveness

The second session was “Best practices for Native-Managed InterOp in VC++ 2008 ; also a short summary:

  • Introduction to STL.NET (STL which can be used with managed types); these system is faster than the .NET collections 😉
  • Marshaling Library (marshal_as<to> (from) ); this is a very exciting feature and can be extended with only implementations

So today, we can be look forward to see the two sessions about C++/CLI with Vista and MFC-Updates!

Stay tuned…