title: CStatic subclassed Control fails to receive input messages
body: <p>I am using a MFC dialog based application and have a subclassed <code>CStatic</code> control. I would like to receive WM_MOUSEWHEEL and other messages inside my subclassed control but somehow those messages never arrive.</p>
  
  <p>Here is how my Dialog looks like:</p>
  
  <p><a href="https://i.stack.imgur.com/82cyd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/82cyd.png" alt="enter image description here"></a></p>
  
  <p>I'm only doing some really simple drawing and want to be able to move my list up and down by scrolling.</p>
  
  <p>I did already:</p>
  
  <ul>
  <li>Change the Tab-Order to ensure focus on the subclassed CStatic control first</li>
  <li>Overwrote OnNcHitTest to give focus to the subclassed CStatic all the time</li>
  <li>Added a scroll bar to the side</li>
  <li>Wrote message handler for WM_MOUSEWHEEL, WM_LBUTTONDOWN, WM_KEYDOWN and WM_VSCROLL</li>
  <li>Tried catching the messages in <code>PreTranslateMessage</code> </li>
  </ul>
  
  <p>Sadly nothing ever gets called when I'm scrolling inside the Dialog / Pressing a key or clicking with my mouse. The messages just don't arrive.</p>
  
  <p>Here is my Mousewheel handler for example:</p>
  
  <pre><code>class CFolderView : public CStatic
  {
     ...
     afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
     DECLARE_MESSAGE_MAP()
     ...
  }
  
  BEGIN_MESSAGE_MAP(CFolderView, CStatic)
      ON_WM_MOUSEWHEEL()
      ON_WM_KEYDOWN()
      ON_WM_LBUTTONDOWN()
  END_MESSAGE_MAP()
  
  BOOL CFolderView::OnMouseWheel(UINT nFlags, short zDelta, CPoint pt)
  {
      MessageBox("Mouse Wheel moved!", "Debug", MB_OK);
  
      return CStatic::OnMouseWheel(nFlags, zDelta, pt);
  }
  </code></pre>
  
  <p>I fail to understand why no input messages are being sent to my subclassed control. Is there some switch that enables input for a subclassed control?</p>