
CEdit box ** CEdit box ** CEdit box
This is what I would do.
Create a CEdit subclass called CMyEdit class.
Inside the subclass, handle ON_WM_CHAR message
as follows.
void CMyEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// Don't invoke the default handler
// CEdit::OnChar(nChar, nRepCnt, nFlags);
Quote:
}
The code above rejects any user key input.
To set a text in CEdit Box, simply use
SetWindowText("(714) 888-8888").
Mark T.
Quote:
> > Now, can anyone tell me how to put characters in edit boxes that CANNOT
be
> > erased or overridden by the user???? For example, in a phone number
box,
> > I need to permanently display parenthesis and a dash: ( ) -
> > (714) 888-8888
> > martin