Thats exactly what a Gtk::Dialog is for. You associate response IDs to the buttons in the dialog's action area and dialog.run() returns the response ID of the button that has been pressed.I would like to have control of the dialog - that is what button was pressed (OK or Cancel) in order to handle the program logic correctly.
You may also show() your dialog to make it nonmodal, but you will have to connect signal handlers to the dialog buttons then.