title: Send windows message to a console application
body: <p>I have a DLL that send message to the UI application, most of the messages that the DLL send contains text in them, the GUI application get the message and act according to the message.</p>
  
  <p>I need to create a console application that works with the same DLL, Is there any option to get the messages to the console application, as in console application I do not have a windows message procedure.</p>
  
  <p>In the GUI application I load the DLL and use one of its function to set my current HWND to the DLL, once I do this all the messages are send to my GUI.</p>
  
  <p>I thought about adding a Boolean value to the DLL to know if the DLL was call from the GUI interface or from the command line console application, but that involve a lot of changes in the DLL code.</p>
  
  <p>How can I get or redirect the messages to the console application (command line interface)?</p>
  
  <p>The DLL, GUI and console application are coded in C/C++ using the win32 API.</p>
  
  <p>Thanks in advance</p>