title: Using afx_msg in Qt with msvc2008 compiler
body: <p>I'm working on a project in Qt with the msvc2008 compiler, as the title says.</p>
  
  <p>The sample code, which I'm trying to work from makes use of afx_maps, and as far as I can tell (I don't really have a clue how afx works), the code below means that when the message WM_PI_RAWDATA_READY is received (I have no idea where or how it's received), the function OnRawDataReady is triggered.</p>
  
  <pre><code>//{{AFX_MSG_MAP(CPDImfcDlg)
  ON_MESSAGE(WM_PI_RAWDATA_READY, OnRawDataReady )
  //}}AFX_MSG_MAP
  </code></pre>
  
  <p>I tried copying the code into my project, and then adding #include  in the header, but it gives me the following error:</p>
  
  <pre><code>D:\Program Files\Microsoft Visual Studio 9.0\VC\ATLMFC\INCLUDE\afx.h:24: error: C1189: #error :  Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]
  </code></pre>
  
  <p>The fixes I've found elsewhere for this seem to be project settings in visual studio, so I'm not sure how to get around it.</p>
  
  <p>Any ideas on how to fix this, or how to work around the afx_msg stuff?</p>
  
  <p>Many thanks</p>