Well....using 'SendMessage' within a thread always opens the door for deadlocks. Thus, I woud rather suggest an event....which will be set by the application to trigger the thread to continue...
Code:
threadfunc()
{
  // Do some processing
  // Post message
  // Wait for event
  // Reset event
  // Do some more processing
}

application()
{
  // React on message
  // Set event
}