Warning When Caps Lock when entering password

Posted on 2009-02-16
Last Modified: 2013-11-25
The default when entering into a password field in XP is to receive a bubble warning if the "caps lock" key is active. Somehow, this has been disabled. The field still echoes asterisks.
How can the default behaviour be restored?
Question by:BeaconSoftware
    LVL 8

    Expert Comment

    This is default behavior in the windows login screen and other windows screens not the textbox control.
    This behaviour isnt coded into the textbox control in visual studio. You would need to implement this functionality yourself.


    Author Comment

    I believe that if the "Password" property of a text box is set to true, not only is the input echoed as asterisks, but a warning bubble is shown when the CAPS LOCK key is on.
    Somehow, I have managed to disable the warning bubble (tooltip) and I would like to restore it.
    LVL 3

    Accepted Solution

    This is indeed the correct behavior of the edit control in XP and above. If it doesn't happen in your edit control, then you might not have the correct manifest settings. It requires version 6 and above of the common controls library (which requires the application manifest).
    The following code placed in the stdafx.h file works for me. This is the default code placed by VS2005 for new projects.

    #if defined _M_IX86
    #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
    #elif defined _M_IA64
    #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
    #elif defined _M_X64
    #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
    #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")

    Open in new window

    LVL 3

    Expert Comment

    Another possibility (if you are using the correct manifest) may be that you have inadvertently swallowed up the EM_SHOWBALLOONTIP message for the edit control.

    Author Comment

    Thanks Melange, your manifest change is the solution. (The code was in stdafx.h but inoperative because of a define not made).
    In this app, there was no chance of any messages being swallowed

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
    Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now