September 16, 2000

Forms, Formats, and Contents

was studying the excellent Francesco Balena book, “ProgrammingVisual Basic 6.0,” edited by Microsoft Press, the cost of which iswidely compensated by both the book and the enclosed CD contents&#151:when Iran into the explanation of DataFormat property for data bound controls,and of StdDataFormat object. It seemed a very interesting subject for

Returning Aggregates from a Function

Both C and C++ allow you to return by value aggregates, e.g., structs and unions, from a function. However, the runtime overhead of returning large objects by value can be significant. This is why certain compilers issue a warning message when you return an aggregate from a function. For example:

Designing a Generic Callback Dispatcher

In many applications, you need a generic class that invokes callback functions regardless of their class type. For example, an even-driven system that needs to call a member function of a GUI component without knowing its actual type. You can create a generic callback class template to streamline this task.

Accessing a Class-Internal Type

Here’s a common error: you define a class-internal type, say an enum or typedef, and then try to use it as the return type of that class’s member function: class A{public: enum sizes {small, medium, large}; sizes default_size() const{ return medium;}}; Up until now, all is fine. However, at a

Overcoming a Common Bug in

The standard functions isalpha(), isdigit(), isprint() etc., defined in the standard header or often fail to produce the right results because they assume that their arguments are of type ‘unsigned char’. On certain implementations, char is signed by default and this causes ctype functions to fail. For efficiency reasons, most

How to Remove Flashing in an Applet

Most of the Java books talk about double buffering for removing theflashing. It solves the problem to some extent but not 100% perfect in caseof flashing. I am giving the following tricks to solve the flashing problemin animation : 1) Use Media Tracker for downloading the images.2) Use double buffering.3)