Article ID: 166242
Article Last Modified on 11/21/2006
APPLIES TO
- Microsoft Foundation Class Library 4.2, when used with:
- Microsoft Visual C++ 2.0 Professional Edition
- Microsoft Visual C++ 4.0 Standard Edition
- Microsoft Visual C++ 4.1 Subscription
- Microsoft Visual C++ 4.2 Enterprise Edition
- Microsoft Visual C++ 4.2 Professional Edition
- Microsoft Visual C++ 5.0 Enterprise Edition
- Microsoft Visual C++ 5.0 Professional Edition
- Microsoft Visual C++ 6.0 Enterprise Edition
- Microsoft Visual C++ 6.0 Professional Edition
- Microsoft Visual C++ 6.0 Standard Edition
This article was previously published under Q166242
SYMPTOMS
The text in a statusbar pane of a MDI application may disappear when a
CMDIChildWnd window is open. This occurs if the Pane ID is 59142 (0xE706)
and the Update UI handler is in the CMainFrame.
CAUSE
The ID 59142 is used internally in MFC as the ID for ID_INDICATOR_KANA.
CFrameWnd has a default Update UI handler for this ID, and can replace user-
defined behavior by intercepting UPDATE_COMMAND_UI messages before they are
routed to the user-defined Update UI handler.
The following conditions are required to exhibit this problem:
- A new pane with an ID of 59142 is added to the status bar.
- The Update UI handler of the pane is only in the CMainFrame Class.
The framework searches the command route for Update UI handlers for the
status bar panes. When a CMDIChildWnd derived class is open, the framework
finds the update UI handler in this object before it gets to the CMainFrame
class. The framework uses this handler to update the pane. Since the KANA
lock key is unlocked on non-Japanese systems the pane is disabled and it is
blank.
When no CMDIChildWnd windows are open the pane is updated according to the
Update UI handler in the CMainFrame class. The framework will not find the
standard handler in the CFrameWnd class since it searches the derived class
message maps before the base class message maps.
RESOLUTION
The problem can be overcome by changing the ID of the pane, or by deriving
a class from CMDIChildWnd and putting a custom Update UI handler for the
pane there.
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article.
MORE INFORMATION
ID_INDICATOR_KANA is used to display the state of the KANA lock key
(present on Japanese systems). The handler checks for the key and enables/
disables the pane depending on the state of the key. On non-Japanese
versions this key is always unlocked.
Additional query words: 3.0 3.1 3.2 CStatusBar
Keywords: kbprb kbstatbar kbuidesign KB166242