03-05-2008 10:26 PM
03-06-2008 02:50 PM
As a simpler step, I'm trying to settle on rejecting paste operations, rather than misleadingly allowing paste to put text into the control.
I have added this to the panel callback in pwctrl.c
case EVENT_VAL_CHANGED:
{
short keyinfo;
keyinfo = GetKeyState(VK_CONTROL); //If the high-order bit is 1, the key is down
if( keyinfo & 0x8000) {
pwInfo->password[0] = 0; /* delete whole password */
SetCtrlAttribute(panel, control, ATTR_CTRL_VAL, "");
Beep();
}
}
If this is good, it might be a worthwhile addition to pwctrl.c that ships with CVI .. but I'd like some others to review & test it.
--Ian
11-18-2019 01:55 AM
I was watching for a way to disable the ctrl+v functionality because I`m asking a user to write down a password and confirm the new password by writing it again in a new string. This option helped me to disable simple copy-paste the first entered string.