Solved

Assigning and Getting Text from a Mask Edit Box

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

632 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