Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Obscuring text for Password entry
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Obscuring text for Password entry

 Post Reply Post Reply
Author
Message
vernonr View Drop Down
Newbie
Newbie


Joined: 08 May 2006
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote vernonr Quote  Post ReplyReply Direct Link To This Post Topic: Obscuring text for Password entry
    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
Back to Top
vernonr View Drop Down
Newbie
Newbie


Joined: 08 May 2006
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote vernonr Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.