Solved

Assigning and Getting Text from a Mask Edit Box

Posted on 1998-05-18
2
515 Views
Last Modified: 2013-11-20
How do you assign and retrieve text from a mask edit box?! The online resource says to use <object>.Text;  However the compiler tells me that Text is not a member of CMSMask.  I also tried some of the other member functions such as GetText to no avail.  Does anybody have a working example of CMSMask?  This is associated with MicroSofts MSMASK32.OCX....Thanks
0
Comment
Question by:graber
2 Comments
 

Accepted Solution

by:
javan earned 100 total points
ID: 1312123
1)  In the resource editor, add the Mask edit control to your project.
2)  Place a masked edit control on the form
3)  Associate a variable with the control

//To get text
CString str;
str = m_ctlMaskEdit.GetText();

//To set text
m_ctlMaskEdit.SetText(_T("12-13-98"));

Make sure that the text that you are setting is a legal format.  This should work for you from an MFC based application.

0
 
LVL 3

Expert Comment

by:Norbert
ID: 1312124
thanks Javan.....The documentation was erronous
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need a Shell script to start a service checking the port 6 48
Add content to output file 4 62
WinWaitActive parameters 12 31
isEverywhere  challenge 19 72
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now