Chapter 3. Windows and Messages

In the first two chapters, the sample programs used the MessageBox function to deliver text output to the user. The MessageBox function creates a “window.” In Windows, the word “window” has a precise meaning. A window is a rectangular area on the screen that receives user input and displays output in the form of text and graphics.

The MessageBox function creates a window, but it is a special-purpose window of limited flexibility. The message box window has a title bar with a close button, an optional icon, one or more lines of text, and up to four buttons. However, the icons and buttons must be chosen from a small collection that Windows provides for you.

The MessageBox function is certainly useful, but we’re not ...

Get Programming Windows®, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.