11.07.2015 Views

Encyclopedia of Computer Science and Technology

Encyclopedia of Computer Science and Technology

Encyclopedia of Computer Science and Technology

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Micros<strong>of</strong>t Windows 309Here the various parameters passed to the CreateWindowfunction specify the type <strong>of</strong> window, window title,characteristics, <strong>and</strong> location. The function returns a “windowh<strong>and</strong>le,” which is a pointer that holds the window’saddress <strong>and</strong> allows it to be accessed later.Most Windows programming environments, includingC++ <strong>and</strong> particularly, Visual Basic, now let program designersavoid having to specify code such as the above to createwindows <strong>and</strong> other objects. Instead, the programmer canclick <strong>and</strong> drag various objects onto a design screen to establishthe interface that will be seen by the program’s user.The programmer can then use Properties settings to specifymany characteristics <strong>of</strong> the screen objects without havingto explicitly program them.Micros<strong>of</strong>t <strong>and</strong> third-party developers also provide readymadeprogramming code in dynamic link libraries (DLLs).These resources (see library, program) can be called byany application, which can then use any object or functiondefined in the library. Windows also provides a facilitycalled OLE (Object Linking <strong>and</strong> Embedding). This lets anapplication such as a word processor “host” another applicationsuch as a spreadsheet. Thus, the Micros<strong>of</strong>t Word, forexample, can embed a Micros<strong>of</strong>t Excel spreadsheet into adocument, <strong>and</strong> the spreadsheet can be worked with usingall the usual Excel comm<strong>and</strong>s. In other words, OLE letsapplications make their features, controls, <strong>and</strong> functionalityaccessible to other applications. Indeed, collections <strong>of</strong>controls are <strong>of</strong>ten packaged as OCX (OLE controls) <strong>and</strong>sold to developers.Despite all this available help, Windows presents a steeplearning curve for many programmers. There are hundreds<strong>of</strong> functions for h<strong>and</strong>ling interface objects, drawing graphics,managing files, controlling devices, <strong>and</strong> other tasks.With the growing use <strong>of</strong> object-oriented programming languages(see object-oriented programming <strong>and</strong> C++) inthe late 1980s <strong>and</strong> 1990s, Micros<strong>of</strong>t devised the Micros<strong>of</strong>tFoundation Classes (MFC). This framework defines all <strong>of</strong>the interface objects <strong>and</strong> other entities (such as data structures)as C++ classes.Using MFC, a programmer, instead <strong>of</strong> calling a functionto create a window, creates an object <strong>of</strong> a particularWindow class. To customize a window, the programmercan use inheritance to derive a new window class.The various functions for controlling windows are thendefined as member functions <strong>of</strong> the window class. Thisuse <strong>of</strong> object-oriented, class-based design organizes much<strong>of</strong> the great hodgepodge <strong>of</strong> Windows functions into alogical hierarchy <strong>of</strong> objects <strong>and</strong> makes it easier to master<strong>and</strong> to use.For example, using the traditional Windows API (seeapplications programming interface) one puts a textstring into a list box using this code:LRESULT LRes;LRes = SendMessage(hMyListBox,LB_ADDSTRING,0,“Network Services”);(LRes is a number that will hold a code that says whetherthe item was successfully added)Using MFC, this code can be rewritten as:CListBox * pListBox;int nRes;nRes = pListBox->AddString (“Network Services”);Here a pointer is declared to an object <strong>of</strong> the ListBoxclass, <strong>and</strong> a member function <strong>of</strong> that class, AddString, isthen called. While this code may not look simpler, it uses aconsistent object-oriented approach.The new common framework for Windows programmingis called .NET. Closely integrated with the latestversions <strong>of</strong> Windows (XP SP2 <strong>and</strong> Vista), the class frameworkhas been revamped <strong>and</strong> exp<strong>and</strong>ed. .NET provides acommon language runtime (CLR) for access from differentlanguages such as C++, C#, <strong>and</strong> Visual Basic .NET. (SeeMicros<strong>of</strong>t .NET.)TrendsBy just about any st<strong>and</strong>ard Micros<strong>of</strong>t Windows has achievedremarkable success, capturing <strong>and</strong> largely holding thelion’s share <strong>of</strong> the PC operating system market. However,Windows has been persistently criticized on grounds <strong>of</strong>reliability <strong>and</strong> security. Perhaps feeling the pressure fromusers <strong>and</strong> potential regulators, Micros<strong>of</strong>t has placed greateremphasis on security in recent years; Windows Vista integratessecurity much more tightly into the structure <strong>of</strong> thesystem. However, as long as Windows is the most widelyused operating system, it will continue to be the biggest targetfor creators <strong>of</strong> viruses <strong>and</strong> other malware.Micros<strong>of</strong>t has included powerful facilities that allowWindows applications to be controlled by other applicationsor remotely (see scripting languages). Unfortunately,these facilities have proven to be quite vulnerable to computerviruses that can use them to damage systems connectedto the Internet. There seems to be a never-ending racebetween developers <strong>of</strong> program “patches” designed to plugsecurity holes <strong>and</strong> inventive, albeit malicious virus writers.Windows continues to face a variety <strong>of</strong> challenges. Theability to deliver applications directly through Web browserson any platform may make it less compelling for a user withsimple computing needs to pay the premium for a WindowsbasedPC. (For example, Google now delivers basic wordprocessing, spreadsheet, email, <strong>and</strong> other applications—seeapplication service provider.) Linux, too, may be graduallygaining a greater share on the desktop. Versions suchas the popular <strong>and</strong> frequently updated Ubuntu now installabout as easily as Windows, provide a similar user interface,<strong>and</strong> include a variety <strong>of</strong> s<strong>of</strong>tware, including Open Office (seeLinux <strong>and</strong> open-source movement).While Windows still remains the dominant PC operatingsystem with tens <strong>of</strong> thous<strong>and</strong>s <strong>of</strong> applications <strong>and</strong> atleast several hundred million users around the world, it islikely that the PC operating systems <strong>of</strong> 2020 will be as differentfrom today’s Windows as the latter is from the MS-DOS <strong>of</strong> the early 1980s.Further ReadingBellis, Mary. “The Unusual History <strong>of</strong> Micros<strong>of</strong>t Windows.” About.com. Available online. URL: http://inventors.about.com/od/mstartinventions/a/Windows.htm. Accessed August 15, 2007.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!