BUG: VBX Events Aren't Routed Correctly |
Q125795
VBX Event handlers are not called even though the events have been properly registered using AfxRegisterVBEvent. You can solve the problem by reducing the size of the application's DGROUP by, for example, reducing stack size.
There is a bug in the routing mechanism for VBX events. The bug becomes apparent when an event's registered value is greater than 0xFF00; at which point, the program will not call the handler for the event because the routing in CCmdTarget::OnCmdMsg will not route the VBX event as a registered notification code but as a regular Windows message.
VBX events are registered using AfxRegisterVBEvent. The value assigned to
the VBX event is directly related to the amount of space available in the
default data segment. If an application's default data segment is nearing
maximum capacity (0xFFFF), then these values could end up being greater
than 0xFF00. Here are several possible workarounds for this problem:
Q49935 PRB: L2028 Error Caused by HEAPSIZE, STACKSIZE and DGROUP Size
// Constant code...
if ((UINT)nCode < 0xC000 || (UINT)nCode > 0xFF00) To:
if ((UINT)nCode < 0xC000 || (UINT)nCode == 0xFFFF) And change the following lines:
#endif //_DEBUG
if ((UINT)nCode < 0xC000 || (UINT)nCode > 0xFF00) To:
#endif //_DEBUG
if ((UINT) nCode < 0xC000 || (UINT)nCode == 0xFFFF) Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
Additional query words: 1.00 1.50 1.51 1.52 2.00 2.50 2.51 2.52 no32bit noupdate
Keywords : kb16bitonly
Issue type :
Technology : kbAudDeveloper kbMFC
|
Last Reviewed: May 8, 2001 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |