devxlogo

Tip Bank

Use Toolbar-Style Title Bars

To make a form use a small toolbar-style title bar, set the form’s WS_EX_TOOLWINDOW extended style: Declare Function GetWindowLong Lib “user32” _ Alias “GetWindowLongA” ( _ ByVal hwnd As Long,

Use a Struct Instead of a Long Argument List

Functions having a long list of arguments such as: void retrieve(const string& title, const string& author, int ISBN, int year, bool& inStore); can become a maintenance problem, since their argument

Implement a Binary Tree

A binary search tree can be useful when you have to traverse a lot of data in sorted order. As this CBinarySearchTree class demonstrates, you can implement binary search trees

Keeping Things Fresh

Sometimes you might need a browser to keep reloading the latest version of a page automatically. A good example of this is a page that displays an image from a

Easily Create All Directories in a Path

Use this code to create a tree of folders on Windows 95 or NT 4.0 in one line: Private Declare Function _ MakeSureDirectoryPathExists Lib “IMAGEHLP.DLL” _ (ByVal DirPath As String)

Cell Structures

If you use HTML tables to lay out your pages, it’s worth knowing about two properties of the tag that help you control the way table cells behave. The CELLSPACING