BUG: VBX Events Aren't Routed Correctly

ID: Q125795


The information in this article applies to:


SYMPTOMS

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.


CAUSE

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.


RESOLUTION

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:


STATUS

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 
Version           : 1.00 1.50 1.51 1.52
Platform          : WINDOWS 
Issue type        : 

Last Reviewed: July 20, 1999