Problem of   *   in the edit box

Posted on 2002-05-06
Last Modified: 2013-11-20
In a dialog based application,I have one edit box.I have enabled the password property(in styles property) during design time.While running the application,the edit box is showing * for the first time.If I have to enter my password in the editbox,I will have to delete the * and then I will have to edit the pasword.Here please tell me what to do to avoid *?

Waiting for your reply.

Question by:shankarraj
LVL 37

Accepted Solution

zzynx earned 50 total points
ID: 6991044

If you see "*" this simply means there's a character in that edit box.
If you want it to be empty than just make sure the corresponding CString is empty and no stars will be shown.

Of course you can also 'pre-select' the complete password and give that edit box the focus so that whenever the user starts typing, the content is automatically replaced by what he is typing.


Author Comment

ID: 6991069
Hi zzynx,

My password member variable is of type int, not CString.


Expert Comment

ID: 6991208
That * you see in your password box is probably a 0. Is your password always going to be a number? I'd suggest using a CString member variable instead of a int variable anyway for a password.

Expert Comment

ID: 6991384
Othewise you have overwrite ONINITDIALOG and reset that field manually....

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Named range not carried over 10 62
Process filename extension 3 172
Complete beginner needs help making a cron job 9 110
How to determine file rename from EventLog ? 2 43
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 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

21 Experts available now in Live!

Get 1:1 Help Now