Solved

Assigning and Getting Text from a Mask Edit Box

Posted on 1998-05-18
2
514 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
ODBC Connection Logging, ADO.NET 6 49
notReplace  challenge 53 102
viewing source code from eclipse 13 74
sumHeights  challenge 17 61
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

757 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

19 Experts available now in Live!

Get 1:1 Help Now