FIX: SetMinHeight Does Not Work Correctly with CStatusBar (151031)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 4.0
- Microsoft Visual C++, 32-bit Professional Edition 4.1
- Microsoft Visual C++, 32-bit Professional Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Learning Edition 4.0
- Microsoft Visual C++, 32-bit Learning Edition 4.2
This article was previously published under Q151031 SYMPTOMS
Using the SetMinHeight function to change the height of a CStatusBar object
has no effect.
CAUSE
The CStatusBar class maintains the height of the status window control in a
member variable named m_nMinHeight. The m_nMinHeight variable is not
updated correctly when the SetMinHeight function is used to change the
height of the status bar.
RESOLUTION
You can work around this problem by setting m_nMinHeight to the correct
value in response to SetMinHeight. This is accomplished by deriving a class
from CStatusBar and handling the SB_SETMINHEIGHT message. In this handler,
call Default(), and then set m_nMinHeight to the new height.
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 Visual C++
version 6.0.
REFERENCES
For more information, please see: Visual C++ Books Online, and the Win32
SDK documentation.
Modification Type: | Major | Last Reviewed: | 12/8/2003 |
---|
Keywords: | kbBug kbfix kbNoUpdate kbStatBar kbui KbUIDesign kbVC600fix KB151031 |
---|
|