devxlogo

September 24, 1999

Alpha Resource IDs can Spell Trouble

Resource files are a great way to store text strings and images, but beware: Use of a resource file can override the property setting for your application’s icon. When Windows

Align Text on a Command Button

If you’ve ever wanted to align text on a command button and found you can do it only by using spaces in the caption, there are a couple of constants

Retrieve Localization Strings

Use this API function wrapper to retrieve localization and personalization information: Private Declare Function GetLocaleInfo Lib _ “kernel32” Alias “GetLocaleInfoA” (ByVal _ Locale As Long, ByVal LCType As Long, ByVal

Learning C++ From Scratch?

One of the most frequently asked questions I receive is: “How can I learn C++?”. First, remember is that C is not a pre-requisite for learning C++. In fact, as

Give Meaningful Names to Magic Numbers

“Magic numbers” are arbitrary constant values that indicate array bounds, maximal number of open files, the size of a memory page, and similar environment and program-specific units. Instead of using

Using Command Line Arguments

You can directly pass arguments to a program. For this purpose, you have to declare these arguments in the parameter list of main(): int main (int argc, char ** argv){}

Use Explicit Access Specifiers

C++ provides default access specifiers when you don’t use spell them out explicitly, as in the following examples: struct Employee{ /*..*/};class Manager : Employee //implicit public inheritance{ int rank; //implicitly

Guidelines for Overloading the + Operator

The built-in + operator is a binary operator that takes two arguments of the same type and returns the sum of its arguments without changing their values. In addition, +