Jul-30-2020, 06:45 AM
Can the button callback be responsible for making the thread? If not it sounds like you need an intermediary, somebody who knows about the current thread and provides a function for doing whatever the button needs to do. This could be a class method of your thread creator class (Heating Control), or a completely separate class designed to manage the interaction between GUI and threads.