Tip Bank

DevX - Software Development Resource

Use Pointers to Parents

When trying to navigate through a complex class hierarchy from any given instance of an object, it’s useful to be able to reference its parent. But how do you clean

DevX - Software Development Resource

Toggle Toolbar Captions Using Tag

Many applications have an option to show the toolbars as text and image or text-only. I have seen programmers handle this with two toolbars and show them based on the

DevX - Software Development Resource

Beware of Object Slicing

Passing a derived object by value to a function that takes a base object by value may cause a problem known as “object slicing”; every additional data member declared in

DevX - Software Development Resource

Count Substrings

This little routine demonstrates how easily you can determine the number of substrings within a string, given any specified separator character(s). Pass the string to be parsed, and the separator,

DevX - Software Development Resource

Killing an Object Prematurely

Sometimes, you need to force an object to destroy itself because its destructor performs an operation needed immediately. For example, when you want to release a mutex or close a

DevX - Software Development Resource

Construct Shortcut to an Interface

hen using a class that implements an interface, it can be frustrating to have to create two variables to reference all the properties of both the interface class and the

DevX - Software Development Resource

Access Your Help and Ini Files Within VB

In small projects I am involved with, I frequently access project-related INI files and help files. At times I work with identical databases on Access and SQL Server, so I

DevX - Software Development Resource

The New __FUNCTION__ Macro

In addition to the traditional macros __DATE__, __LINE__, and __FILE__, which are defined by ANSI C, the new C9X Draft Standard also defines the macro __FUNCTION__. __FUNCTION__ is expanded as