FIX: Drop-down Combobox Does Not Move with Property Sheet (136302)
The information in this article applies to:
- Microsoft Visual C++ 1.52
- Microsoft Visual C++ 1.52b
- Microsoft Visual C++ 2.0
- Microsoft Visual C++ 2.1
- Microsoft Visual C++ 2.2
This article was previously published under Q136302 SYMPTOMS
When a combo box on the active page of a CPropertySheet object is opened
and the property sheet is moved by dragging it with the mouse, the
drop-down portion of the combo box stays at its current screen position; it
does not move with the underlying property sheet's dialog box.
NOTE: This bug consistently occurs in 16-bit applications running under
Windows 95 or Windows version 3.x. However, it does not occur when running
under Windows NT, and it occurs intermittently in 32-bit applications
running under Windows 95.
CAUSE
The _AfxCancelModes internal MFC function is not called from
CPropertySheet::PreTranslateMessage() as it is for CFrameWnd. In 32-bit
Visual C++, _AfxCancelModes is defined as AfxCancelModes.
RESOLUTION
To work around this problem, derive a class from CPropertySheet and
call _AfxCancelModes from the derived class's PreTranslateMessage when
the WM_LBUTTONDOWN or WM_NCLBUTTONDOWN messages are received. See the "Step-
By-Step Workaround" section in this article for an example.
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++, 32-bit Edition, version 4.0.
Modification Type: | Major | Last Reviewed: | 12/1/2003 |
---|
Keywords: | kbbug kbcode kbComboBox kbfix kbPropSheet KbUIDesign kbVC152fix kbVC200fix kbVC210fix kbVC220fix KB136302 kbAudDeveloper |
---|
|