Build-in Windows power tools. (Microsoft Windows advanced features) (Evaluation)
by Robert Bixby
We all know what a head is for. It's a great hatrack. You can break down a door with it. It even makes a fair percussion instrument. Oh, and it comes with a brain inside. You can use your brain to make work simpler, or you can ignore it and use your head for a hatrack. It's the same way with Windows. Too many of us are using Windows as if it were only a brainless task switcher, good for keeping those mysterious Windows programs under some kind of control, but otherwise a memory-wasting nuisance.
Windows has so much more to offer than a shell and a task switcher, yet many of us never venture into that no man's land of advanced Windows features. Fear not! If you step off the beaten path, you'll discover that Windows has features that will make your work easier and more intuitive, your output more attractive, and your computer an even abler assistant than it was before.
This article will talk about TrueType, the Recorder, the Clipboard, and OLE and DDE. You'll find out what they are and how to use them.
Remember, though, that not all Windows applications use all of these features. Therefore, before trying any of the options discussed here, you should check your applications' documentation to make sure they support these advanced Windows features. The examples we'll use involve Windows Paintbrush and Windows Write, since everyone who has Windows has these applications. Microsoft was kind enough to make sure that both of these so-called accessories take full advantage of the advanced features.
Font of Wisdom
TrueType was developed in a cooperative effort between Microsoft and Apple Computer to establish a font technology that could be used across computer platforms (read that could be used on the Mac and the PC) and that wasn't dependent on PostScript, which is a product of Adobe. TrueType is part of a larger page description language called TrueImage, which is available in place of the PostScript language on many "PostScript-compatible" printers. The advantage of TrueType fonts over PostScript fonts for the casual user is that, without additional software (such as FaceLift or Adobe Type Manager), TrueType fonts can be printed on any printer that has a Windows driver, and they appear onscreen pretty much as they will appear on the page. This provides high-quality outline fonts for use with PCL laser printers (also known as Hewlett-Packard-compatible printers) as well as ink-jet printers, thermal transfer printers, and even dot-matrix printers and fax machines.
There's nothing new to learn about using TrueType fonts. All you have to do is make sure they're installed and active under Windows. To do this, open the Main program group, double-click on Control Panel, and then double-click on Fonts. A dialog box will open up, and one of the buttons on the right side of the box should be marked TrueType. Click on that button, and you'll see a dialog box with two options: Enable TrueType Fonts and Show Only TrueType Fonts in Applications. Make sure the check box next to Enable TrueType Fonts is checked. The available fonts will appear in the font lists of programs that support TrueType (which includes most programs released since Windows 3.1 appeared on the market).
The TrueType fonts are attractive, well designed, and easy to use, but their greatest effect has been in the area of marketing. Before TrueType, purchasing a font meant laying out major bucks. A single font could cost $100 or more, and people who found good-looking fonts for as little as $20 or $30 considered themselves lucky.
Since the appearance of TrueType, the cost of fonts has diminished to the point that you can purchase professionally designed fonts for as little as $2 apiece in packages. Many drawing programs are packed with dozens of free fonts as a premium (CorelDRAW! 4.0 alone was shipped with 750 TrueType fonts in its CD-ROM version), and you can find dozens of excellent fonts on bulletin boards and online services for the cost of downloading them (CorelDRAW! is the major reason for this; its font design capabilities are awesome).
Bear in mind that TrueType has not yet made its way into professional circles. Many typesetters require Adobe PostScript fonts and cannot yet use TrueType fonts. If you're preparing something for typesetting, be sure to find out from your typesetter what kinds of fonts to use before you start laying out your publication. Otherwise, you might be in for an unpleasant surprise--and a lot of extra work.
Windows' Recorder is a much-maligned macro facility. Its shortcomings were among the main reasons for Hewlett-Packard's NewWave product, which features prominent among its advantages a fully scripted macro language. The Recorder may be limited, but within its small domain, it's very powerful.
The key to using the Recorder with the mouse is that you must settle on specific positions for all the objects on your Windows desktop. The reason for this is that the Recorder understands only keypresses, mouse clicks, and mickeys. What's a mickey? It's a unit of measure for mouse movement across your desktop. The implications of this are that when you record a mouse click at a given location on the desktop, the Recorder script will remember only the click and the location of the mouse pointer. If you move the icon that was in that position when you clicked or place another icon on top of it, the Recorder macro will be useless (and potentially dangerous).
Therefore, the first step in successful Recorder use is either to construct a comfortable arrangement of items on your desktop and keep the items in that arrangement as long as you use your library of Recorder macros or to record only keypresses (this is one of the options as you begin recording a macro). Veteran Recorder users recommend recording kepresses because they're completely independent of arrangement of objects on the screen and they're much less ambiguous.
To use the Recorder, double-click on its icon in the Accessories program group. The Recorder window will appear. Pull down the Macro menu and select Record. The options in this dialog box allow you to record mouse movement and clicks, ignore mouse (record keyboard entry only), or to record everything (mouse and keyboard). You can select a key combination to assign the macro to, such as Ctrl-Z. You can tell the macro to play fast or at the same speed it was recorded, and you can make the mouse movements relative to the full screen or the window.
You can't edit a macro, but you can call another macro within a macro (to do this, you must have Enable Shortcut Keys checked in the Record dialog box; to run another macro within a macro, just press the shortcut key for that macro while recording a macro).
Let's try recording a macro. The Recorder works with any application, so let's use Write for the example.
Start up Write.
Bring the Program Manager to the foreground and double-click on the Recorder icon in the Accessories program group.
Pull down the Macro menu and select Record.
In the resulting dialog box, type z in the Shortcut Key text box and select Everything in the Record Mouse list box. Make sure that Playback To is set to Same Application, that Playback Speed is set to Fast, that the Continuous Loop check box is not checked, and that the Enable Shortcut Keys check box is checked.
Click on Start to begin recording. The Recorder will be minimized.
Type some text in Write. A good use for a macro is to record your letterhead information so you don't have to type it out each time you write a letter. Enter your name, address, and telephone number; drag through all the text; and press Alt-P, C to center it on the page. That's enough for your first macro. Let's turn off the Recorder.
Double-click on the minimized Recorder icon. Macro recording will be suspended, and a dialog box will open, giving you the options of Save Macro, Cancel Recording, and Resume Recording. If you want, you can now take other actions that will not be recorded and then resume recording at a later time by just selecting Resume Recording. However, at this time we will save the macro for later use.
Click on Save Macro. The macro will not be saved to its own file but rather to a collection of macros. You can have as many collections of macros as you want, and each collection of macros can contain dozens of individual commands.
To save your current collection of recorded macros, pull down the File menu in the Recorder dialog box and select Save. The familiar Save dialog box will open, and you can save your macro collection with any name you choose, although the default extension for recorded macro collections is REC.
You can't edit a recorded macro (you have to rerecord the macro from beginning to end), but you can change the properties of a macro by clicking on the macro in the Recorder dialog box, pulling down the Macro menu, and selecting Properties.
Since you can't edit macros, a good strategy is to atomize them. Break a single task into several short tasks, giving each of these tasks its own shortcut key combination. Then, when it comes time to put all the short macros together into a larger macro, record a macro in which all you do is press the shortcut key combinations for the shorter macros. That way, if some aspect of your macro changes, you need rerecord only the one or two parts of your macro that have changed, not the whole thing. Recording a long, detailed macro can be an exercise in frustration. Each time you make some small mistake, you'll have to start over again. By breaking your macro down, you can deal with it in manageable chunks.
Cutting and Pasting
The Clipboard is hardly an advanced feature. It's been around since the very beginning in Windows, and most people have used it, whether they were aware of it or not. If you cut or copy something from a document and then paste it back into that or another document, you've used the Clipboard. But there are more ways to use it. For example, did you know that Windows has a built-in screen capture facility? Anytime you have something on the screen that you want to capture for posterity, all you have to do is press your Print Screen key. The entire screen will instantly be placed on the Clipboard. From there, you can save the image to disk, or you can paste it into any application that can handle a bitmap image. The only drawback of saving the Clipboard image is that you can save it only in CLP format--the native format of the Clipboard. There are utilities (FreezeFrame by Delta Point, for example) that can convert the Clipboard file to a BMP or other bitmapped format. If you don't want to save the entire screen, press Alt-Print Screen to save an image of the active window to the Clipboard.
If you've captured a screen image to the Clipboard, you can paste it into Windows Paintbrush. Once the image is in Paintbrush, you can save it as a BMP or PCX graphic. You may have tried pasting a full-screen image into Paintbrush and been frustrated because pasting the full-screen image results in a truncated image only as large as the window in Paintbrush. There's a technique for getting the whole image in (and thanks to Clifton Karnes's 101 Essential Windows Tips for this solution): Zoom out before pasting. That way, you can paste the whole image into the reduced-size screen. Pull down the View menu within Paintbrush and select Zoom Out. Pull down the Edit menu and select Paste. The Paintbrush window will appear to be filled with a grid. Pull down the Edit menu and select Paste again. The full-screen image will appear. Pull down the View menu and select Zoom In. You can scroll all over the screen and edit it; then you can save the result to disk as a BMP or PCX file.
If you want to be really hip, capture a screen that's typical of your Windows working desktop, paste it into Paintbrush, save it as a BMP file, and then use that file as your Windows wallpaper. That way, you'll look busy even when you don't have a single window open on your screen.
To see what's on the Clipboard and to save or load an image, you need to use the Clipboard Viewer, which is one of the applications in the Main program group. Double-click on the Clipboard Viewer icon, and you'll see the current contents of the Clipboard. Just for fun, when the Clipboard Viewer is visible, press Print Screen and then Alt-Print Screen to see what happens to the contents of the Clipboard.
You can use the Clipboard to store information from DOS applications running under Windows. In 386 enhanced mode, you can drag the mouse pointer through a DOS application to select data to be transferred to the Clipboard. In real or standard mode, you can transfer only an entire screenful of data to the Clipboard from the DOS application.
If you're running a DOS application full screen under Windows and you press Alt-Print Screen, you'll save the entire DOS screen to the Clipboard as text. This can come in very handy.
If you're running the DOS application in a window (press Alt-space bar to switch between running the application full screen and running the application in a window), you'll see a Control menu in the upper left corner of the window. This is similar to the Control menu in Windows applications, but it has a couple of enhancements. First, it allows you to select the size of the type in the window (and therefore the size of the window itself) under Fonts. Second, it gives you an Edit option.
Pull down the Control menu and select Edit; then select Mark from the resulting submenu. Drag the mouse through some text in the DOS application to select it. Then press Enter, and the data you've selected will be copied to the Clipboard. If there is data in the Clipboard, you can paste it into your DOS application. This facility brings many of the advantages of Windows to DOS.
The only thing you can't do is make OLE or DDE links with a DOS application (not yet, anyway) or cut data from your DOS application.
Another use for the Clipboard, as you'll read shortly, is as a bridge to establish DDE and OLE links.
OLE is the latest linking option in Windows. The acronym (usually pronounced like the Spanish interjection ole but sometimes spelled out, O-L-E) stands for Object Linking and Embedding. OLE goes beyond its precursors, DDE and pasting from the Clipboard, in that instead of simply pasting a value in a document, it pastes the entire application in the document. That's a lot to comprehend, so take a moment to consider the possibility of having all of Quattro Pro as part of an Ami Pro document, or all of Paintbrush as part of a Write document. Now that you've considered it, let's do it.
Start up Paintbrush and Write. In Paintbrush, draw an image. It doesn't have to be anything fancy--just a rectangle or two of different colors would be fine.
Save your drawing (saving the file containing the linked object is crucial to the process).
Drag a selection rectangle that encloses the drawing you just created. Pull down the Edit menu in Paintbrush and select Copy to place a copy of the image on the Clipboard.
Click on Write. Pull down the Edit menu and select Paste Special and then Paintbrush Picture Object. The contents of the Clipboard will be pasted into your Write document. But there's more.
Close down Paintbrush so that all you have running is Write with the linked object in it.
Double-click on the linked object. If all goes well, Paintbrush should have started up, with the linked object in its window, ready for editing.
How could you use a property like that? Imagine that you're designing a letterhead. Part of the design is the logo for your company. The logo committee is driving you nuts by changing the logo constantly. By having the logo and the drawing program inside the letterhead itself, you can save time when changes come through by making them right in the document itself instead of making them in some separate document and then going through the steps to update the changes in the final document.
DDE is an earlier version of OLE. It's not as well supported as it used to be and may be fading from use, but enough software still uses DDE that it's worth mentioning.
Although it sounds like the latest insecticide or mind-altering chemical, DDE was actually the first serious advance associated with Windows. It appeared with Windows/286 and Windows/386, and it allowed specially designed Windows applications to communicate with each other.
DDE stands for Dynamic Data Exchange. When it's used, it allows you to move information from one application into a document created by another application. Sounds like cutting and pasting, doesn't it? Well, it goes a step beyond that. The information pasted into the new document is permanently linked to its origins. When data in the original application changes, the document into which it has been pasted is also updated. Is that clear? Maybe an example will help.
Suppose you're preparing a 50-page annual report. Deadlines are tight, and the data in the spreadsheet keeps changing as information is being fed in from your many branch offices around the world. How will you know that the final information is in place when the document is sent to the typesetters? If you guess DDE, give yourself a star. When you link the bottom line in your spreadsheet to the gross earnings line in your text document, you'll know that when the final figures are in place, they'll also be completely up-to-date in your annual report.
Let's use DDE to see how it works. Once again, we'll use Windows Paintbrush and Windows Write to demonstrate the principles, but you could use most DDE-compliant software to create an example of your own.
Start up Windows Paintbrush. Draw a circle of one color and then a rectangle of another color. Save the painting to disk.
Drag a selection rectangle that encloses the entire drawing and select Copy from the File menu. The drawing is now on the Clipboard.
Start up Windows Write. Pull down the Edit menu and select Paste Link. Now when there are changes in the graphic in Paintbrush, they will be instantly reflected in the document in Write.
Use Your Head
Now that you know a little about what can happen in the background, you should never mistake Windows for a mere task switcher again. Windows is capable of even more now--with its multimedia add-ons that can make use of animation and sound.
Windows has become a deep enough product that it will repay you handsomely for any time you spend learning how the pieces fit together. Remember: Use your head for something besides a hatrack--and put Windows to work every chance you get.