Solved

Assigning and Getting Text from a Mask Edit Box

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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

803 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