title: Winapi : Handling custom and default non-client controls
body: <p>Non-client control events are all default controlled by <strong>DefWindowProc</strong>. I want to create my own custom non-client controls; this leads me to intercepting the <strong>WM_NCPAINT</strong> msg and probably creates my own handle to control windows in the non-client area. If I am to create a minimize or maximize button, then I'll have to recreate (from scratch?) and intercept all the events that default windows procedure suppose to handle, because the size, location, and attribute of my custom buttons are not the same with the default ones. However, I am still not very sure if this is the common ways people create custom non-client controls that mimicked default non-client controls, so I want to make sure if I am on the right track:</p>
  
  <ol>
  <li>Do not pass in default window style
  that specify creation of non-client
  controls (Existence of Minimize,
  Maximize, Close button)</li>
  <li>Create my own window controls (for
  e.g. buttons) inside the non-client area</li>
  <li>Intercept all the message relate to
  them. if the custom window is a
  default one, for example Minimize
  button, then send messages relate to
  that button? <strong>(However, I only see
  WM_CLOSE message, there's no
  WM_MINIMIZE or WM_MAXIMIZE)</strong></li>
  </ol>
  
  <p>I am having troubles with handling all default procedures; if possible, I'd like to see what's inside <strong>DefWindowProc</strong> (So I could mimic their functions and simultaneously add mine)</p>