ReactOS 0.4.15-dev-7942-gd23573b
textedit.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: PAINT for ReactOS
3 * LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later)
4 * PURPOSE: Text editor and font chooser for the text tool
5 * COPYRIGHT: Copyright 2015 Benedikt Freisen <b.freisen@gmx.net>
6 */
7
8#include "precomp.h"
9
10#define CXY_GRIP 3
11
13
14/* FUNCTIONS ********************************************************/
15
17 : m_hFont(NULL)
18 , m_hFontZoomed(NULL)
19{
21}
22
24{
25 switch (getSizeBoxHitTest(pt, &rc))
26 {
27 case HIT_NONE: return HTNOWHERE;
28 case HIT_UPPER_LEFT: return HTTOPLEFT;
29 case HIT_UPPER_CENTER: return HTTOP;
30 case HIT_UPPER_RIGHT: return HTTOPRIGHT;
31 case HIT_MIDDLE_LEFT: return HTLEFT;
32 case HIT_MIDDLE_RIGHT: return HTRIGHT;
33 case HIT_LOWER_LEFT: return HTBOTTOMLEFT;
34 case HIT_LOWER_CENTER: return HTBOTTOM;
35 case HIT_LOWER_RIGHT: return HTBOTTOMRIGHT;
36 case HIT_BORDER: return HTCAPTION; // Enable drag move
37 case HIT_INNER: return HTCLIENT;
38 }
39 return HTNOWHERE;
40}
41
43{
44 drawSizeBoxes(hDC, &rc, TRUE, NULL);
45}
46
48{
49 CStringW szText;
50 GetWindowText(szText);
51
52 RECT rcParent;
53 ::GetWindowRect(m_hwndParent, &rcParent);
54
55 CRect rc, rcWnd, rcText;
56 GetWindowRect(&rcWnd);
57 rcText = rcWnd;
58
59 HDC hDC = GetDC();
60 if (hDC)
61 {
65 szText += L"x"; // This is a trick to enable the g_ptEnd newlines
66 const UINT uFormat = DT_LEFT | DT_TOP | DT_EDITCONTROL | DT_NOPREFIX | DT_NOCLIP |
68 DrawTextW(hDC, szText, -1, &rcText, uFormat | DT_CALCRECT);
69 if (tm.tmDescent > 0)
70 rcText.bottom += tm.tmDescent;
72 }
73
74 UnionRect(&rc, &rcText, &rcWnd);
76
77 rcWnd = rc;
78 ::GetClientRect(m_hwndParent, &rcParent);
79 rc.IntersectRect(&rcParent, &rcWnd);
80
81 MoveWindow(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, FALSE);
82
85
87}
88
90{
91 if (wParam == VK_TAB)
92 return 0; // FIXME: Tabs
93
94 CStringW szText;
95 GetWindowText(szText);
96
98 FixEditPos(szText);
99
100 return ret;
101}
102
104{
105 if (wParam == VK_ESCAPE)
106 {
108 return 0;
109 }
110
111 CStringW szText;
112 GetWindowText(szText);
113
115 FixEditPos(szText);
116 return ret;
117}
118
120{
124 return ret;
125}
126
128{
129 HDC hDC = (HDC)wParam;
131 {
132 RECT rc;
133 GetClientRect(&rc);
135 FillRect(hDC, &rc, hbr);
136 DeleteObject(hbr);
137 }
139 return TRUE;
140}
141
143{
144 RECT rc;
145 GetClientRect(&rc);
146
148
149 HDC hDC = GetDC();
150 if (hDC)
151 {
152 DrawGrip(hDC, rc);
153 ReleaseDC(hDC);
154 }
155
156 return 0;
157}
158
160{
161 CRect rc;
162 GetWindowRect(&rc);
163
165 if (hDC)
166 {
167 rc.OffsetRect(-rc.left, -rc.top);
168 DrawGrip(hDC, rc);
169 ReleaseDC(hDC);
170 }
171
172 return 0;
173}
174
176{
177 return 0; // No frame.
178}
179
181{
183 RECT rc;
184 GetWindowRect(&rc);
185 return DoHitTest(rc, pt);
186}
187
189{
191 {
192 bHandled = FALSE;
193 return 0;
194 }
195
196 UINT nHitTest = LOWORD(lParam);
197 if (nHitTest == HTCAPTION)
198 {
199 ::SetCursor(::LoadCursorW(NULL, (LPCWSTR)IDC_SIZEALL)); // Enable drag move
200 return FALSE;
201 }
202 return DefWindowProc(nMsg, wParam, lParam);
203}
204
206{
208 return ret;
209}
210
212{
214
215 RECT rc;
216 GetClientRect(&rc);
219
220 return ret;
221}
222
223// Hack: Use DECLARE_WND_SUPERCLASS instead!
225{
227
230 HWND hwnd = ::CreateWindowEx(0, WC_EDIT, NULL, style, 0, 0, 0, 0,
232 if (hwnd)
233 {
234#undef SubclassWindow // Don't use this macro
236
237 UpdateFont();
238
239 PostMessage(WM_SIZE, 0, 0);
240 }
241
242 return m_hWnd;
243}
244
246{
248 return;
249
250 RECT rc;
251 SendMessage(EM_GETRECT, 0, (LPARAM)&rc);
252 MapWindowPoints(hwnd, (LPPOINT)&rc, 2);
253
255 FillRect(hDC, &rc, hbr);
256 DeleteObject(hbr);
257}
258
260{
261 UpdateFont();
262 return 0;
263}
264
266{
268 if (m_hFont)
269 {
271 m_hFont = NULL;
272 }
273 if (m_hFontZoomed)
274 {
277 }
278 return 0;
279}
280
282{
283 RECT rc;
284 GetWindowRect(&rc);
287
288 GetClientRect(&rc);
291 m_rc = rc;
292}
293
295{
296 UpdateFont();
297 return 0;
298}
299
301{
302 UpdateFont();
303 return 0;
304}
305
307{
308 UpdateFont();
310 return 0;
311}
312
314{
315 if (wParam == TOOL_TEXT)
316 {
317 UpdateFont();
318 }
319 else
320 {
322 }
323 return 0;
324}
325
327{
328 if (m_hFont)
329 {
331 m_hFont = NULL;
332 }
333 if (m_hFontZoomed)
334 {
337 }
338
339 LOGFONTW lf;
340 ZeroMemory(&lf, sizeof(lf));
341 lf.lfCharSet = DEFAULT_CHARSET; // registrySettings.CharSet; // Ignore
346
347 HDC hdc = GetDC();
348 if (hdc)
349 {
350 INT nFontSize = registrySettings.PointSize;
351 lf.lfHeight = -MulDiv(nFontSize, GetDeviceCaps(hdc, LOGPIXELSY), 72);
352 ReleaseDC(hdc);
353 }
354
356
357 lf.lfHeight = Zoomed(lf.lfHeight);
359
362
364
365 Invalidate();
366}
367
369{
374 return ret;
375}
376
378{
379 *prc = m_rc;
380 return TRUE;
381}
382
384{
385 if (prc)
386 m_rc = *prc;
387
388 CRect rc = m_rc;
390
391 MoveWindow(rc.left, rc.top, rc.Width(), rc.Height(), TRUE);
392}
393
395{
396 // Restrict the window position to the image area
397 LPRECT prcMoving = (LPRECT)lParam;
398 CRect rcMoving = *prcMoving;
399
400 CRect rcImage;
401 canvasWindow.GetImageRect(rcImage);
403 canvasWindow.MapWindowPoints(NULL, &rcImage);
404
405 CRect rcWnd;
406 GetWindowRect(&rcWnd);
407 INT cx = rcWnd.Width(), cy = rcWnd.Height();
408
409 if (rcMoving.left < rcImage.left)
410 {
411 rcMoving.left = rcImage.left;
412 rcMoving.right = rcImage.left + cx;
413 }
414 else if (rcMoving.right > rcImage.right)
415 {
416 rcMoving.right = rcImage.right;
417 rcMoving.left = rcImage.right - cx;
418 }
419
420 if (rcMoving.top < rcImage.top)
421 {
422 rcMoving.top = rcImage.top;
423 rcMoving.bottom = rcImage.top + cy;
424 }
425 else if (rcMoving.bottom > rcImage.bottom)
426 {
427 rcMoving.bottom = rcImage.bottom;
428 rcMoving.top = rcImage.bottom - cy;
429 }
430
431 *prcMoving = rcMoving;
432 Invalidate(TRUE);
433 return TRUE;
434}
435
437{
438 // Restrict the window size to the image area
439 LPRECT prcSizing = (LPRECT)lParam;
440 CRect rcSizing = *prcSizing;
441
442 CRect rcImage;
443 canvasWindow.GetImageRect(rcImage);
445 canvasWindow.MapWindowPoints(NULL, &rcImage);
446
447 // Horizontally
448 switch (wParam)
449 {
450 case WMSZ_BOTTOMLEFT:
451 case WMSZ_LEFT:
452 case WMSZ_TOPLEFT:
453 if (rcSizing.left < rcImage.left)
454 rcSizing.left = rcImage.left;
455 break;
456 case WMSZ_BOTTOMRIGHT:
457 case WMSZ_RIGHT:
458 case WMSZ_TOPRIGHT:
459 if (rcSizing.right > rcImage.right)
460 rcSizing.right = rcImage.right;
461 break;
462 case WMSZ_TOP:
463 case WMSZ_BOTTOM:
464 default:
465 break;
466 }
467
468 // Vertically
469 switch (wParam)
470 {
471 case WMSZ_BOTTOM:
472 case WMSZ_BOTTOMLEFT:
473 case WMSZ_BOTTOMRIGHT:
474 if (rcSizing.bottom > rcImage.bottom)
475 rcSizing.bottom = rcImage.bottom;
476 break;
477 case WMSZ_TOP:
478 case WMSZ_TOPLEFT:
479 case WMSZ_TOPRIGHT:
480 if (rcSizing.top < rcImage.top)
481 rcSizing.top = rcImage.top;
482 break;
483 case WMSZ_LEFT:
484 case WMSZ_RIGHT:
485 default:
486 break;
487 }
488
489 *prcSizing = rcSizing;
490 Invalidate(TRUE);
491 return TRUE;
492}
493
495{
496 return ::SendMessageW(GetParent(), nMsg, wParam, lParam);
497}
498
500{
502 Invalidate(TRUE); // Redraw
503 return ret;
504}
505
507{
510 return ret;
511}
512
514{
516 Invalidate(TRUE); // Redraw
517 return ret;
518}
static HDC hDC
Definition: 3dtext.c:33
Arabic default style
Definition: afstyles.h:94
HINSTANCE g_hinstExe
Definition: main.cpp:17
ToolsModel toolsModel
Definition: toolsmodel.cpp:10
RegistrySettings registrySettings
Definition: registry.cpp:14
@ HIT_NONE
Definition: precomp.h:56
@ HIT_BORDER
Definition: precomp.h:65
@ HIT_LOWER_RIGHT
Definition: precomp.h:64
@ HIT_LOWER_CENTER
Definition: precomp.h:63
@ HIT_UPPER_LEFT
Definition: precomp.h:57
@ HIT_INNER
Definition: precomp.h:66
@ HIT_LOWER_LEFT
Definition: precomp.h:62
@ HIT_UPPER_CENTER
Definition: precomp.h:58
@ HIT_UPPER_RIGHT
Definition: precomp.h:59
@ HIT_MIDDLE_RIGHT
Definition: precomp.h:61
@ HIT_MIDDLE_LEFT
Definition: precomp.h:60
CCanvasWindow canvasWindow
Definition: canvas.cpp:10
VOID ImageToCanvas(POINT &pt)
Definition: canvas.cpp:40
VOID CanvasToImage(POINT &pt)
Definition: canvas.cpp:53
VOID GetImageRect(RECT &rc)
Definition: canvas.cpp:66
BOOL IntersectRect(LPCRECT lpRect1, LPCRECT lpRect2) noexcept
Definition: atltypes.h:346
void OffsetRect(int x, int y) noexcept
Definition: atltypes.h:403
int Width() const noexcept
Definition: atltypes.h:461
int Height() const noexcept
Definition: atltypes.h:318
LRESULT OnNCPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:159
LRESULT OnClear(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:513
LRESULT OnNCHitTest(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:180
LRESULT OnToolsModelZoomChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:306
HFONT m_hFontZoomed
Definition: textedit.h:82
LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:265
LRESULT OnChar(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:89
HWND m_hwndParent
Definition: textedit.h:80
LRESULT OnKeyDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:103
LRESULT OnSetSel(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:368
LRESULT OnCut(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:499
LRESULT OnToolsModelSettingsChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:300
BOOL GetEditRect(LPRECT prc) const
Definition: textedit.cpp:377
LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:142
LRESULT OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:259
INT DoHitTest(RECT &rc, POINT pt)
Definition: textedit.cpp:23
LRESULT OnToolsModelToolChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:313
void InvalidateEditRect()
Definition: textedit.cpp:281
HWND Create(HWND hwndParent)
Definition: textedit.cpp:224
LRESULT OnPaste(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:506
LRESULT OnEraseBkGnd(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:127
LRESULT OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:119
LRESULT OnSizing(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:436
LRESULT OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:188
void DrawGrip(HDC hDC, RECT &rc)
Definition: textedit.cpp:42
HFONT m_hFont
Definition: textedit.h:81
LRESULT OnPaletteModelColorChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:294
LRESULT OnMouseWheel(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:494
LRESULT OnMoving(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:394
LRESULT OnMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:205
void UpdateFont()
Definition: textedit.cpp:326
void DoFillBack(HWND hwnd, HDC hDC)
Definition: textedit.cpp:245
LRESULT OnNCCalcSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:175
void FixEditPos(LPCWSTR pszOldText)
Definition: textedit.cpp:47
LRESULT OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:211
void ValidateEditRect(LPCRECT prc OPTIONAL)
Definition: textedit.cpp:383
static BOOL IsWaiting()
Definition: CWaitCursor.h:40
COLORREF GetBgColor() const
COLORREF GetFgColor() const
DWORD PointSize
Definition: registry.h:34
DWORD Underline
Definition: registry.h:37
CStringW strFontName
Definition: registry.h:33
void OnEndDraw(BOOL bCancel)
Definition: mouse.cpp:1178
BOOL IsBackgroundTransparent() const
Definition: toolsmodel.cpp:249
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
static HWND hwndParent
Definition: cryptui.c:300
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define pt(x, y)
Definition: drawing.c:79
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
pKey DeleteObject()
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:92
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
unsigned int UINT
Definition: ndis.h:50
_Out_ LPRECT prc
Definition: ntgdi.h:1658
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
Definition: defwnd.c:16
#define L(x)
Definition: ntvdm.h:50
PaletteModel paletteModel
#define LOWORD(l)
Definition: pedump.c:82
#define WS_CHILD
Definition: pedump.c:617
#define ES_AUTOVSCROLL
Definition: pedump.c:671
#define ES_WANTRETURN
Definition: pedump.c:676
#define ES_LEFT
Definition: pedump.c:664
#define ES_MULTILINE
Definition: pedump.c:667
#define WS_THICKFRAME
Definition: pedump.c:630
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
#define WC_EDIT
Definition: commctrl.h:4689
#define DefWindowProc
Definition: ros2win.h:31
VOID drawSizeBoxes(HDC hdc, LPCRECT prcBase, BOOL bDrawFrame, LPCRECT prcPaint)
Definition: sizebox.cpp:103
HITTEST getSizeBoxHitTest(POINT pt, LPCRECT prcBase)
Definition: sizebox.cpp:80
#define _countof(array)
Definition: sndvol32.h:68
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
BYTE lfItalic
Definition: dimm.idl:64
LONG lfHeight
Definition: dimm.idl:59
LONG lfWeight
Definition: dimm.idl:63
WCHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:72
BYTE lfUnderline
Definition: dimm.idl:65
BYTE lfCharSet
Definition: dimm.idl:67
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
Definition: time.h:68
CTextEditWindow textEditWindow
Definition: textedit.cpp:12
@ TOOL_TEXT
Definition: toolsmodel.h:21
static int Zoomed(int xy)
Definition: toolsmodel.h:150
int32_t INT
Definition: typedefs.h:58
#define MAKELONG(a, b)
Definition: typedefs.h:249
int ret
#define LPRECT
Definition: precomp.h:28
#define ZeroMemory
Definition: winbase.h:1712
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define SubclassWindow(hwnd, lpfn)
Definition: windowsx.h:542
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:300
#define SetWindowFont(hwnd, hfont, fRedraw)
Definition: windowsx.h:533
#define GET_X_LPARAM(lp)
Definition: windowsx.h:299
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
#define FW_BOLD
Definition: wingdi.h:378
#define LOGPIXELSY
Definition: wingdi.h:719
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
#define DEFAULT_CHARSET
Definition: wingdi.h:384
#define FW_NORMAL
Definition: wingdi.h:373
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
Definition: text.c:918
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
#define GetTextMetrics
Definition: wingdi.h:4474
#define CreateFontIndirect
Definition: wingdi.h:4444
#define HTTOPRIGHT
Definition: winuser.h:2492
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define CreateWindowEx
Definition: winuser.h:5755
#define SW_HIDE
Definition: winuser.h:768
#define EM_GETRECT
Definition: winuser.h:1996
#define DT_NOPREFIX
Definition: winuser.h:537
#define VK_TAB
Definition: winuser.h:2199
#define WM_HSCROLL
Definition: winuser.h:1743
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define HTCAPTION
Definition: winuser.h:2476
#define DCX_WINDOW
Definition: winuser.h:2113
#define WMSZ_BOTTOMRIGHT
Definition: winuser.h:2471
#define EC_RIGHTMARGIN
Definition: winuser.h:2607
#define WMSZ_BOTTOMLEFT
Definition: winuser.h:2470
#define HTTOPLEFT
Definition: winuser.h:2491
#define WM_VSCROLL
Definition: winuser.h:1744
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define HTBOTTOM
Definition: winuser.h:2493
#define WM_SIZE
Definition: winuser.h:1611
#define SB_LEFT
Definition: winuser.h:575
#define WMSZ_TOP
Definition: winuser.h:2466
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define DT_NOCLIP
Definition: winuser.h:536
HDC WINAPI GetDCEx(_In_opt_ HWND, _In_opt_ HRGN, _In_ DWORD)
#define IDC_SIZEALL
Definition: winuser.h:696
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2105
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define WMSZ_LEFT
Definition: winuser.h:2464
#define WMSZ_TOPLEFT
Definition: winuser.h:2467
#define DT_LEFT
Definition: winuser.h:534
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define DT_TOP
Definition: winuser.h:542
#define DCX_PARENTCLIP
Definition: winuser.h:2115
#define EM_SETRECTNP
Definition: winuser.h:2017
#define DT_WORDBREAK
Definition: winuser.h:544
#define WMSZ_TOPRIGHT
Definition: winuser.h:2468
#define HTRIGHT
Definition: winuser.h:2489
#define HTCLIENT
Definition: winuser.h:2475
#define SendMessage
Definition: winuser.h:5843
#define HTBOTTOMRIGHT
Definition: winuser.h:2495
HDC WINAPI GetDC(_In_opt_ HWND)
#define HTNOWHERE
Definition: winuser.h:2474
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)
#define GetWindowText
Definition: winuser.h:5798
#define PostMessage
Definition: winuser.h:5832
HWND WINAPI GetParent(_In_ HWND)
#define WMSZ_BOTTOM
Definition: winuser.h:2469
#define SB_TOP
Definition: winuser.h:578
#define HTBOTTOMLEFT
Definition: winuser.h:2494
#define HTTOP
Definition: winuser.h:2490
#define WMSZ_RIGHT
Definition: winuser.h:2465
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define EC_LEFTMARGIN
Definition: winuser.h:2606
#define DT_EXPANDTABS
Definition: winuser.h:532
#define DT_CALCRECT
Definition: winuser.h:526
BOOL WINAPI UnionRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
#define HTLEFT
Definition: winuser.h:2487
#define DT_EDITCONTROL
Definition: winuser.h:528
#define EM_SETMARGINS
Definition: winuser.h:2012
#define VK_ESCAPE
Definition: winuser.h:2214
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
unsigned char BYTE
Definition: xxhash.c:193