I'm following the example password project "pwsample.cws". I think I've followed it, and yet when I convert my text box like this:
passCtrlID = PasswordCtrl_ConvertFromString(passPanel,PASSWORD_COMMAND);
passCtrlID is getting a value of -46 (The attribute passed is invalid.) I can't figure out why that is. When I step through the pwsample project, the value passed is 2. What is going on?
Solved! Go to Solution.
Just to be sure it's not a typo: "text box" or "string control"? The control to convert must be a string: if you pass a different control you're likely to get an error.
Eureka! That was my problem, the control I was using (actually, I inherited this design, so it's not my fault!) was a single-line text box. No wonder! Changed it to a text string control and it works just fine.