title: How to know if code is running on the ui thread or a working thread (MFC Visual C++)
body: <p>I have a function that is being called from different threads in the application.
  I need to know whether the thread that executes the code is the main thread(ui thread) or a working thread.</p>
  
  <p>Any suggestion?</p>
  
  <p>Thanks.</p>