programming tools for Windows applications development
  Home  |   SwiftForth Archive  |   SwiftX Archive  |

Re: hidden typing

From: Leon Wagner <leon_at_forth.com>
Date: Mon, 14 May 2007 08:06:09 -0700

Use edit control style ES_PASSWORD. More here:
http://msdn2.microsoft.com/en-us/library/ms672063.aspx

> -----Original Message-----
> From: sftalk-bounce_at_forth.com
> [mailto:sftalk-bounce_at_forth.com] On Behalf Of Dr. Roger Dube
> Sent: Monday, May 14, 2007 7:54 AM
> To: sftalk_at_forth.com
> Subject: [sftalk] hidden typing
>
> I need to enter passwords into an edit box, but either hide
> the typing or blank them out with asterisks.
> I use the following as the basis for regular "viewable"
> input. does anyone have any suggestions on how to use this
> basic type of structure but have the actual characters hidden
> or blanked out?
>
> Thanks.
>
> 100 ENUM ID_ADD
> ENUM ID_EDIT
> ENUM ID-CANCEL
> DROP
>
> VARIABLE OUTPUT 100 ALLOT OUTPUT 100 ERASE VARIABLE OUTPUT-ID
> VARIABLE IDENTITY!
>
> DIALOG sGETPASSWORD
> [MODAL " User, please enter your PASSWORD:" 20 20 220 50 ]
> [DEFPUSHBUTTON " &Accept" ID_ADD 10 20 30 12 ]
> [EDITTEXT ID_EDIT 10 6 210 12 ]
> [PUSHBUTTON " &Cancel" ID-CANCEL 50 20 30 12 ]
> END-DIALOG
>
> : RDLGMSG ( id msg wparam lparam -- res )
> HWND 4 -ROLL SendDlgItemMessage ;
>
> : FOCUS ( -- )
> HWND ID_ADD GetDlgItem SetFocus DROP ;
>
> : SIMPLE-CLOSE ( -- res ) HWND 0 EndDialog ;
>
> : NAME-TEXT ( -- )
> ID_EDIT WM_GETTEXT 500 OUTPUT RDLGMSG DROP
> FOCUS ;
>
> [SWITCH GETNAME-COMMANDS DROP ( wparam -- )
> IDOK RUN: SIMPLE-CLOSE FALSE IDENTITY! ! QUIT ;
> ID-CANCEL RUN: SIMPLE-CLOSE FALSE IDENTITY! ! QUIT ;
> ID_ADD RUN: TRUE IDENTITY! ! NAME-TEXT SIMPLE-CLOSE ; SWITCH]
>
> [SWITCH GETNAME-MESSAGES ZERO ( msg -- res )
> WM_COMMAND RUN: WPARAM LOWORD GETNAME-COMMANDS ;
> WM_INITDIALOG RUN: HWND ID_EDIT GetDlgItem SetFocus DROP ; SWITCH]
>
> :NONAME ( -- res ) MSG LOWORD GETNAME-MESSAGES ; 4 CB:
> GETNAME-CALLBACK
>
> VARIABLE NTEXT 100 ALLOT NTEXT 100 ERASE
>
> : sGET-PWSTRING ( -- )
> HINST sGETPASSWORD HWND GETNAME-CALLBACK 0
> DialogBoxIndirectParam THROW ;
>
>
>
> -- Roger
> --------------------------------------------
> Dr. Roger Dube
> President and Chief Science Officer
> Digital Authentication Technologies, Inc.
> 561.392.7404 (office)
> 561.892.2474 (eFax)
> HYPERLINK "mailto:RogerDube_at_datHQ.com"RogerDube_at_datHQ.com
>
> HYPERLINK "http://www.datHQ.com"http://www.datHQ.com
>
> 1900 Glades Road Suite 441
> Boca Raton, FL 33431
>
>
> ----------------------------------------------------------------------
> This email message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged
> information. Any unauthorized review, use, disclosure or
> distribution is prohibited. If you are not the intended
> recipient, please contact the sender by reply email and
> destroy all copies of the original message. Any views
> expressed in this message are those of the individual sender,
> except where the sender specifically states them to be the
> views of Digital Authentication Technologies, Inc.
>
>
>
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.467 / Virus Database: 269.7.0/803 - Release
> Date: 5/13/2007
> 12:17 PM
>
>
>
>
>
> ----------------------------------------------------------------------
> sftalk_at_forth.com The SwiftForth programming discussion email list
> To unsubscribe, send subject "unsubscribe" to
> sftalk-request_at_forth.com For list command help, send subject
> "help" to sftalk-request_at_forth.com Message archives are
> located at http://www.forth.com/archive/sftalk
> ----------------------------------------------------------------------
> This list is a forum for SwiftForth users. For product
> support and bug reports, please send email to support_at_forth.com
> ----------------------------------------------------------------------
>
>

----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and
bug reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Mon May 14 2007 - 08:06:29 PDT

This archive was generated by hypermail 2.2.0 : Wed Nov 19 2008 - 03:04:29 PST