Last updated:
7. February 2002

User Interface Programming

(Start main menu) Home ­ Articles ­ Book ­ Resources (End main menu)


(Start sub-menu)


User Interface Programming Column


Tech Tips


Code Archive

Range Slider

Splitter Controls and Dialog Resizing



My blog »

(End sub-menu)

This page lists my feature articles. Most of them were published in Win­dows De­vel­oper Maga­zine—among the exceptions is “Windows 2000: The Developer’s Challenge,” which you can find in’s Windows 2000 Botique.

Most of the articles concern user in­ter­fa­ce issues and how you as a programmer can deal with their sometimes sordid details.

This page does not include the User Interface Programming column or Tech Tips; these have their own pages.

Most of the code for these articles is in C rather than C++. The articles are listed in reverse chrono­logi­cal order (newest first).

Look here for books about writing.

8 Windows 2000 Translucent Windows

Windows De­vel­oper’s Jour­nal, May 2000

Download Code

Create translucent windows using the layered windows of Windows 2000!

Win32 has long offered the intriguing win­dow style known as WS_EX_TRANSPARENT, but anyone who’s used it knows it doesn’t live up to its tan­ta­li­zing name. Now, Windows 2000 finally provides functioning support not only for trans­parent win­dows, but also for trans­lucent (or “bleed-through”) windows.

7 Windows 2000: The Developer’s Challenge (Windows 2000 Botique) (April 2000)

Read Article

Antoine de Saint-Exupéry said, “A designer knows he has achieved per­fection not when there is nothing left to add, but when there is nothing left to take away.” This article looks at how pro­gram­mers can develop soft­ware that’s robust, reliable and usable.

You can read this article on the web site; the article is just as relevant for Windows XP as it was for Windows 2000.

6 GetLongPathName() under Win95 and NT 4

Windows De­vel­oper’s Jour­nal, June 1999

Download Code

Users who create files with long names will be unpleasantly surprised if your pro­gram displays the shorter “encoded” version of the name instead. There is a GetLongPathName() function to turn short names into long names, but for a solution that works under Win95 and NT 4, you’ll need the code presented here.

5 The Open File Dia­log Font/Color Bug

Windows De­vel­oper’s Jour­nal, May 1999

Download Code

When a user changes global settings like the color scheme, Windows notifies some windows of the change, but they are responsible for notifying, in turn, their child windows. If your win­dow fails to pass on such a notification, the result can be a win­dow with the wrong colors or fonts.

This article shows that such a bug exists in the Open File common dia­log, and provides code for fixing the problem.

4 An MFC Framework for Listview Sorting

Windows De­vel­oper’s Jour­nal, March 1999

Download Code

Handling column-by-column listview sorting correctly requires some tedious custom coding, since the exact details of a “correct” sort depend greatly on the data in your listview. However, there is a lot of common logic that can be factored out, as this article shows by providing a reusable framework for sorting MFC listview con­t­rols.

3 An Extended Icon Editor

Windows De­vel­oper’s Jour­nal, October 1998

Download Code

This article describes an extension to the original icon/bitmap editor (see The World’s Smallest Icon Editor). It trades additional code lines for considerably more functionality.

2 Gummistrikk, binders og tyggegummi

Kapital Data, februar 1998
(This article is in Norwegian.)

“Dersom det eneste verktøy du har er en hammer, behandler du gjerne ethvert problem som en spiker. Dette gjelder også på Internett, som mange oppfatter som synonymt med World Wide Web (WWW). WWW er en infrastruktur som i utgangs­punktet er laget for å distribuere enkel hypertekst, men mange bruker den også som applikasjonsarkitektur.”

Denne artikkelen tar for seg enkelte betenkeligheter med dette.

1 The World’s Smallest Icon Editor

Windows De­vel­oper’s Jour­nal, September 1997

Download Code

This article describes 600 lines of C++ that im­p­le­ment a complete icon/bitmap editor. The main challenge was to get as much functionality as possible from as few lines of code as possible. Here is [then] editor Ron Burk’s WDM blurb:

“Users like to customize their software, and more Windows programs these days let users rearrange toolbars, customize menus, and so on. One feature most programs don’t provide is the ability to customize icons, toolbar bitmaps, and the like. The reason is simple: Windows offers no common dia­log to handle this task. This article provides a tiny, elegant DLL that makes it easy to let users customize the icons and bitmaps in your pro­g­ram’s user in­ter­fa­ce.”

The follow-up article, An Extended Icon Editor, extends the editor with new functionality.

(Start bottom menu)

Win­dows De­vel­oper Maga­zineR&D BooksCMP Books Petter Hesselberg

(End bottom menu)

Windows Developer Magazine

WDM has merged with Dr. Dobbs Journal.