Solved

Assigning and Getting Text from a Mask Edit Box

Posted on 1998-05-18
2
523 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Define unique primary key 9 100
format the code in java 6 117
post4 challenge 28 122
Message not shown 5 105
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: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Suggested Courses

751 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