FIX: DisplayAsDefault Ambient Property Not Updated for Control (148616)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++, 32-bit Professional Edition 4.0
- Microsoft Visual C++, 32-bit Learning Edition 4.0
This article was previously published under Q148616 SYMPTOMS
When you use the arrow keys to change between controls in a Visual C++ 4.0
generated container, the DISPID_AMBIENT_DISPLAYASDEFAULT ambient property
of the control site is not updated, and any control that relies on this
property doesn't function correctly.
For example, a subclassed button control that is programmed to update its
border according to the DISPID_AMBIENT_DISPLAYASDEFAULT ambient property
will exhibit this behavior. In a Visual C++ generated container, the
control won't update its border.
CAUSE
In Occdlg.cpp, the following line 542 shouldn't be called:
bCheckDef = FALSE;
This line keeps CheckDefPushButton from being called and the ambient
property from being updated.
RESOLUTION
The best solution is to upgrade to Visual C++ 4.1. If this is not a
possibility, the MFC DLL can be rebuilt without bCheckDef = FALSE; however,
Microsoft recommends against this because you need to rebuild the DLL with
a different name (see tech note 33).
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This problem was corrected in Microsoft
Visual C++ version 4.1.
| Modification Type: | Major | Last Reviewed: | 11/18/2003 |
|---|
| Keywords: | kbBug kbContainer kbCtrl kbfix kbLocalSvr kbNoUpdate kbVC410fix KB148616 |
|---|
|