|
Question : Use the Tab-Key in an Edit Box.
|
|
I´ve written a program were I among other things use a large Edit-Box. I´ve added Multiline and want Enter. BUT I would like to be able to use the Tab-Key like in Notepad, were the cursor jumps a little bit to the right each time you press it. If that´s possible, I would appriciate the code written out since I´m quite new at this. Thanx...
|
|
Answer : Use the Tab-Key in an Edit Box.
|
|
class CMyEdit : public CEdit { protected: afx_msg UINT OnGetDlgCode(); };
BEGIN_MESSAGE_MAP(CMyEdit, CEdit) ON_WM_GETDLGCODE() END_MESSAGE_MAP()
UINT CMyEdit::OnGetDlgCode() { return DLGC_WANTALLKEYS; }
Associate the edit control with CMyEdit instead of CEdit. (Use MFC ClassWizard/Member Variables to associate it)
|
|
|