Chapter 9 Writing Custom Dialogs

Sooner or later, you will have to create your own dialogs, whether simple ones with only a few buttons and some text or highly complex dialogs with notebook controls, multiple panels, custom controls, context-sensitive help, and so on. In this chapter, we cover the principles of creating custom dialogs and transferring data between C++ variables and the controls. We also describe the wxWidgets resource system, which enables you to load dialogs and other user interface elements from XML files.

Steps in Creating a Custom Dialog

When you start writing your own specialized dialogs, the fun really starts. Here are the steps you’ll typically need to take:

1. Derive a new class from wxDialog.

2. Decide where ...

Get Cross-Platform GUI Programming with wxWidgets now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.