title: Getting the mouse coordinates in the WM_LBUTTONDOWN message
body: <p>the structure of <code>MSG</code> as followed:</p>
  
  <pre><code>typedef struct tagMSG {
    HWND   hwnd; 
    UINT   message; 
    WPARAM wParam; 
    LPARAM lParam; 
    DWORD  time; 
    POINT  pt; 
  } MSG, *PMSG; 
  </code></pre>
  
  <p><br>
  the message procedure as followed:</p>
  
  <pre><code>long WINAPI WndProc(HWND hWnd, UINT iMessage, UINT wParam, LONG lParam)
  </code></pre>
  
  <p><strong>My Question</strong>: In the message procedure, why it doesn't pass the <code>POINT</code> variable to window procedure, and how to find mouse's <code>POINT</code> ? By <code>GetCursorPos()</code> ? I find some example get it by <code>LOWORD(lParam), HIWORD(lParam)</code> directly.. can you tell me the information about it ? thank you...</p>
  
  <p>i had see someone write this, is it right ? i not sure:</p>
  
  <pre><code>RECT rect1;
  long WINAPI WndProc(HWND hWnd,UINT iMessage,UINT wParam,LONG lParam)
  {
      HDC hDC;        
      WORD x,y;   
      PAINTSTRUCT ps;     
  
      x = LOWORD(lParam); 
      y = HIWORD(lParam);
  
      switch(iMessage)
      {
      case WM_LBUTTONDOWN:
          if(wParam&amp;MK_CONTROL)
          {
              rect1.left = x; 
              rect1.top = y;
          }
          else if(wParam&amp;MK_SHIFT)
          {
              rect1.left = x; 
              rect1.top = y;
          }
          break;
  
      case WM_DESTROY:
          PostQuitMessage(0);
          return 0;
      default:
          return(DefWindowProc(hWnd,iMessage,wParam,lParam));
      }
      return 0;
  }
  </code></pre>