devxlogo

March 23, 2000

Calculating the Size of an Incomplete Array

An incomplete array declaration can appear in a function’s parameter list. For example: int count(const char s[]); The declaration of s doesn’t include the array’s size. Can count() use the

Prevent Duplicate Listbox Entries

This useful code listing prevents users from entering duplicate entries into a listbox or modifying existing listbox entries. While the code prevents users from adding duplicate entries, you can modify

Send a Click Message

Recently, I turned to Windows messaging to manipulate certain dialogs by simulating button clicks programmatically. I looked through my API references and found only the WM_LBUTTONDOWN and WM_LBUTTONUP messages. I

Load UI Graphics From the Resource File

Many VB programmers haven’t harnessed the power of VB6’s resource editor. They still use traditional LoadPicture or other primitive calls to load bitmaps and icons. Before VB5, loading pictures into

Idempotent Type Qualifiers

The type qualifiers const and volatile are idempotent. This means that if a type qualifier is included indirectly several times in a type specification (e.g., through a typedef or a

Running Another Program from Java

You can use Java to execute another program and display its output (via a BufferedReader). Here’s the code: import java.io.*;import java.util.ArrayList;public class ExecDemo{ static public String[] runCommand(String cmd) throws IOException

Include Files Using SCRIPT Tags With IIS 5.0

Previous versions of Internet Information Server (IIS) allowed an ASP page to include the contents of another file using code like this: With IIS 5.0, you can include the file

Formats for Uploading Files

When you transfer files from Windows to the Macintosh, the files become DOS text files. This can be a problem if you convert movies to Java on a Windows computer