title: Using SwapMouseButton( TRUE ); to allow right click dragging of a window
body: <p>I am required to somehow allow a window to be moved using a right click drag option. I have done this via some sneeky code which I don't really like but it works.</p>
  
  <p>Currently I am trapping the WM_NCRBUTTONDOWN message and setting a bool to say that I am in move mode, resetting this variable when the WM_NCRBUTTONUP is received. While in moving mode I am checking for WMNCMouseMove and moving the form myself. As this is slow to keep up with quick mouse movements I also set a timer to do the same using the GetCursorPos.</p>
  
  <p>I have recently discovered the SwapMouseButton function and this does exactly what I want. However there is a but! I need to swap it conditionally and only when the user has right clicked the CAPTION area of a window. </p>
  
  <p>So I swap the mouse buttons round when I receive the WM_NCRBUTTONDOWN and reset on WM_NCRBUTTONUP. However this will work on subsequent clicks provided the WM_NCRBUTTONUP never reset it. This I think is because the clicking event has already happened so is to late to swap which is why it works for subsequent right click hits but not the right click and drag which caused the swapping of the mouse!</p>
  
  <p>Can anybody see a way around this. Baring in mind that I need the left click functionality for the close, minimize, maximise buttons etc. Right click onyl for the moving! </p>
  
  <p>Please Help!!!!! </p>
  
  <p>Thanks,
  Joe </p>