When you subclass a window you must use CallWindowProc with the original window procedure you got as the return value from SetWindowLongPtr and not DefWindowProc as you have done. Also, since it's the button you are subclassing, because you want to modify its behaviour, you intercept its messages as required, not the parent window's. Taking these points into consideration, your button window procedure should be something like:All you're trying to do here is to get a double-click processed as a single click so that your owner drawn button behaves just like a normal one.Code:LRESULT CALLBACK ButtonProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam){ switch (message){ case WM_LBUTTONDBLCLK: return CallWindowProc(OldWndProc, hwnd, WM_LBUTTONDOWN, wParam, lParam); default: return CallWindowProc (OldWndProc, hwnd, message, wParam, lParam); } }