Print Page | Close Window

Obscuring text for Password entry

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=4738
Printed Date: 21 November 2024 at 9:38pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Obscuring text for Password entry
Posted By: vernonr
Subject: Obscuring text for Password entry
Date Posted: 04 August 2006 at 12:40pm
I am trying to cause a password to be obscured using asterisks using CXTPReportRecordItemEditOptions and setting

m_pEditOptions->m_dwEditStyle |= ES_PASSWORD;

Has anyone any advice on how I can get the toolkit to take notice of this ?
 
Thanks



Replies:
Posted By: vernonr
Date Posted: 10 August 2006 at 4:27am
Eventually solved this problem myself.....!! as no replies received
...
 
Not simple as Codejock buried the instantiation of CXTPReportInplaceEdit within CXTPReportRecordItem, and lots of functions in both call GetCaption for the string to display. Whilst it is possible to obscure the string - you actually need to blank the obscured string before allowing an edit - otherwise addition of characters in middle of string can cause havoc.
 
Brief Outline...
There derive subclasses from CXTPReportRecordItem ( overriding the classes that refer to the edit control ) . Derive a subclass from CXTPReportInplaceEdit and override the create function to call GetStartEditCaption - which returns a blank CString for a password, and the normal GetCaption() a non password. You'll need to adjust the class friends to get rid of linkage errors as well..
 
Don't use CXTPReportRecordItemText.
 
Cheers



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