In c # just setting an attribute,
Would you please tell me what the method of VC to handle the situation?
CodePudding user response:
Use RichEdit controlCodePudding user response:
Use RichEdit controlCodePudding user response:
Use RichEdit controlCodePudding user response:
If not well, the TAB key or jump to other controls, can detailed say?CodePudding user response:
Derived their own EDIT, overloading pretranslate, send message to the parent form, again,,,,CodePudding user response:
BOOL CMyDlg: : PreTranslateMessage (MSG * pMsg){
If (pMsg - & gt; Message==WM_KEYDOWN & amp; & PMsg - & gt; WParam==VK_TAB & amp; & PMsg - & gt; HWND==m_cEdit. GetSafeHwnd ())
{
//processing in the Edit TAB
CString str;
M_cEdit. GetWindowText (STR);
Int nStart nEnd;
M_cEditProgram. GetSel (nStart nEnd);
If (nStart!=nEnd)
{
STR=STR. Left (nStart) + STR. Mid (nEnd);
}
STR. Insert (nStart, "\ t");
M_cEdit. SetWindowText (STR);
M_cEdit. SetSel (nStart nStart + 1, + 1);
Return TRUE;
}
Return CDialog: : PreTranslateMessage (pMsg);
}
CodePudding user response:
on the top floor!