- // It's a wxWindows window
- if (msg.message != WM_LBUTTONDOWN)
- {
- // Hit one of our owned windows -- eat the message.
- PeekMessage(&msg, NULL, msg.message, msg.message, PM_REMOVE);
- return TRUE;
- }
- int iHit = (int)::SendMessage(hWndHit, WM_NCHITTEST, 0,
- MAKELONG(msg.pt.x, msg.pt.y));
- if (iHit == HTMENU || iHit == HTSYSMENU)
- {
- // Eat this message, send the event and return
- PeekMessage(&msg, NULL, msg.message, msg.message, PM_REMOVE);
- DispatchEvent(win, wxPoint(msg.pt.x, msg.pt.y));
- return FALSE;
- }
- else if (iHit == HTCLIENT)
- {
- PeekMessage(&msg, NULL, msg.message, msg.message, PM_REMOVE);
- DispatchEvent(win, wxPoint(msg.pt.x, msg.pt.y));
- return FALSE;
- }
- else
- {
- PeekMessage(&msg, NULL, msg.message, msg.message, PM_REMOVE);
- return FALSE;
- }