PRB: MeasureItem Not Called for Popup Item on Owner-Draw Menu (143209)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++, 32-bit Editions 1.0
- Microsoft Visual C++, 32-bit Editions 2.0
- Microsoft Visual C++, 32-bit Editions 2.1
- Microsoft Visual C++, 32-bit Editions 2.2
- Microsoft Visual C++, 32-bit Editions 4.0
- Microsoft Visual C++ for Windows, 16-bit edition 1.0
- Microsoft Visual C++ for Windows, 16-bit edition 1.5
- Microsoft Visual C++ for Windows, 16-bit edition 1.51
- Microsoft Visual C++ for Windows, 16-bit edition 1.52
This article was previously published under Q143209 SYMPTOMS
The CMenu::MeasureItem() function for an owner-draw menu isn't called for
those menu items that bring up submenus.
CAUSE
This is a limitation of the self-drawing capability of MFC owner-draw
menus.
RESOLUTION
For owner-draw menus that contain sub-popup menus, handle the
WM_MEASUREITEM in the owning window. See the "Sample Code" section in this
article for an example.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 12/1/2003 |
---|
Keywords: | kbcode kbMenu kbprb KbUIDesign KB143209 |
---|
|