Pythonwin, DefWindowProc bug?

Mark Hammond mhammond at skippinet.com.au
Mon Feb 4 13:49:27 CET 2002


Presumably _OnWMNCHitTest(self) is not the direct WndProc handler (as 
the param list is different).  Are you sure the result is getting back 
to the top-level correctly?

Other than that I am out of ideas.

Mark.

Keith Farmer wrote:
> Still isn't working -- it's printing "HTBORDER" as before, so it's
> presumably returning it as well.  Win's still changing the cursor and
> allowing resize as if it were still getting HTBOTTOM, etc.
> 
>  def _OnWMNCHitTest(self, params):
>   wParam = params[2]
>   lParam = params[3]
>   lr = win32gui.DefWindowProc(self._GetAppBarWnd().GetSafeHwnd(),
>       WM_NCHITTEST,
>       wParam,
> #      0,
>       lParam
> #      self._LowHighWordsToLparam(win32api.GetCursorPos())
>      )
>   if (lr == HTBOTTOM or lr == HTBOTTOMLEFT or lr == HTBOTTOMRIGHT):
>    print "HTBORDER"
>    return HTBORDER
>   else:
>    return lr
> 
> --
> ----------
> Keith J. Farmer
> kfarmer at thuban.org
> http://www.thuban.org
> 
> "Mark Hammond" <mhammond at skippinet.com.au> wrote in message
> news:3C5E34BA.6030702 at skippinet.com.au...
> 
> 
>>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.
> 
> 
> 
> 





More information about the Python-list mailing list