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”.
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:
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.
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:
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.
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
Anonymous
October 04, 2009
I love the Ribbon feature. It's surprising that Microsoft would lend that UI to dev.Anonymous
October 05, 2009
No support for Windows Forms? Very dissapointing.Anonymous
October 05, 2009
Yeah I love the ribbon feature too.Anonymous
October 06, 2009
Great feature makes forms look crisp. Finally we have the Ribbon.Anonymous
October 06, 2009
Will the WPF Ribbon Control work in Silverlight 3 or later?Anonymous
October 06, 2009
John, check out the Silverlight Ribbon control project on CodePlex: http://www.codeplex.com/silverlightribbon. Enjoy! Polita Paulus Developer Division MicrosoftAnonymous
October 09, 2009
The Ribbon addition is great, what about a DockPanel control that has the same look and feel as the one in VisualStudio??Anonymous
October 12, 2009
The comment has been removedAnonymous
February 24, 2010
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. PrashantAnonymous
March 03, 2012
I love it. where can i download it?Anonymous
March 04, 2012
Can you clarify what you're interested in downloading?