Do you want to pass this data as a reference? ie do you want the dialog and the other thread to both be able to change the same data?

If not, just make a copy and pass the copy to the thread. Then you have no headaches about mutexes etc.

Otherwise, use pointers and mutexes.