Home > Software engineering >  EDIT limits??
EDIT limits??

Time:11-14


As shown in figure, want to limit the edit range of 0-255, for example when I enter 256 25 because of scope can only input, and unable to enter the third?

CodePudding user response:

CEdit derived from a new class, process WM_CHAR messages

CodePudding user response:

Void CDrawEditDlg: : OnChangeEdit2 ()
{
The UpdateData (TRUE);
If (m_Edit2 & gt;
=256){
M_Edit2=25;
The UpdateData (FALSE);
}
  • Related