[pywin32-bugs] [ pywin32-Patches-1051122 ] Removed Windows message hook
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
|
From: SourceForge.net <no...@so...> - 2004-10-20 23:19:03
|
Patches item #1051122, was opened at 2004-10-21 02:19 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=1051122&group_id=78018 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Adal Chiriliuc (adalx) Assigned to: Nobody/Anonymous (nobody) Summary: Removed Windows message hook Initial Comment: This is an EXPERIMENTAL patch. It could break existing applications. One major change is that the default message handler is no longer called always as the HookMessage help page tells you. This is required sometimes (when handling WM_GETMINMAXINFO for example). In those cases use something like this: res = self.WindowProc(message, wParam, lParam). Another change is that now the value returned by your Python handler will be passed back to Windows. So please return an integer (usually 0) as required by the specific message you handle. Not returning an integer still works, through. Detailed changes: Added pResult parameter to Python_check_message in which it puts the handler return value. Made old CPythonWndFramework::WindowProc a special case of a new one which now dispatches messages to the Python handlers and deletes associations on WM_NCDESTROY. Disabled message hooking in HookWindowsMessages and message processing in Win32uiPreTranslateMessage. PyCWnd::DoKillAssoc now checks if the window was already detached before calling UnsubclassWindow. For an unknown reason this is necessary after the changes above. Added PyCWnd.WindowProc method which calls the underlying MFC one. Fixed Python_OnCmdMsg to not call the command handler if pHandlerInfo != NULL. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=1051122&group_id=78018 |