title: WinAPI SetWindowLongPtr - Changing windowProc
body: <p>On <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms644898%28v=vs.85%29.aspx" rel="nofollow">MSDN</a> website, I found following:</p>
  
  <blockquote>
    <p>Calling SetWindowLongPtr with the GWLP_WNDPROC index creates a
    subclass of the window class used to create the window. An application
    can subclass a system class, but should not subclass a window class
    created by another process. <strong>The SetWindowLongPtr function creates the
    window subclass by changing the window procedure associated with a
    particular window class</strong>, causing the system to call the new window
    procedure instead of the previous one. An application must pass any
    messages not processed by the new window procedure to the previous
    window procedure by calling CallWindowProc. This allows the
    application to create a chain of window procedures.</p>
  </blockquote>
  
  <p>Does this mean, that every time I call <code>SetWindowLongPtr</code> with <code>GWLP_WNDPROC</code>, new subclass will be created, or is Windows smart enough to create subclass only once if same procedure is passed multiple times as parameter?</p>