Microsoft Windows XP: What does it provide for developers? Summary: This article introduces some new features of Microsoft Windows XP and explore these changes to the impact of Windows software. Concentrated the new look and COMCTL32, parallel component sharing, and fast user switching. Introduction About Microsoft® Windows® XP, a good news is of course it has a variety of wonderful new features and capabilities. Second, although the system has changed, as long as you can write successful programs for Windows, you can write better programs for new Windows XP. Simply put, Windows XP (Beta "WHISTLER") is Microsoft's long-awaited operating system, which is based on Microsoft Windows 2000, kneading and extending Windows Millennium Edition (ME) for personal users. . Writing programs for Windows XP requires some new techniques, but these techniques are not difficult. More importantly, we have repeatedly filed (especially those who have been more emphasis after Windows 2000): Your application is "obeying the law", the better it will run on Windows XP. Windows XP applications should follow the rules you have learned in kindergarten: share your resources, peacefully coexist with others, and to observe the rules. That is to say "cooperation". Initial, Windows XP Windows XP is continuing and preparing to replace Microsoft Windows operating systems for Microsoft Windows 2000 and Microsoft Windows Me. Windows XP uses Windows 2000 code base to inherit its reliability and good performance. Windows XP also inherits and enhances new features of the Windows ME operating system: system recovery, Windows Media Player, Windows Mirror Get, etc. For the client's machine, Windows XP has two versions of the professional and home editions. Professional Edition provides the functions required by companies and other companies, suitable for commercial and replacement of Windows 2000 Professional. Household items are suitable for personal users and replacing Windows ME. Two versions of Windows XP contain some common features, such as enhanced support for digital media, fast users to switch new computer sharing capabilities. On the server side, there are three versions corresponding to the Windows 2000 server configuration: server; advanced server, adapted to department-level server, business unit, web application support, etc .; data center servers, suitable for high availability and critical task applications. This article focuses on client versions. As for each server version, they have some similar character combinations, and we will discuss in future articles. In order to achieve a promise to meet the business and personal applications, Windows XP adds some new features. Perhaps the most obvious thing is that it has a new shape, which is completely new and larger, better icons, and use the smallest development cost to give users a better experience. There are many improvements on the task bar, and the user is more likely to organize information, such as putting the same application window together. There are more content: enhanced power management, side component sharing, fast user switching, support high-density display, Passport integration, easier to use balloon prompt, and GDI . This list does not contain all content.
In this article, we will briefly introduce some important aspects you need to know: write a new UI with new COMCTL32 version 6, using side-by-list sharing, write applications that use Windows XP fast users to switch and remote desktop features. In the following months, MSDN will introduce these and more more topics more inwards. PSDK contains information about these features. Windows XP Beta 2 SDK version has more content, which will be distributed to all MSDN subscribers as Beta 2 software. If you are not a subscriber, you may get it later this year. The appearance of the new look Microsoft Windows has not changed significantly since Windows 95. The outlined gray three-dimensional dialog control has become a synonym of Windows. With the release of Windows XP, we will see a new appearance style. Windows XP provides multiple topics based on desktop topics introduced by Windows 95 PLUS PACK, providing multiple topics to determine different system appearance styles. The original desktop changes the user color configuration, fonts, and font numbers, wallpaper settings, and Windows XP topics changing controls, window borders, and menus drawing. The taskbar has been fully refurbished. Since the task bar is limited, the more the window is opened, the smaller the button. We take measures to eliminate this problem. Everyone has encountered a case where the task bar button becomes too small and it is almost unable to use. If the button is too small due to simultaneous opening, Windows XP will group the button. For example, suppose the user opens five Microsoft® Word documents, the displayed buttons will be one rather than five. As long as you click this button, you will have a menu that lists all open windows. The reminder box has also been organized. The reminder box was originally used to prompt the user, but later lost this role and became a place where the application was started. Windows XP hides the icon that is not currently not prompting information, thereby reducing chaos. Users can reveal hidden icons by>-shaped symbols, or close this behavior, which icons are selected and which always hides. Windows has changed in the way. In order to make the desktop, all icons are moved to the new larger start menu in addition to the recycling station. In the Start menu, the functionality provided by the system appears in a blue area, next to the user's most common application. In order to make the desktop more neat, Windows XP will search for the application icon that has not been used regularly, and then helps users from the desktop to clear them from the desktop. All data placed on the desktop is maintained. Windows XP itself offers two types of appearance: traditional Windows style and we are called "WHISTLER style" new style. On this basis, Windows XP has a mechanism that synchronizes the ISV with new style, while Microsoft will gradually add a variety of style that can reflect personal preferences, and your application written for Windows XP will be able to automatically accept them. At first glance, the multi-windows XP style is very similar to the replacement of appearance features of the Window Media Player, but actually some differences. The subject can change the appearance style of the operating system, but still provide UI consistent with the early version of Windows. This is important because the subject is applied throughout the system. Changing the appearance of the application is feasible, such as removing some buttons. But at the operating system level, this is not suitable. The format of the subject file is not disclosed. Microsoft retains the topic design control to maintain a consistent user interface and ensure continuity of design. Windows XP will not provide the topic development tools. You must be very familiar with the traditional style, which is the kind of gray, outlined window and dialog. This option for Windows XP allows users to stay familiar interface. The Windows XP WHISTLER style offers a new look.
Although new appearance styles and traditional windows have great differences, the overall effect is still quite familiar. Windows XP adds a button and tab that when the mouse pointer is moved from above, they change the color, and the hotspots on the web page are very similar. Subjects and controls
Based on Windows XP, Microsoft combines User Win32 controls and ComctL32 versions 6. These new controls use the new topic management program to display the appropriate appearance.
In the previous 32-bit Windows, some controls are implemented in user32.dll, and others are implemented in COMCTL32. The display of the window non-customer area (such as borders and menus) is done by user32.dll. User32.dll is the core component of the operating system, so it can only be used with the corresponding specific version of the operating system. For Windows 2000 and Windows Me, ComctL32 is controlled by a Windows file protection mechanism, so it can only be changed by system update or service pack. For previous versions of Windows, ComctL32 is actually distributed with many system components and applications, often causes an application that is not possible after installing an application or a system component. Windows XP and the latest Windows 2000 Service Pack use the same COMCTL32.
Based on side-by-side components sharing, Windows XP is developed for Windows Components. Remember that the appearance of the control is determined by the new topic. In order to introduce new appearance in Windows, the designer can innovate the design UI's appearance style and does not require changes to the core function, and Microsoft is introducing the topic management program UXTHEME.DLL. This new DLL provides a new control, and provides an information API to the control to determine the location of each part. The non-customer area of all applications, including scroll bars and title bar unless they are customized, they produce a new Windows XP style appearance. This means that every application will involve the topic management program. The theme management program and COMCTL32 set up the topic of most Windows applications, while providing certain flexibility, making the ISV designer to intervene in their applications.
We can fully realize that new COMCTL32 may interrupt some applications. In order to prevent this, ComctL32 version 6 is installed in the system32 directory in the form of shared assembly and COMCTL32 version 5. It is only available to the operating system declaration to use this new DLL application to get it. Existing applications continue to use ComctL32 version 5 if not provided. Windows XP also provides a DLL of version 5 and 6 and installed in parallel. In the subsequent section we will further discuss issues related to statements.
Note: ComctL32 version 6 will not provide early Windows versions; they will continue to use ComctL32 version 5. Version 5 does not provide new appearance, hyperlink controls or packet viewing features. If you use these features, you should test your application on Windows 95, Windows 98, and Windows 2000.
To make sure your application uses a new appearance in Windows XP, you need to use a declaration to specify dependencies to ComctL32 version 6, ensuring linked to COMCTL32. If you have any self-drawn controls, then you will draw them through UXTHEME.DLL, not yourself. If you want them to look similar to the other parts of the UI, you should do this.
The following code draws a button that identifiable topic:
RTButton.top = 100;
RTButton.Left = 10; RTButton.bottom = 130;
RTButton.right = 200;
Htheme = OpenThemedata (HWND, L "Button);
DrawThemebackground (Htheme, HDC, BP_PUSHB /TTON, PBS_NORMAL, & RTBUTTON, NULL);
DrawThemetext (Htheme, HDC, BP_Pushbutton, PBS_NORMAL, WZTMB, WZTMB),
DT_Center | DT_VCENTER | DT_WORD_ELLIPSIS | DT_SINGLINE, 0, & RTBUTTON);
A common reason for creating a self-drawn button is to add a bitmap. Now, the button of the COMCTL32 version 6 can be associated with an image list, and the bitmap provided in combination with the developer. Whether you are updating an existing app, or write a new application, you must use the COMCTL32 version 6 declaration and version 5 to test your app, see how your window, dialog, and new appearance are effectively effectively.
The following code draws the button:
Button_imagelist.himl = himl;
Button_imagelist.ualign = button_imagelist_align_left;
Button_imagelist.margin.top = 3;
Button_imagelist.margin.bottom = 3;
Button_imagelist.margin.Left = 3;
Button_imagelist.margin.right = 3;
Hwndimagebtn = CreateWindow (l "Button", WZText, WS_CHILD | BS_PUSHBUTTON, 0, 0, 0, 10, HWNDPARENT, NULL, HINST, NULL;
Button_setimagelist (hwndimagebtn, & bud_imagelist);
Button_getidealsize (HWndimageBTN, & SizeBTN);
SetWindowPos (HWndimageBTN, HWndParent, 10, 10, Sizebtn.cx, Sizebtn.cy, SWP_SHOWINDOW | SWP_NOZORDER | SWP_NOACTIVATE);
Note: If you use Microsoft Internet Explorer technology to draw a UI in an HTML, you can put a meta tag in HTML to ensure that the HTML control uses topics.
Note: Remind it, for a third-party extension, do not set the topic for them before you test all them. With regard to the main control third-party application, we will discuss how to handle other applications in your process in a MSDN article scheduled in March 2001.
icon
Compared to traditional icons, the icons in Windows XP do not only look beautiful, but also to accommodate more details to represent more complex and improved information. The new icon can support up to 24-bit color depth, support 8-bit masks in the Alpha channel. The image used in icons, tiles and thumbnails can be 48x48 pixels. By the way, the tile display icon is a great new way to represent information. This icon comes with two or three lines, you can indicate the key information next to the icon.
The icon format has not changed, and Microsoft has added support to the 32-bit icon in the image list API. In order to properly create these icons, they can also be used in earlier versions of Windows, you need to make multiple images for each icon, as shown in Figure 2. Figure 2: Multiple icons image
In this example, the top three images are used for 16-color security mode. The three icons are used for Windows XP 256 color mode. The last three icons are ALPHA channels that only apply to a Windows XP or higher operating system running in a 24-bit color.
Note that these images should be arranged in order in the icon format. If the order is wrong, the performance will be very poor when the low version of Windows extracts these icons. This means memory errors and incorrect drawings. Also note that the low version of Windows has 10 resource restrictions, while WHistler supports icon files that contain thousands of icons resources.
You can view new icons: In the past, you can create icons with relatively simple tools like Microsoft Brushes, and now you need to use Photoshop.
Note: Gamani Tools, Gif Movie Gear for ICons can generate 24-bit color, eight ALPHA channel Windows Icon (ICO) files. Please refer to http://www.moviegear.com/foricons.
Square sharing
The operation of the new UI relies on a structure that meets the side of the shared conditions. As a solution for version management and DLL issues, Microsoft Tropics recommendation applications should be used side by reference management strategies. As the ComctL version 6 is shown, the parallel component is the future development of Windows. In this section we will outline the new features of Windows XP. In March 2001, MSDN will publish an article to further discuss this theme.
For background knowledge about parallel component sharing issues and DLL redirection, see David D'Souza, BJ Whalen and Peter Wilson implements parallel components (extensions) in the application.
When using a parallel component, multiple versions of a component will be installed simultaneously. The application is bind to the design and test-specific version of the component.
Windows XP provides an infrastructure to support a collection and an isolated application, including COM and Win32 programs. Get a concurrent assembly from the Win32 application does not need to change the code. Applications can use the latest system assembly without bringing global impact.
In summary, due to quarantined applications, they have higher value. During the generation and distribution, they all contain all the necessary components and will not be affected by the changes in other applications. Isolated applications use an XML file as a declaration that contains a self-description of an assembly or application. Now, all bindings and activation metadata, such as COM classes, interfaces, and type libraries are stored in the declaration, not in the registry. There are two types of declaration files: application declarations (descriptions that are isolated), and assembly declarations (describe individual assemblies).
Isolated applications can use a parallel assembly. The assembly is the basic unit for naming, binding, version management, deployment, and configuration. They have two variants, namely sharing and private. The shared assembly is installed in the WINSXS folder in the Windows directory, which can be used by multiple applications on your computer. Private assemblies are deployed in the application's directory structure and only the application can be used.
For application developers, there is another benefit to use and share, that is, the plan can be clearer, because your development plan will not be affected by the publishing plan of the components used.
Quick user switch
Windows XP introduces a new feature called "fast user switching". Quick users handwise multi-tasking feature based on Windows 2000-based computer sharing features and Windows 2000 Terminal Server, which makes multiple users to share the same computer. The survey shows that 80% of Windows personal users and their family members share a computer. Although Windows 98 has a feature called configuration file, few people are used. Windows 2000 provides features that are managed separately, but it is difficult to use in home environments.
Windows XP has changed all this. Based on Windows 2000 configuration file, create an account for all users during the installation process. If necessary, the user can create a password, but the system does not require a password by default. A friendly new welcome screen instead of the login dialog, there is username, picture, or icon instead of a user code or alias. Also, the new control panel applet makes the edit user account easier. Each user has its own settings, including wallpapers, music, pictures, personal favorites, and more.
In fast user switches, multiple users do not need to log out when using the same computer. Instead, each account is always logged in, and the user can quickly switch between all open accounts.
For example, the father went home and started using his machine. He opened PowerPoint to write a document. Then son Billy requires a computer, he returns to the "Welcome" screen, click "Billy", then log in and start playing games. However, at this time his father is still in the login state. If necessary, he can quickly switch back to his open account without cancellation. His PowerPoint presentation is still open, and the Internet connection will also be held.
A related feature is a remote desktop, which allows users to access their own data from the remote machine with their own settings. This situation may happen in a network, or it may be that the user locked the workstation in the office, go home, and then remotely controls the workstation application from a computer.
Windows XP implements these features over the terminal server. For developers, support for fast user switches and some of the cases that may encounter in the past, such as computer sharing, roaming users, wheel users, home office, and work in the terminal server environment in business environment.
MSDN will further explore user switching in an article in March 2001. Please refer to this article: Optimize applications, Terminal Server Edition (English) for Microsoft Windows 2000 Terminal Services and Windows NT Server 4.0. Now, remember to support fast user switching, the application should follow the confirmed Windows data and setup management specifications (http://msdn.microsoft.com/library/default.asp? Url = / library / specs / w2kserve. HTM) (English).
The default is set to store the data created by the user in the "My Document" folder. Correctly classify and store application data. Divided into a "access denied" message when the message is rejected.
In addition, some factors should be considered. Applications should meet the following conditions:
Support "all users" installation. Test other instances correctly. Communication with service.
Also, consider when your application is not in the current desktop:
Minimize the occupation of the processor. Don't play sound. Do not update the display. Let system resources can detect it.
Other features
Although we can also introduce some Windows XP characteristics from the perspective of development, it is clear that this operating system has clearly exceeded the category of this article.
Power Management: Windows XP uses Windows 2000 power management features, Robert Di Benedetto's article "Tips for Onnow (Power Management) in Windows 2000 applications" (English) is well introduced. GDI : Graphics Device Interface Plus (GDI ) is part of Microsoft Windows.net, providing two-dimensional vector graphics, image processing, and output features. GDI improves GDI (the graphics device interface provided earlier with earlier Windows) by adding new features and optimizing existing features. Beta 2 SDK will provide more information.
64-bit Windows: Microsoft builds Windows XP from a source tree for 32-bit and 64-bit Windows. In the future, your app will become 64-bit, and we will try our best to make your application to meet the requirements of 64-bit systems. Please refer to the section of the Platform SDK in MSDN Library, the title is "Getting Ready for 64-bit Windows" (ready for 64-bit Windows).
Supports high-density display: 133 DPI new monitors are already available, and 200 DPI monitors will also be launched. You need to test your app with 140 DPI fonts and large icons. Both Windows XP dialogs, buttons, title bar, and voice inputs can be used. Please find the contents of how to write the application for high-density display in MSDN article in March 2001.