Review the ReportView Control topic in the Consolidated WIL Help file. It has all the request you can use with the DialogControlSet/Get functions. Since you are executing this loop insides a Dialog user defined callback routine, you will need to disable the dialog, if the loop takes much time to exit. Otherwise, the system will think your dialog is hung. A better approach would be to add a timer event to check for event state changes.
It is difficult to add much more without knowing more about what kind and how you are detection your events.