Print Page | Close Window

Password Fields

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=316
Printed Date: 03 May 2024 at 12:34am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Password Fields
Posted By: JDonovan
Subject: Password Fields
Date Posted: 29 December 2003 at 9:08pm

Is there an easy way to add a password protected edit control in a Property Grid? I added my own custom edit control without problem (all based on the CustomItems code supplied from CodeJock), and this control is a CEdit with the ES_PASSWORD flag on. It works great at initialization and when editing the text, but as soon as focus goes to another section the *actual* text is written back to the grid cell. I really need to use this with password protection on some of the fields, any help would be appreciated.

Thanks!

 

- Jeffrey Donovan

 

 




Replies:
Posted By: Oleg
Date Posted: 30 December 2003 at 1:26am

override OnDrawItemValue:

 

BOOL CCustomItemIcon::OnDrawItemValue(CDC& dc, CRect rcValue)
{

CString strPassword = {"*" * length(m_strValue)} 

 dc.DrawText( strPassword, rcValue,  DT_SINGLELINE|DT_VCENTER);

 return TRUE;
}



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: JDonovan
Date Posted: 30 December 2003 at 6:13am

Perfect!

 

Thanks so much for the help and fast response Oleg, appreciate it muchly.

 

- Jeffrey Donovan




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net