title: Win32 C++ ListView HDN_BEGINTRACK not working
body: <p>I have a ListView whose columns I'd like to prevent being resized. I'm using code similar to <a href="https://stackoverflow.com/questions/13325887/winapi-listview-cant-prevent-columns-from-resizing">this</a> question, however my <code>HDN_BEGINTRACK</code> message isn't recognised.</p>
  <p>My code to create the ListView:</p>
  <pre><code>HWND Instructions_ListView = CreateWindowEx(LVS_EX_DOUBLEBUFFER |
        LVS_EX_FULLROWSELECT, WC_LISTVIEW, L&quot;&quot;, WS_CHILD | WS_VISIBLE | 
        LVS_REPORT | LVS_EDITLABELS, 320, 50, 300, 400, hWnd, NULL, NULL, NULL);
  </code></pre>
  <p>My code to handle the header events follows. <code>WM_NOTIFY</code> is inside of <code>WndProc</code> for the main program window:</p>
  <pre><code>case WM_NOTIFY:
  {
      UINT debugval = (((LPNMHDR)lParam)-&gt;code);
      switch (((LPNMHDR)lParam)-&gt;code)
      {
          case HDN_BEGINTRACKA:
          case HDN_BEGINTRACK:
          {
              ::MessageBox(hWnd, L&quot;RESIZE&quot;, L&quot;&quot;, MB_OK);
              break;
          }
      }
      break;
  }
  </code></pre>
  <p>When debugging the value of <code>debugval</code> is <code>4294966969</code> when breaking on (what should be) the <code>HDN_BEGINTRACK</code> event.</p>
  <p>Absolutely stumped as to why it's not working as intended; any help would be greatly appreciated.</p>