The information in this article applies to:
SUMMARY
If an application for Windows uses the Dynamic Data Exchange Management
Library (DDEML) in addition to a message hook [for example, by calling
SetWindowsHook() or SetWindowsHookEx()], it is possible that your hook
procedure will receive messages that are intended for the DDEML libraries.
MORE INFORMATION
If your hook procedure receives a code of type MSGF_DDEMGR, you should
return FALSE instead of calling the CallNextHookEx() function.
In cases where the callback function processes the message, it should
return TRUE.
Note, however, how the message filter function is called from within DDEML:
Given this, a callback function that just returns would cause the
CallMsgFilter() call above to return TRUE, and never dispatch the message.
This inevitably causes an infinite loop in the application, because
GetMessage() ends up retrieving the same message over and over, without
dispatching it to the appropriate window for processing.
Therefore, a callback function that processes the message may not just return TRUE, but should also translate and dispatch messages appropriately. The Windows 3.1 SDK's DDEMLCL sample demonstrates how to do this correctly in its MessageFilterProc() found in DDEMLCL.C:
For more information about message hooks and DDEML, please see the
above mentioned functions in the Windows SDK manual or the online help
facility.
Additional query words: 3.00
Keywords : kbDDE kbGrpUser kbUser |
Last Reviewed: December 3, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |