O'Reilly logo

The Old New Thing: Practical Development Throughout the Evolution of Windows by Raymond Chen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter Three. The Secret Life of GetWindowText

THE GETWINDOWTEXT function is more complicated than you think. The documentation tries to explain its complexity with small words, which is great if you don’t understand long words, but it also means that the full story becomes obscured.

Here’s an attempt to give the full story.

How windows manage their text

THERE ARE TWO ways window classes can manage their text. They can do it manually or they can let the system do it. The default is to let the system do it.

If a window class lets the system manage its text, the system will do the following:

• Default handling of the WM_NCCREATE message takes the lpWindowName parameter passed to CreateWindow/Ex and saves the string in a “special place.”

• Default ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required