I am converting my project from single to multi-threaded. The single threaded version has lots and lots of variables all in the dialog's class that get set by the GUI. The new worker thread consists of several functions that must use all of these variables.

I am in the process of creating a container class that is made up of all of these variables and then either passing a copy of it to the thread function or making it global (I'll probably end up making it global so the variables dont' have to be passed to each function - call me lazy if you will. )

Am I going about this a good way, or is there a better (less code editing, safer, etc.) way of doing it? I'm pretty sure that I should not access the variables inside the dialog class from the worker thread - hence this effort - is that correct?

Thanks