ReactOS  0.4.15-dev-5496-g599ba9c
textedit.cpp
Go to the documentation of this file.
1 /*
2  * PROJECT: PAINT for ReactOS
3  * LICENSE: LGPL
4  * FILE: base/applications/mspaint/textedit.cpp
5  * PURPOSE: Text editor and font chooser for the text tool
6  * PROGRAMMERS: Benedikt Freisen
7  */
8 
9 /* INCLUDES *********************************************************/
10 
11 #include "precomp.h"
12 
13 #define CXY_GRIP 3
14 
15 /* FUNCTIONS ********************************************************/
16 
17 CTextEditWindow::CTextEditWindow() : m_hFont(NULL), m_hFontZoomed(NULL), m_nAppIsMovingOrSizing(0)
18 {
20 }
21 
22 #define X0 rc.left
23 #define X1 ((rc.left + rc.right - CXY_GRIP) / 2)
24 #define X2 (rc.right - CXY_GRIP)
25 #define Y0 rc.top
26 #define Y1 ((rc.top + rc.bottom - CXY_GRIP) / 2)
27 #define Y2 (rc.bottom - CXY_GRIP)
28 #define RECT0 X0, Y0, X0 + CXY_GRIP, Y0 + CXY_GRIP // Upper Left
29 #define RECT1 X1, Y0, X1 + CXY_GRIP, Y0 + CXY_GRIP // Top
30 #define RECT2 X2, Y0, X2 + CXY_GRIP, Y0 + CXY_GRIP // Upper Right
31 #define RECT3 X0, Y1, X0 + CXY_GRIP, Y1 + CXY_GRIP // Left
32 #define RECT4 X2, Y1, X2 + CXY_GRIP, Y1 + CXY_GRIP // Right
33 #define RECT5 X0, Y2, X0 + CXY_GRIP, Y2 + CXY_GRIP // Lower Left
34 #define RECT6 X1, Y2, X1 + CXY_GRIP, Y2 + CXY_GRIP // Bottom
35 #define RECT7 X2, Y2, X2 + CXY_GRIP, Y2 + CXY_GRIP // Lower Right
36 
38 {
39  RECT rcGrip;
40 
41  SetRect(&rcGrip, RECT0);
42  if (PtInRect(&rcGrip, pt))
43  return HTTOPLEFT;
44  SetRect(&rcGrip, RECT1);
45  if (PtInRect(&rcGrip, pt))
46  return HTTOP;
47  SetRect(&rcGrip, RECT2);
48  if (PtInRect(&rcGrip, pt))
49  return HTTOPRIGHT;
50 
51  SetRect(&rcGrip, RECT3);
52  if (PtInRect(&rcGrip, pt))
53  return HTLEFT;
54  SetRect(&rcGrip, RECT4);
55  if (PtInRect(&rcGrip, pt))
56  return HTRIGHT;
57 
58  SetRect(&rcGrip, RECT5);
59  if (PtInRect(&rcGrip, pt))
60  return HTBOTTOMLEFT;
61  SetRect(&rcGrip, RECT6);
62  if (PtInRect(&rcGrip, pt))
63  return HTBOTTOM;
64  SetRect(&rcGrip, RECT7);
65  if (PtInRect(&rcGrip, pt))
66  return HTBOTTOMRIGHT;
67 
68  // On border line?
69  RECT rcInner = rc;
70  InflateRect(&rcInner, -3, -3);
71  if (!PtInRect(&rcInner, pt) && PtInRect(&rc, pt))
72  return HTCAPTION;
73 
74  return HTCLIENT;
75 }
76 
78 {
80  HPEN hPen = CreatePen(PS_DOT, 1, GetSysColor(COLOR_HIGHLIGHT));
81  HGDIOBJ hPenOld = SelectObject(hDC, hPen);
82  InflateRect(&rc, -1, -1);
83  Rectangle(hDC, rc.left, rc.top, rc.right, rc.bottom);
84  InflateRect(&rc, 1, 1);
85  SelectObject(hDC, hPenOld);
86  SelectObject(hDC, hbrOld);
87  DeleteObject(hPen);
88 
89  RECT rcGrip;
90  HBRUSH hbrHighlight = GetSysColorBrush(COLOR_HIGHLIGHT);
91 
92  SetRect(&rcGrip, RECT0);
93  FillRect(hDC, &rcGrip, hbrHighlight);
94  SetRect(&rcGrip, RECT1);
95  FillRect(hDC, &rcGrip, hbrHighlight);
96  SetRect(&rcGrip, RECT2);
97  FillRect(hDC, &rcGrip, hbrHighlight);
98 
99  SetRect(&rcGrip, RECT3);
100  FillRect(hDC, &rcGrip, hbrHighlight);
101  SetRect(&rcGrip, RECT4);
102  FillRect(hDC, &rcGrip, hbrHighlight);
103 
104  SetRect(&rcGrip, RECT5);
105  FillRect(hDC, &rcGrip, hbrHighlight);
106  SetRect(&rcGrip, RECT6);
107  FillRect(hDC, &rcGrip, hbrHighlight);
108  SetRect(&rcGrip, RECT7);
109  FillRect(hDC, &rcGrip, hbrHighlight);
110 }
111 
113 {
114  CString szText;
115  GetWindowText(szText);
116 
117  RECT rcParent;
118  ::GetWindowRect(m_hwndParent, &rcParent);
119 
120  RECT rc, rcWnd, rcText;
121  GetWindowRect(&rcWnd);
122  rcText = rcWnd;
123 
124  HDC hDC = GetDC();
125  if (hDC)
126  {
128  TEXTMETRIC tm;
129  GetTextMetrics(hDC, &tm);
130  szText += TEXT("x"); // This is a trick to enable the last newlines
131  const UINT uFormat = DT_LEFT | DT_TOP | DT_EDITCONTROL | DT_NOPREFIX | DT_NOCLIP |
133  DrawText(hDC, szText, -1, &rcText, uFormat | DT_CALCRECT);
134  if (tm.tmDescent > 0)
135  rcText.bottom += tm.tmDescent;
136  ReleaseDC(hDC);
137  }
138 
139  UnionRect(&rc, &rcText, &rcWnd);
141 
142  rcWnd = rc;
143  ::GetClientRect(m_hwndParent, &rcParent);
144  IntersectRect(&rc, &rcParent, &rcWnd);
145 
147  MoveWindow(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, FALSE);
149 
152 
154 }
155 
157 {
158  if (wParam == VK_TAB)
159  return 0; // FIXME: Tabs
160 
161  CString szText;
162  GetWindowText(szText);
163 
165  FixEditPos(szText);
166 
167  return ret;
168 }
169 
171 {
172  if (wParam == VK_ESCAPE)
173  {
175  return 0;
176  }
177 
178  CString szText;
179  GetWindowText(szText);
180 
182  FixEditPos(szText);
183  return ret;
184 }
185 
187 {
191  return ret;
192 }
193 
195 {
196  HDC hDC = (HDC)wParam;
198  {
199  RECT rc;
200  GetClientRect(&rc);
201  HBRUSH hbr = CreateSolidBrush(paletteModel.GetBgColor());
202  FillRect(hDC, &rc, hbr);
203  DeleteObject(hbr);
204  }
206  return TRUE;
207 }
208 
210 {
211  RECT rc;
212  GetClientRect(&rc);
213 
214  DefWindowProc(nMsg, wParam, lParam);
215 
216  HDC hDC = GetDC();
217  if (hDC)
218  {
219  DrawGrip(hDC, rc);
220  ReleaseDC(hDC);
221  }
222 
223  return 0;
224 }
225 
227 {
228  RECT rc;
229  GetWindowRect(&rc);
230 
232  if (hDC)
233  {
234  OffsetRect(&rc, -rc.left, -rc.top);
235  DrawGrip(hDC, rc);
236  ReleaseDC(hDC);
237  }
238 
239  return 0;
240 }
241 
243 {
244  return 0; // No frame.
245 }
246 
248 {
250  RECT rc;
251  GetWindowRect(&rc);
252  return DoHitTest(rc, pt);
253 }
254 
256 {
257  UINT nHitTest = LOWORD(lParam);
258  if (nHitTest == HTCAPTION)
259  {
261  return FALSE;
262  }
263  return DefWindowProc(nMsg, wParam, lParam);
264 }
265 
267 {
269 
270  if (m_nAppIsMovingOrSizing == 0)
271  {
272  Reposition();
274  }
275  return ret;
276 }
277 
279 {
281 
282  RECT rc;
283  GetClientRect(&rc);
284  SendMessage(EM_SETRECTNP, 0, (LPARAM)&rc);
286 
287  if (m_nAppIsMovingOrSizing == 0)
288  {
289  Reposition();
291  }
292 
293  return ret;
294 }
295 
296 // Hack: Use DECLARE_WND_SUPERCLASS instead!
298 {
300 
303  HWND hwnd = ::CreateWindowEx(0, WC_EDIT, NULL, style, 0, 0, 0, 0,
305  if (hwnd)
306  {
307 #undef SubclassWindow // Don't use this macro
309 
310  UpdateFont();
311 
312  PostMessage(WM_SIZE, 0, 0);
313  }
314 
315  return m_hWnd;
316 }
317 
319 {
321  return;
322 
323  RECT rc;
324  SendMessage(EM_GETRECT, 0, (LPARAM)&rc);
325  MapWindowPoints(hwnd, (LPPOINT)&rc, 2);
326 
327  HBRUSH hbr = CreateSolidBrush(paletteModel.GetBgColor());
328  FillRect(hDC, &rc, hbr);
329  DeleteObject(hbr);
330 }
331 
333 {
334  UpdateFont();
335  return 0;
336 }
337 
339 {
341  if (m_hFont)
342  {
344  m_hFont = NULL;
345  }
346  if (m_hFontZoomed)
347  {
350  }
351  return 0;
352 }
353 
355 {
356  RECT rc;
357  GetWindowRect(&rc);
360 
361  GetClientRect(&rc);
363  rc.left = UnZoomed(rc.left);
364  rc.top = UnZoomed(rc.top);
365  rc.right = UnZoomed(rc.right);
366  rc.bottom = UnZoomed(rc.bottom);
367  m_rc = rc;
368 }
369 
371 {
372  UpdateFont();
373  return 0;
374 }
375 
377 {
378  UpdateFont();
379  return 0;
380 }
381 
383 {
384  UpdateFont();
386  return 0;
387 }
388 
390 {
391  if (wParam == TOOL_TEXT)
392  {
393  UpdateFont();
394  }
395  else
396  {
398  }
399  return 0;
400 }
401 
403 {
404  if (m_hFont)
405  {
407  m_hFont = NULL;
408  }
409  if (m_hFontZoomed)
410  {
413  }
414 
415  LOGFONT lf;
416  ZeroMemory(&lf, sizeof(lf));
417  lf.lfCharSet = DEFAULT_CHARSET; // registrySettings.CharSet; // Ignore
422 
423  HDC hdc = GetDC();
424  if (hdc)
425  {
426  INT nFontSize = registrySettings.PointSize;
427  lf.lfHeight = -MulDiv(nFontSize, GetDeviceCaps(hdc, LOGPIXELSY), 72);
428  ReleaseDC(hdc);
429  }
430 
432 
433  lf.lfHeight = Zoomed(lf.lfHeight);
435 
436  SetWindowFont(m_hWnd, m_hFontZoomed, TRUE);
438 
439  FixEditPos(NULL);
440 
441  Invalidate();
442 }
443 
445 {
450  return ret;
451 }
452 
454 {
455  *prc = m_rc;
456  return TRUE;
457 }
458 
460 {
461  if (prc)
462  m_rc = *prc;
463  INT x0 = Zoomed(m_rc.left), y0 = Zoomed(m_rc.top);
465 
467  MoveWindow(x0, y0, x1 - x0, y1 - y0, TRUE);
469 }
470 
472 {
473  RECT rc, rcImage;
474  GetWindowRect(&rc);
475 
477  imageArea.GetClientRect(&rcImage);
478 
479  if (rc.bottom > rcImage.bottom)
480  {
481  rc.top = rcImage.bottom - (rc.bottom - rc.top);
482  rc.bottom = rcImage.bottom;
483  }
484 
485  if (rc.right > rcImage.right)
486  {
487  rc.left = rcImage.right - (rc.right - rc.left);
488  rc.right = rcImage.right;
489  }
490 
491  if (rc.left < 0)
492  {
493  rc.right += -rc.left;
494  rc.left = 0;
495  }
496 
497  if (rc.top < 0)
498  {
499  rc.bottom += -rc.top;
500  rc.top = 0;
501  }
502 
504  MoveWindow(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, TRUE);
506 }
507 
509 {
511 }
HGDIOBJ WINAPI GetStockObject(_In_ int)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
Definition: winddi.h:3706
LRESULT OnChar(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:156
BYTE lfItalic
Definition: dimm.idl:47
#define HTTOP
Definition: winuser.h:2480
#define WS_THICKFRAME
Definition: pedump.c:630
static int Zoomed(int xy)
Definition: common.h:37
#define DT_EXPANDTABS
Definition: winuser.h:532
#define HTLEFT
Definition: winuser.h:2477
HDC WINAPI GetDCEx(_In_opt_ HWND, _In_opt_ HRGN, _In_ DWORD)
ToolsModel toolsModel
Definition: main.cpp:18
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
#define EC_RIGHTMARGIN
Definition: winuser.h:2597
#define RECT5
Definition: textedit.cpp:33
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
#define COLOR_HIGHLIGHT
Definition: winuser.h:920
LRESULT OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:255
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:209
GLint x0
Definition: linetemp.h:95
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
LRESULT OnToolsModelSettingsChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:376
#define EM_SETMARGINS
Definition: winuser.h:2002
#define RECT1
Definition: textedit.cpp:29
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
#define TRUE
Definition: types.h:120
#define pt(x, y)
Definition: drawing.c:79
#define SW_HIDE
Definition: winuser.h:762
void OnCancelDraw()
Definition: toolsmodel.cpp:215
#define RECT3
Definition: textedit.cpp:31
#define NULL_BRUSH
Definition: wingdi.h:901
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3706
#define DT_WORDBREAK
Definition: winuser.h:544
#define RECT2
Definition: textedit.cpp:30
#define ES_MULTILINE
Definition: pedump.c:667
static HDC
Definition: imagelist.c:92
BYTE lfUnderline
Definition: dimm.idl:48
HWND Create(HWND hwndParent)
Definition: textedit.cpp:297
#define SetWindowFont(hwnd, hfont, fRedraw)
Definition: windowsx.h:533
LONG top
Definition: windef.h:307
#define GET_X_LPARAM(lp)
Definition: windowsx.h:299
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
LONG m_nAppIsMovingOrSizing
Definition: textedit.h:74
#define ZeroMemory
Definition: winbase.h:1670
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
#define HTBOTTOMLEFT
Definition: winuser.h:2484
BYTE lfCharSet
Definition: dimm.idl:50
UINT_PTR WPARAM
Definition: windef.h:207
LRESULT OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:332
#define VK_TAB
Definition: winuser.h:2189
#define HTRIGHT
Definition: winuser.h:2479
#define WS_CHILD
Definition: pedump.c:617
CString strFontName
Definition: registry.h:35
LONG left
Definition: windef.h:306
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
#define RECT7
Definition: textedit.cpp:35
#define GetTextMetrics
Definition: wingdi.h:4474
#define VK_ESCAPE
Definition: winuser.h:2204
#define DEFAULT_CHARSET
Definition: wingdi.h:384
LONG right
Definition: windef.h:308
#define DT_NOPREFIX
Definition: winuser.h:537
int32_t INT
Definition: typedefs.h:58
DWORD WINAPI GetSysColor(_In_ int)
WPARAM wParam
Definition: combotst.c:138
#define RECT6
Definition: textedit.cpp:34
COLORREF GetBgColor() const
COLORREF GetFgColor() const
#define HTTOPLEFT
Definition: winuser.h:2481
#define DCX_WINDOW
Definition: winuser.h:2103
#define DrawText
Definition: winuser.h:5761
#define GetWindowText
Definition: winuser.h:5788
INT DoHitTest(RECT &rc, POINT pt)
Definition: textedit.cpp:37
LRESULT OnMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:266
CImgAreaWindow imageArea
Definition: main.cpp:72
#define FALSE
Definition: types.h:117
#define DT_LEFT
Definition: winuser.h:534
#define DT_CALCRECT
Definition: winuser.h:526
unsigned int BOOL
Definition: ntddk_ex.h:94
#define SubclassWindow(hwnd, lpfn)
Definition: windowsx.h:542
LONG lfHeight
Definition: dimm.idl:42
BOOL GetClientRect(LPRECT lpRect) const
Definition: atlwin.h:535
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define CreateWindowEx
Definition: winuser.h:5745
#define RECT4
Definition: textedit.cpp:32
LRESULT OnPaletteModelColorChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:370
#define EC_LEFTMARGIN
Definition: winuser.h:2596
#define ES_WANTRETURN
Definition: pedump.c:676
#define MAKELONG(a, b)
Definition: typedefs.h:249
LONG lfWeight
Definition: dimm.idl:46
void DoFillBack(HWND hwnd, HDC hDC)
Definition: textedit.cpp:318
static HWND hwndParent
Definition: cryptui.c:300
void DrawGrip(HDC hDC, RECT &rc)
Definition: textedit.cpp:77
LONG_PTR LPARAM
Definition: windef.h:208
LRESULT OnToolsModelZoomChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:382
LRESULT OnEraseBkGnd(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:194
BOOL GetEditRect(LPRECT prc) const
Definition: textedit.cpp:453
#define DefWindowProc
Definition: ros2win.h:31
#define PostMessage
Definition: winuser.h:5822
#define ES_AUTOVSCROLL
Definition: pedump.c:671
#define HTTOPRIGHT
Definition: winuser.h:2482
LRESULT OnToolsModelToolChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:389
HWND m_hwndParent
Definition: textedit.h:71
#define WM_SIZE
Definition: winuser.h:1601
#define _countof(array)
Definition: sndvol32.h:68
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define HTBOTTOM
Definition: winuser.h:2483
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD PointSize
Definition: registry.h:36
BOOL WINAPI UnionRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
LRESULT OnNCCalcSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:242
LRESULT OnNCHitTest(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:247
void ValidateEditRect(LPCRECT prc OPTIONAL)
Definition: textedit.cpp:459
LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:338
int ret
#define EM_SETRECTNP
Definition: winuser.h:2007
#define RECT0
Definition: textedit.cpp:28
DWORD Underline
Definition: registry.h:39
HDC hdc
Definition: main.c:9
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
#define SB_LEFT
Definition: winuser.h:575
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)
Definition: time.h:68
#define HTBOTTOMRIGHT
Definition: winuser.h:2485
void FixEditPos(LPCTSTR pszOldText)
Definition: textedit.cpp:112
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
BOOL WINAPI IntersectRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
void UpdateFont()
Definition: textedit.cpp:402
HINSTANCE hProgInstance
Definition: main.cpp:50
#define LoadCursor
Definition: winuser.h:5802
#define HTCAPTION
Definition: winuser.h:2466
#define DT_NOCLIP
Definition: winuser.h:536
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
Definition: text.c:918
static HDC hDC
Definition: 3dtext.c:33
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HWND WINAPI GetParent(_In_ HWND)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
#define DCX_PARENTCLIP
Definition: winuser.h:2105
#define SB_TOP
Definition: winuser.h:578
#define TEXT(s)
Definition: k32.h:26
#define FW_BOLD
Definition: wingdi.h:378
PaletteModel paletteModel
Definition: main.cpp:28
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
HFONT m_hFontZoomed
Definition: textedit.h:73
GLint y0
Definition: linetemp.h:96
#define DT_TOP
Definition: winuser.h:542
#define IDC_SIZEALL
Definition: winuser.h:691
#define CreateFontIndirect
Definition: wingdi.h:4444
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
#define WM_HSCROLL
Definition: winuser.h:1733
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
#define FW_NORMAL
Definition: wingdi.h:373
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:300
#define PS_DOT
Definition: wingdi.h:588
#define WC_EDIT
Definition: commctrl.h:4689
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
LRESULT OnNCPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:226
#define SendMessage
Definition: winuser.h:5833
#define EM_GETRECT
Definition: winuser.h:1986
CHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:55
void Reposition()
Definition: textedit.cpp:471
LONG bottom
Definition: windef.h:309
LRESULT OnKeyDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:170
#define LOGPIXELSY
Definition: wingdi.h:719
LRESULT OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:186
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define HTCLIENT
Definition: winuser.h:2465
RegistrySettings registrySettings
Definition: main.cpp:30
LONG_PTR LRESULT
Definition: windef.h:209
HFONT m_hFont
Definition: textedit.h:72
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
Arabic default style
Definition: afstyles.h:93
_Out_ LPRECT prc
Definition: ntgdi.h:1658
LRESULT OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:278
#define ES_LEFT
Definition: pedump.c:664
HBRUSH WINAPI GetSysColorBrush(_In_ int)
LRESULT OnSetSel(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:444
LRESULT OnMouseWheel(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:508
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define DT_EDITCONTROL
Definition: winuser.h:528
BOOL IsBackgroundTransparent() const
Definition: toolsmodel.cpp:135
#define WM_VSCROLL
Definition: winuser.h:1734
#define lstrcpyn
Definition: winbase.h:3746
void InvalidateEditRect()
Definition: textedit.cpp:354
static int UnZoomed(int xy)
Definition: common.h:42
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68