case WM_LBUTTONDOWN : case WM_LBUTTONUP : { // need to check to make sure the mouse click happens on the button if ( InternalHitTest(lParam) == FALSE ) { if (message == WM_LBUTTONDOWN) return 0; // just leave // If we are inside a corner but outside the button, // tell button proc that we are outside. lParam = 0xffffffff; // put the pt at (-1,-1) } return CallWindowProc(fnOrgBtn, hWnd, message, wParam, lParam); }