int exposure_time_ms = 8; // Two different numeric types. double laser_power_mw = 40.0; Dynamic_dialog dlg("Camera Image Capture", 155, 100); dlg.Add_OK_button(20, 70, 50, 14); dlg.Add_Cancel_button(85, 70, 50, 14); dlg.Add_edit_control("Exposure time", 15, "ms.", 70, 20, 45, 12, &exposure_time_ms, 1, 100); dlg.Add_edit_control("Laser power", 15, "mW.", 70, 40, 45, 12, &laser_power_mw, 0.1, 200.0); if (dlg.DoModal() == IDOK) { // ... more code ...
Example 1: Code for a dialog with two edit controls and two buttons.