ReactOS  0.4.14-dev-49-gfb4591c
CTextEditWindow Class Reference

#include <textedit.h>

Inheritance diagram for CTextEditWindow:
Collaboration diagram for CTextEditWindow:

Public Member Functions

LRESULT OnCreate (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSize (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnClose (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCommand (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnToolsModelToolChanged (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 

Public Attributes

CWindow editControl
 

Detailed Description

Definition at line 11 of file textedit.h.

Member Function Documentation

◆ OnClose()

LRESULT CTextEditWindow::OnClose ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 32 of file textedit.cpp.

33 {
35  return 0;
36 }
#define SW_HIDE
Definition: winuser.h:762
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)

◆ OnCommand()

LRESULT CTextEditWindow::OnCommand ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 38 of file textedit.cpp.

39 {
40  switch(HIWORD(wParam))
41  {
42  case EN_UPDATE:
43  {
49  break;
50  }
51  }
52  return 0;
53 }
int GetWindowTextLength() const
Definition: atlwin.h:792
WPARAM wParam
Definition: combotst.c:138
CHAR * LPTSTR
Definition: xmlstorage.h:192
char TCHAR
Definition: xmlstorage.h:189
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
CWindow editControl
Definition: textedit.h:24
int GetWindowText(LPTSTR lpszStringBuf, int nMaxCount) const
Definition: atlwin.h:776
LPTSTR textToolText
Definition: main.cpp:25
void ForceRefreshSelectionContents()
Definition: selection.cpp:56
int textToolTextMaxLen
Definition: main.cpp:26
#define HIWORD(l)
Definition: typedefs.h:246
#define EN_UPDATE
Definition: winuser.h:2010
#define HEAP_GENERATE_EXCEPTIONS
Definition: nt_native.h:1694
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ OnCreate()

LRESULT CTextEditWindow::OnCreate ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 14 of file textedit.cpp.

15 {
16  /* creating the edit control within the editor window */
17  RECT editControlPos = {0, 0, 0 + 100, 0 + 100};
18  editControl.Create(_T("EDIT"), m_hWnd, editControlPos, NULL,
21  return 0;
22 }
#define ES_MULTILINE
Definition: pedump.c:667
#define WS_CHILD
Definition: pedump.c:617
smooth NULL
Definition: ftsmooth.c:416
#define ES_AUTOVSCROLL
Definition: pedump.c:671
#define _T(x)
Definition: vfdio.h:22
HWND Create(LPCTSTR lpstrWndClass, HWND hWndParent, _U_RECT rect=NULL, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
Definition: atlwin.h:383
CWindow editControl
Definition: textedit.h:24
#define ES_NOHIDESEL
Definition: pedump.c:673
#define WS_HSCROLL
Definition: pedump.c:628
#define WS_BORDER
Definition: pedump.c:625
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
#define WS_VSCROLL
Definition: pedump.c:627
#define WS_VISIBLE
Definition: pedump.c:620
#define ES_AUTOHSCROLL
Definition: pedump.c:672

◆ OnSize()

LRESULT CTextEditWindow::OnSize ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 24 of file textedit.cpp.

25 {
26  RECT clientRect;
27  GetClientRect(&clientRect);
28  editControl.MoveWindow(clientRect.left, clientRect.top, RECT_WIDTH(clientRect), RECT_HEIGHT(clientRect), TRUE);
29  return 0;
30 }
#define TRUE
Definition: types.h:120
BOOL MoveWindow(int x, int y, int nWidth, int nHeight, BOOL bRepaint=TRUE)
Definition: atlwin.h:958
#define RECT_WIDTH(a)
Definition: definitions.h:19
LONG top
Definition: windef.h:292
LONG left
Definition: windef.h:291
CWindow editControl
Definition: textedit.h:24
#define RECT_HEIGHT(a)
Definition: definitions.h:22
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)

◆ OnToolsModelToolChanged()

LRESULT CTextEditWindow::OnToolsModelToolChanged ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 55 of file textedit.cpp.

56 {
58  return 0;
59 }
#define TOOL_TEXT
Definition: definitions.h:144
#define SW_HIDE
Definition: winuser.h:762
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
WPARAM wParam
Definition: combotst.c:138
#define SW_SHOW
Definition: winuser.h:769

Member Data Documentation

◆ editControl

CWindow CTextEditWindow::editControl

Definition at line 24 of file textedit.h.

Referenced by OnCommand(), OnCreate(), and OnSize().


The documentation for this class was generated from the following files: