Making your application sparkle with Windows 7


The launch of Windows 7 is just around the corner.  Whether you prefer managed or unmanaged development, you can take advantage of Windows 7 features with new APIs and libraries to make your application shine.


 


Multi-Touch


Touch-based interfaces allow users to interact with applications in a more intuitive way.  Windows 7 introduces multi-touch input and manipulation processing through Windows Touch. 


 


For native C++ developers, MFC now supports using a touch-enabled interface.  MFC will do much of the heavy lifting: it listens for touch-related messages from Windows and calls out to a number of virtual functions to handle them.  Developers merely need to register for touch input, set the gesture configuration, and override these virtual methods as required to touch-enable their application.


WPF 4 includes object model additions for touch interfaces so managed code developers can easily add touch support to their applications as well. Multiple finger input will be exposed through existing and new input events, while new manipulation and inertia events will be exposed for developers to consume.


 


Ribbon


Adding a Ribbon to your application can help organize your commands, tasks, and menus in a friendly way that makes it easier for your customers to find what they’re looking for.  Whether your application is written in Win32, MFC, or WPF, new controls and APIs will help you add a Ribbon to your application.


 


If you write Win32 applications, the Ribbon framework provides a set of APIs for creating a Ribbon for your application.  You can find out more about the Windows Ribbon Framework for Win32 here.


 


Visual Studio 2008 SP1 added support for an Office “look and feel” Ribbon UI to MFC applications.  Visual Studio 2010 adds “look and feel” support for the Windows Ribbon, including an MFC Ribbon designer to make creating and editing ribbons much easier.  An XML format for persisting Ribbon designs simplifies UI development by removing the need to “design in code”.


 


Ribbon Designer 


 


The new WPF Ribbon Control will be released out of band around the same time as WPF 4 through the Office UI Licensing site.  You can find instructions on downloading the WPF Ribbon (currently in Preview) here.  The WPF Ribbon will feature skins for Windows 7 and Office and all the standard Ribbon features that users are familiar with, including tabs and groups, dynamic resizing, quick access toolbar, application menu, contextual tabs, key tips, and more!   The Ribbon will remain available as a separate, standalone assembly.


 


Location


Windows 7 features the Location platform, which makes it easy to write applications that can make use of the user’s location.  The Location platform opens the doors to some interesting application scenarios – especially on mobile computers.  For example, a location-aware application might use the current location to show the user nearby restaurants or shops, or an instant messaging or email application might tag messages with the sender’s location.  


 


The Location platform provides a way for location devices, such as GPS and WWAN radios, to integrate with Windows and includes an API that applications can use to determine the current location of the computer.  Because the Location API exposes its functionality through COM interfaces, C++ programmers and scripting language programmers alike can take advantage of it.  The Windows 7 SDK includes samples and documentation to help you build location-aware applications.  Find out more about the COM Location API on MSDN. 


 


In addition to the COM Location API, .NET Framework 4 will include built-in managed APIs for location, making it easy for .NET applications to take advantage of Windows 7’s location capabilities.


 


Shell Integration


Windows 7’s Shell enhancements empower application authors to provide a richer integrated user experience.  Jump Lists provide access to contextual startup tasks and files available to the applications.  For instance, right-clicking on the Outlook icon will show the mail messages you’ve recently opened in the Jump List:



 


Jump Lists 


 


The new taskbar is less cluttered and can convey more information at a glance.  The taskbar allow you to pin any program to the taskbar or rearrange the icons on the taskbar by clicking and dragging.  Aero thumbnails, which appear when you hover over an icon in the taskbar, support view customization and user commands.  Below is an Aero thumbnail that supports commands for controlling media playback.


 



Aero thumbnail user controls 


 


MFC adds support for new Windows 7 shell features.  By default, files opened by an MFC application through the “File Open” dialog will be added to your recent files Jump List.  If you wish to override the default behavior, MFC also provides APIs that allow you to customize the contents of your application’s Jump List.  MFC has also added support for High DPI and many of the new Windows dialog features. Below, the Open File dialog has been customized with additional controls:



 


Customizing the Open File dialog 


 


Adding MFC support for Search, Preview and Thumbnails was an obvious choice. Now you can search your MFC documents in Explorer’s search field and see Icons and Previews just like Office applications. 


 


Search


 


If your application’s installer needs to access or update files that may be locked or in use, Restart Manager can handle application shutdown and restart, or eliminate or reduce the number of system restarts required for an install.  With just a few lines of code, you get full Restart Manager support with automatic timed backup of currently opened documents. MFC has added support for the Transactional File System in ATL as well.


 


These new MFC features will be available in Visual Studio 2010.  To take advantage of some of these features (such as Jump Lists), you will only need to recompile to get the updated user experience, while for others (such as Windows Touch or Restart Manager support) you will need to add a few lines of new code to incorporate new functionality.


 


WPF 4 allows you to use Windows 7’s new Shell features in your WPF applications as well. WPF 4 integrates Windows 7 Jump List functionality, including Tasks, Items, Recent and Frequent Lists, and Custom Categories. Windows 7 taskbar integration in WPF 4 includes progress bars, overlay icons, thumbnail buttons with command support, description text, and Desktop Window Manager (DWM) thumbnail clipping.


 


Learn More


This is just a taste of the ways you can build great Windows 7 applications.  For more information, visit the Windows Team Blog and MSDN’s Windows 7 Developer Guide.


 


Namaste!

Comments (11)

  1. I love the Ribbon feature.  It’s surprising that Microsoft would lend that UI to dev.

  2. Mayanja says:

    No support for Windows Forms? Very dissapointing.

  3. Lindsay says:

    Yeah I love the ribbon feature too.

  4. Rahul Kulkarni says:

    Great feature makes forms look crisp. Finally we have the Ribbon.

  5. John says:

    Will the WPF Ribbon Control work in Silverlight 3 or later?

  6. phuff says:

    John, check out the Silverlight Ribbon control project on CodePlex: http://www.codeplex.com/silverlightribbon.  Enjoy!

    Polita Paulus

    Developer Division

    Microsoft

  7. The Ribbon addition is great,

    what about a DockPanel control that has the same look and feel as the one in VisualStudio??

  8. Alex says:

    >Adding a Ribbon to your application can >help organize your commands, tasks, and >menus in a friendly way that makes it >easier for your customers to find what >they’re looking for.

    Suppose there is a product, say WYSIWYG text editor. Suppose it was firstly released in 19xx. So in 2007 users know all its commands, tasks, menus and shortcuts.

    Bang! And a couple of managers decide to help to millions of users in finding out what they’re looking for.

    So. Those who got accustomed to use old UI can do almost nothing with new one.

    Its great, cause for a small fee they may comlete some trainings and earn

    certificates to use new stuff!

    Let’s see.

    If 5$ per certificate goes to MS, than they’ll get 5000000$ for a million. And don’t forget that MS Office itself is not free to.

    And when the World will learn how to eat the Ribbon feature MS managers will find some other thing to "simplify your customers blah-blah-blah".

    Thanx to MS cause a Windows developer will never be fired. There’s too much to modify after every release of new version of Windows and Office.

    BTW:

    MFC Ribbon update (known as "feature pack") is actually the ControlBarPro library by BCGSoft that were integrated with MFC.

    I think MS never planned either to lend Ribbons to developers or to support MFC.

    But they couldn’t accept that somebody else does it and bought the technology.

    So the "MFC" (BCG) Ribbons aren’t Office 2007 Ribbons.

    And MS will never share pure Office controls/framework with devs. And never did.

    Go ahead loving Ribbons,

    Alex.

  9. I have downloaded the Windows 7 API and training Kit and gave it a go. I would like to appreciate the samples provided and the stuff in the code pack. Very much impressive indeed. I can now develop applications which can be run under Windows 7 and at its best. The API pack also offers a lot of good piece of API to communicate with Windows 7 features.

    Excellent piece of work from Microsoft.

    Prashant

  10. កើយ ចិត្រា says:

    I love it. where can i download it?

  11. toub says:

    Can you clarify what you're interested in downloading?