title: Win32 API 2 child buttons of the main window are not getting the WM_MOUSEMOVE message
body: <p>I have a window with 2 child buttons on it and I was originally trying to make their text change color when I hover over and out but when I put the MessageBox () in the WM_MOUSEMOVE message I found out that I stop getting message boxes when my cursor is on either of the buttons. MSDN says that WM_MOUSEMOVE is sent to the window that contains the cursor, so.. I must be doing something wrong.</p>
  
  <pre><code>HWND hparent;
  HWND hplaybtt;
  HWND hexitbtt;
  HINSTANCE hinstance;
  
  LRESULT CALLBACK MainProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  
  void MakeWindow () {
   WNDCLASSEX wc;
   wc.cbSize        = sizeof (WNDCLASSEX);
   wc.style         = CS_HREDRAW | CS_VREDRAW;
   wc.lpfnWndProc   = MainProc;
   wc.cbClsExtra    = 0;
   wc.cbWndExtra    = 0;
   wc.hCursor       = LoadCursor( NULL, IDC_ARROW);
   wc.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH);
   wc.lpszMenuName  = NULL;
   wc.lpszClassName = L"Window";
   wc.hInstance     = hinstance;
   wc.hIcon         = NULL;
   wc.hIconSm       = NULL;
   RegisterClassEx (&amp;wc);
  
   hparent = CreateWindowEx (0, L"Window", L"Slot Machine", WS_OVERLAPPEDWINDOW, 0, 0, 300, 300,
    NULL, NULL, hinstance, NULL);
   hplaybtt = CreateWindowEx (0, L"Button", L"Play", WS_VISIBLE | WS_CHILD | BS_OWNERDRAW, 110, 125, 80, 50,
    hparent, (HMENU) 101, hinstance, NULL);
   hexitbtt = CreateWindowEx (0, L"Button", L"Exit", WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON, 110, 175, 80, 50,
    hparent, (HMENU) 102, hinstance, NULL);
  
   ShowWindow (hparent, SW_SHOW);
  }
  
  INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
   hinstance = hInstance;
   MSG Msg;
  
   MakeWindow (); 
  
   while (GetMessage (&amp;Msg, NULL, 0, 0)) {
    TranslateMessage(&amp;Msg);
          DispatchMessage(&amp;Msg);
   }     
  
   return Msg.wParam;
  }
  
  LRESULT CALLBACK MainProc (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) {
   PAINTSTRUCT ps;
   COLORREF cr = RGB (255, 0, 0);
   COLORREF white = RGB (255, 255, 255);
   HDC hdc;
   LPDRAWITEMSTRUCT dis;
  
      switch(Msg) {
    case WM_DRAWITEM:
     dis = (LPDRAWITEMSTRUCT) lParam;
     FillRect (dis-&gt;hDC, &amp;dis-&gt;rcItem, (HBRUSH) GetStockObject (BLACK_BRUSH));
     SetBkMode (dis-&gt;hDC, TRANSPARENT);
     SetTextColor (dis-&gt;hDC, white);
     TextOut (dis-&gt;hDC, 25, 15, L"Play", 4);
     MessageBox (hWnd, L"hi", NULL, MB_OK);
     break;
    case WM_PAINT:
     hdc = BeginPaint (hparent, &amp;ps);
     SetTextColor (hdc, cr);
     TextOut (hdc, 105, 50, L"Slot Machine", 12);
     EndPaint (hparent, &amp;ps);
     break;
    case WM_MOUSEMOVE:
     POINT p;
     p.x = LOWORD (lParam);
     p.y = HIWORD (lParam);
  
     MessageBox (hWnd, L"This is the slot machine game.", L"About", MB_OK);
  
     break;
    case WM_DESTROY:
     PostQuitMessage(WM_QUIT);
     break;
    default:
     return DefWindowProc(hWnd, Msg, wParam, lParam);
   }
   return 0;
  }
  </code></pre>