devxlogo

Tip Bank

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

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

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,

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

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

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

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