The information in this article applies to:
SUMMARY
Disabling a static text control that contains a mnemonic does not prevent
the control from responding to that key. For more information on static
text controls with mnemonics, query in this Knowledge Base on the word
"mnemonic".
MORE INFORMATION
When a static text control with a mnemonic is disabled using
EnableWindow(), it turns gray but it does not stop responding to the
mnemonic. This can cause problems because Windows processes the
mnemonic by setting the focus to the next nonstatic, enabled control.
When the ALT key is held down and a key is pressed, Windows scans the text
of each control to see if the key corresponds to a mnemonic. A WM_GETTEXT
message is sent to each control. Normally, the control processes this
message by returning its text. By returning an empty string in response to
this message, Windows does not find the mnemonic.
Because the mnemonic must work when the control is enabled, the IsWindowEnabled() function is used to determine the state of the control. If it is enabled, default processing occurs. Otherwise, the control is disabled and no text is returned, effectively disabling the mnemonic. Additional query words: WIN16SDK
Keywords : kbCtrl kbNTOS kbWinOS2000 kbSDKWin32 kbStaticCtrl kbGrpUser kbWinOS |
Last Reviewed: January 28, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |