Skip to content

Latest commit

 

History

History
44 lines (26 loc) · 2.07 KB

life-cycle-of-a-dialog-box.md

File metadata and controls

44 lines (26 loc) · 2.07 KB
description title ms.date helpviewer_keywords ms.assetid
Learn more about: Working with Dialog Boxes in MFC
Working with Dialog Boxes in MFC
09/27/2019
dialog boxes [MFC], life cycle
modal dialog boxes [MFC], life cycle
modeless dialog boxes [MFC], life cycle
MFC dialog boxes [MFC], life cycle
life cycle of dialog boxes [MFC]
e16fd78e-238d-4f31-8c9d-8564f3953bd9

Working with Dialog Boxes in MFC

During the life cycle of a dialog box, the user invokes the dialog box, typically inside a command handler that creates and initializes the dialog object, the user interacts with the dialog box, then dialog box closes.

For modal dialog boxes, your handler gathers any data the user entered once the dialog box closes. Since the dialog object exists after its dialog window has closed, you can simply use the member variables of your dialog class to extract the data.

For modeless dialog boxes, you may often extract data from the dialog object while the dialog box is still visible. At some point, the dialog object is destroyed; when this happens depends on your code.

What do you want to know more about

See also

Dialog Boxes