Reader small image

You're reading from  C++ Windows Programming

Product typeBook
Published inSep 2016
Reading LevelIntermediate
PublisherPackt
ISBN-139781786464224
Edition1st Edition
Languages
Right arrow
Author (1)
Stefan Björnander
Stefan Björnander
author image
Stefan Björnander

Stefan Björnander is the author of the books Microsoft Windows C++ and C++ Windows Programming. He holds a Master of Engineering and a Licentiate in Computer Science. He has worked as a software developer and as a teacher in computer science and mathematics for many years.
Read more about Stefan Björnander

Right arrow

Standard dialogs


In Windows, it's possible to define dialogs. Unlike windows, dialogs are intended to be populated with controls such as buttons, boxes, and text fields. A dialog may be modal, which means that the other windows of the application become disabled until the dialog is closed. In the next chapter, we will look into how we build our own dialogs.

However, in this section, we will look into the Windows standard dialogs for saving and opening files, choosing fonts and colors, and printing. Small Windows supports standard dialogs by wrapping the Win32 API function, which provides us with the dialogs.

The Save dialog

The SaveDialog function displays the standard Save dialogs.

The filter parameters filter the file types to be displayed. Each file format is defined in two parts: the text displayed in the dialog and the default file suffix. The parts are separated by a zero character and the filter is terminated with two zero characters. For instance, consider the following:

Word Files...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
C++ Windows Programming
Published in: Sep 2016Publisher: PacktISBN-13: 9781786464224

Author (1)

author image
Stefan Björnander

Stefan Björnander is the author of the books Microsoft Windows C++ and C++ Windows Programming. He holds a Master of Engineering and a Licentiate in Computer Science. He has worked as a software developer and as a teacher in computer science and mathematics for many years.
Read more about Stefan Björnander