Sign in to follow this  
helloworld123

[win32 api] how to set max characters allowed in an edit box?

Recommended Posts

how do you limit an edit/text box where user can type on to, say, 15 characters? I'm doing this to get the text on the edit box:
g_Username = new TCHAR[MAX_USERNAME_LEN];
GetDlgItemText(hWndDlg, IDC_USERNAME, g_Username, MAX_USERNAME_LEN);
but couldn't figure out how to limit the max. char user can type on IDC_USERNAME textbox. please help. thanks!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this