- msStyle |= ES_AUTOHSCROLL;
-
- if (m_windowStyle & wxHSCROLL)
- msStyle |= (WS_HSCROLL | ES_AUTOHSCROLL);
-
- if (m_windowStyle & wxTE_READONLY)
- msStyle |= ES_READONLY;
-
- if (m_windowStyle & wxHSCROLL)
- msStyle |= (WS_HSCROLL | ES_AUTOHSCROLL);
- if (m_windowStyle & wxTE_PASSWORD) // hidden input
- msStyle |= ES_PASSWORD;
-
- // we always want the characters and the arrows
- m_lDlgCode = DLGC_WANTCHARS | DLGC_WANTARROWS;
-
- // we may have several different cases:
- // 1. normal case: both TAB and ENTER are used for dialog navigation
- // 2. ctrl which wants TAB for itself: ENTER is used to pass to the next
- // control in the dialog
- // 3. ctrl which wants ENTER for itself: TAB is used for dialog navigation
- // 4. ctrl which wants both TAB and ENTER: Ctrl-ENTER is used to pass to
- // the next control
- if ( m_windowStyle & wxTE_PROCESS_ENTER )
- m_lDlgCode |= DLGC_WANTMESSAGE;
- if ( m_windowStyle & wxTE_PROCESS_TAB )
- m_lDlgCode |= DLGC_WANTTAB;
-
- // do create the control - either an EDIT or RICHEDIT
- const wxChar *windowClass = wxT("EDIT");
-
- bool want3D;
- WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D);
-
- // Even with extended styles, need to combine with WS_BORDER for them to
- // look right.
- if ( want3D || wxStyleHasBorder(m_windowStyle) )
- msStyle |= WS_BORDER;
-
- // NB: don't use pos and size as CreateWindowEx arguments because they
- // might be -1 in which case we should use the default values (and
- // SetSize called below takes care of it)
- m_hWnd = (WXHWND)::CreateWindowEx(exStyle,
- windowClass,
- NULL,
- msStyle,
- 0, 0, 0, 0,
- GetHwndOf(parent),
- (HMENU)m_windowId,
- wxGetInstance(),
- NULL);
-
- wxCHECK_MSG( m_hWnd, FALSE, wxT("Failed to create text ctrl") );
-*/
- SubclassWin(GetHWND());
-
- // set font, position, size and initial value
- wxFont& fontParent = parent->GetFont();
- if ( fontParent.Ok() )