April 6, 1999

Internationalize Your Dates

Although the Gregorian calendar is used by most of the world, the specific way in which dates are formatted varies from one place to another. In the United States, for example, the most commonly used format is mm/dd/yy (or mm/dd/yyyy), where mm represents the month, dd represents the day of

Forward Declarations and Templates

It is illegal to use forward declarations with typedef names, as in: class string; void f(string& s); //illegal, string is a typedef name Even a typename won’t do here: typename std::string; //still illegal void f(std::string& s); The problem with these forward declarations is that std::string is not a class, but

Use MaxFileSize With Openfile Common Dialogs

When working with OpenFile common dialogs, set a large value for the MaxFileSize property, which affects the maximum length of the string returned in the FileName property. This is the string containing the names of all the files selected by the user. For example, you can reserve 10 kilobytes for

Label Loops in JavaScript

You can refer to named functions from anywhere within a JavaScript program by calling them by name. Sometimes it’s useful to be able to do the same for statements. Any JavaScript statement can be given a label, simply by preceding the statement with any non-reserved word followed by a colon.

Install the Toolbar Wizard

VB6 comes with a Toolbar Wizard that lets you easily create a Toolbar control and the code that responds when users click on its buttons. However, how you install this wizard is unclear, because it doesn’t appear in the list displayed in the Add-Ins Manager dialog box. You have to

Don’t Duplicate ImageList Controls

A common control, such as a TreeView or a ListView, can use an ImageList control placed on a form different from the current one. This is useful when many forms in your application contain an ImageList control with the same images. Instead of using multiple ImageList controls, you can gather