Another way to do this is to setup a class in your main dialog header and implementation that the secondary dialog can call to pass data back to the main dialog. In fact you can do this to pass data to the secondary dialog as well.

Both this and the one above are fairly simple to set up and use but like you I did not find any examples on line that did this and I struggled with it until I figured it out.