Pythonwin, DefWindowProc bug?
Mark Hammond
mhammond at skippinet.com.au
Mon Feb 4 02:12:41 EST 2002
Keith Farmer wrote:
> My mistake:
>
> lr = win32gui.DefWindowProc(self._GetAppBarWnd().GetSafeHwnd(),
> WM_NCHITTEST,
> 0,
> self._LowHighWordsToLparam(win32api.GetCursorPos())
> )
>
> I'm catching the message with:
> self._appbarwnd.HookMessage(self._OnWMNCHitTest, WM_NCHITTEST)
>
> And yet though I return HTBORDER, the edges are still resizeable. This is
> the C-code I'm trying to replicate:
>
> case WM_NCHITTEST:
> {
> LRESULT lr = DefWindowProc (hwnd, message, wParam, lParam) ;
>
> if (lr == HTBOTTOM || lr == HTBOTTOMLEFT || lr == HTBOTTOMRIGHT)
> return HTBORDER;
> else
> return lr;
> }
The major difference I see if the call to DefWindowProc. You seem to be
passing 0 for wParam, and GetCursorPos() for lParam.
Try passing wParam and lParam exactly as passed to you, as per the C++ code.
Mark.
More information about the Python-list
mailing list