Export (0) Print
Expand All
Expand Minimize
1 out of 1 rated this helpful - Rate this topic

Back to the Windows 2000 Future

As of December 2011, this topic has been archived. As a result, it is no longer actively maintained. For more information, see Archived Content. For information, recommendations, and guidance regarding the current version of Internet Explorer, see Internet Explorer Developer Center.

Robert Hess
Microsoft Corporation

February 14, 2000

Contents

A Good Feature to Keep
New to Windows 2000
In Closing

With all the hype surrounding the Web these days, it seems like everybody is either writing Web pages or programming Web services. Isn't anybody paying attention to writing good old-fashioned graphical applications anymore? If Windows 2000 is any indication, they should be. The Web might be the "new kid on the block," but that isn't any reason to ignore all that has come before it. Web pages and Web servers are both excellent areas to devote time and energy to, but I think that it is important to remember that they aren't the only game in town.

Let's face it: Even with all the tremendous benefits of connectivity, and to the broad range of information available through the Internet, attempting to develop a "real" application is often fraught with various levels of difficulties. Simple Web pages can usually do just fine with standardized HTML on the client, leaving the services work to be done by code running on the server. But the term "application" is often interpreted as something dynamic and interactive. This level of functionality can be difficult to achieve. Even if you focus on just the specialized features of a single browser, you will still find yourself needing to recreate many of the basic UI constructs that are so easy to implement using Win32. Drop-down menus in Dynamic HTML? Sure. We've even shown you how. But you can easily make the same menus in Windows—for a lot less code.

If the types of questions I hear are any indication, developers are constantly trying to break free of the constraints that are an unfortunate necessity of Web-based applications.

Windows 2000 provides an exciting collection of new features and capabilities that can be incorporated into applications. As a very quick example, let's try a simple task:

  1. Start up Notepad
  2. Select Open... from the File menu
  3. In the File name: field, enter:
http://www.microsoft.com/default.htm

If you are running Windows 2000, you'll notice that it does in fact open up the default.htm file and display it in all its HTMLness within Notepad. If on the other hand you are running previous versions of Windows, it won't.

You can even take the version of Notepad from Windows 95, copy the .exe over to a Windows 2000 system, and it too will now properly open up the HTML page. This shows just how deep within the operating system this important convergence between the native file system and the internet data repository lies. Most applications are going to get this added benefit without any additional code. I often use this for directly accessing an image on a Website from my image-editing tool. With Windows 2000, I can simply enter the URL of the image directly into the tool's File Open dialog box, instead of having to open the image up in the browser, copy it to the clipboard, and then paste it into the image tool. While perhaps not rocket science, it is just the sort of thing that makes sense.

Windows 2000 incorporates far too many added features to list in a quick article like this, but I'd like to mention a few that I personally think are pretty cool.

A Good Feature to Keep

Multiple Display Monitors

First introduced in Windows 98, this capability allows a user to connect multiple display cards to the system; Windows then coordinates the "desktop" across the various monitors. Many applications simply need to be aware of this functionality, and to be sure that they aren't displaying dialog boxes or messages in such a way that they might "straddle" across multiple monitors. Windows will do a lot to try to prevent this from happening, but if you incorrectly calculate the desktop size in order to center a dialog, you could end up displaying parts of it on two different monitors. Quite a few applications, however, could benefit from this functionality. Consider a game such as Flight Simulator or Quake. Imagine configuring that game with multiple monitors, and then providing not only a "forward" view, but left and right views as well on two additional monitors. Another possibility is the use of specialized/customized hardware. Create a complex system solution that uses one 17-inch main monitor, plus several small (5-inch? black & white?) monitors underneath it to maintain a constant display of specific information. When the application is run, it could notice the extra displays, and automatically open up windows on them that would present report data that would keep the user informed of some aspect of the application's operation.

More information about support for Multiple Display Monitors can be found in the Platform SDK area of the MSDN Online Library.

New to Windows 2000

Job Objects

It is often useful to manage multiple processes within an application. Since processes don't have a parent/child relationship, it can difficult to create a structured relationship between multiple processes. When you need to spawn, and then clean up, processes within your application's control, it can be a bit of a chore to managing your own private list of processes and enumerate through them. With Job Objects, you can now group together processes in a way that makes this a snap.

More information about Job Objects can be found in the Platform SDK. And a great article by Jeffrey Richter is available in the March 1999 issue of MSJ.

Layered Windows

While I realize layered windows are perhaps not of the same obvious technical benefit as some of the other features, I still think they are pretty cool. Originally, windows could be square only Then the notion of "non-rectangular" windows was added, in which the system essentially stored the windows "shape" within a complex region, and used this to process drawing and hit-testing. The problem with this approach was that it was extremely inefficient, thus making this "cool" feature appropriate only when it was necessary to the functionality being provided. Windows 2000 supports the layered windows feature, which is essentially a window display management model is designed to provide efficient support for non-rectangular windows. In addition, it supports other special features that were previously difficult, if not impossible, to achieve—notably, transparency and translucency. This is how the "arrow" cursor on Windows 2000 gets its translucent shadow.

You can find out more information about layered windows in the MSDN Online Library technical articles and the Platform SDK

Alpha Blending

The transparency effect available to Layered Windows is provided by alpha blending. Conceptually, this is done by taking a normal RGB color triplet for a pixel, and adding a forth value to it (often referred to as the "alpha channel"), which indicates the transparency level of that pixel. The new AlphaBlend function in Windows 2000 allows bitmaps using this alpha channel value to be displayed displaying images that inherit transparency.

More information about alpha blending can be found in the Platform SDK.

Message-Only Windows

Although Windows 2000 is a graphical operating system, you may find it necessary to use the "messaging" model - without needing an associated display surface. An example might be code that is calculating Pi out to a long decimal place. Using a WndProc programming model would make it very simple to contain not only the idle time code for performing the calculation, but also an easy way to query the running procedure to find out what its current status was. For situations such as this, Windows 2000 now provides a message-only window that can send and receive messages just like normal, but with no visible window, no z-order. Also, a message-only window won't receive standard "broadcast" messages, and it isn't enumerated in the normal manner.

Window Animation

Windows 2000 has a new API called "AnimateWindow," which allows you to use special effects when showing or hiding a Window. It is recommended that you use this along with layered windows to get the best performance. The effects currently available are relatively simple: roll, slide, and fade—with additional control over the direction in which the effect is performed. While perhaps not a mind-numbing collection, it provides some interesting visual features when used properly. Please note that I said "properly." I can just imagine some of those same programmers who peppered their Web pages with <blink> and <marquee> tags going crazy over this one.

In Closing

This was just a quick run down of some of the new features to be found in Windows 2000 (okay, so one of them is also in Windows 98). I think all of these features represent some capabilities that can be extremely useful to full-blown Windows applications. While the line between these Windows and Web apps may someday become too fuzzy to distinguish, there are right now very good reasons why applications can and should still be developed the "old fashioned way."

Robert Hess hosts the MSDN Show.


  
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.