ReactOS 0.4.16-dev-981-g80eb313
txthost.c
Go to the documentation of this file.
1/*
2 * RichEdit - ITextHost implementation for windowed richedit controls
3 *
4 * Copyright 2009 by Dylan Smith
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#define COBJMACROS
22
23#include "editor.h"
24#include "ole2.h"
25#include "richole.h"
26#include "imm.h"
27#include "textserv.h"
28#include "wine/debug.h"
29#include "editstr.h"
30#include "rtf.h"
31#include "undocuser.h"
32#include "riched20.h"
33
35
36struct host
37{
38 ITextHost2 ITextHost_iface;
40 ITextServices *text_srv;
42 unsigned int emulate_10 : 1;
43 unsigned int dialog_mode : 1;
44 unsigned int want_return : 1;
45 unsigned int sel_bar : 1;
46 unsigned int client_edge : 1;
47 unsigned int use_set_rect : 1;
48 unsigned int use_back_colour : 1;
49 unsigned int defer_release : 1;
55 unsigned int notify_level;
56};
57
58static const ITextHost2Vtbl textHostVtbl;
59
62
63static void host_init_props( struct host *host )
64{
66
68
69 /* text services assumes the scrollbars are originally not shown, so hide them.
70 However with ES_DISABLENOSCROLL it'll immediately show them, so don't bother */
72
77
86
88
91
94}
95
97{
98 struct host *texthost;
99
100 texthost = CoTaskMemAlloc(sizeof(*texthost));
101 if (!texthost) return NULL;
102
103 texthost->ITextHost_iface.lpVtbl = &textHostVtbl;
104 texthost->ref = 1;
105 texthost->text_srv = NULL;
106 texthost->window = hwnd;
107 texthost->parent = cs->hwndParent;
108 texthost->emulate_10 = emulate_10;
109 texthost->dialog_mode = 0;
110 memset( &texthost->para_fmt, 0, sizeof(texthost->para_fmt) );
111 texthost->para_fmt.cbSize = sizeof(texthost->para_fmt);
112 texthost->para_fmt.dwMask = PFM_ALIGNMENT;
113 texthost->para_fmt.wAlignment = PFA_LEFT;
114 if (cs->style & ES_RIGHT)
115 texthost->para_fmt.wAlignment = PFA_RIGHT;
116 if (cs->style & ES_CENTER)
117 texthost->para_fmt.wAlignment = PFA_CENTER;
118 host_init_props( texthost );
119 texthost->event_mask = 0;
120 texthost->use_set_rect = 0;
121 SetRectEmpty( &texthost->set_rect );
122 GetClientRect( hwnd, &texthost->client_rect );
123 texthost->use_back_colour = 0;
124 texthost->password_char = (texthost->props & TXTBIT_USEPASSWORD) ? '*' : 0;
125 texthost->defer_release = 0;
126 texthost->notify_level = 0;
127
128 return texthost;
129}
130
131static inline struct host *impl_from_ITextHost( ITextHost2 *iface )
132{
133 return CONTAINING_RECORD( iface, struct host, ITextHost_iface );
134}
135
136static HRESULT WINAPI ITextHostImpl_QueryInterface( ITextHost2 *iface, REFIID iid, void **obj )
137{
138 struct host *host = impl_from_ITextHost( iface );
139
140 if (IsEqualIID( iid, &IID_IUnknown ) || IsEqualIID( iid, &IID_ITextHost ) || IsEqualIID( iid, &IID_ITextHost2 ))
141 {
143 ITextHost_AddRef( (ITextHost *)*obj );
144 return S_OK;
145 }
146
147 FIXME( "Unknown interface: %s\n", debugstr_guid( iid ) );
148 return E_NOINTERFACE;
149}
150
151static ULONG WINAPI ITextHostImpl_AddRef( ITextHost2 *iface )
152{
153 struct host *host = impl_from_ITextHost( iface );
155 return ref;
156}
157
158static ULONG WINAPI ITextHostImpl_Release( ITextHost2 *iface )
159{
160 struct host *host = impl_from_ITextHost( iface );
162
163 if (!ref)
164 {
165 SetWindowLongPtrW( host->window, 0, 0 );
166 ITextServices_Release( host->text_srv );
168 }
169 return ref;
170}
171
174{
175 struct host *host = impl_from_ITextHost( iface );
176 return GetDC( host->window );
177}
178
181{
182 struct host *host = impl_from_ITextHost( iface );
183 return ReleaseDC( host->window, hdc );
184}
185
188{
189 struct host *host = impl_from_ITextHost( iface );
190 return ShowScrollBar( host->window, bar, show );
191}
192
195{
196 struct host *host = impl_from_ITextHost( iface );
197 return EnableScrollBar( host->window, bar, arrows );
198}
199
202{
203 struct host *host = impl_from_ITextHost( iface );
204 SCROLLINFO info = { .cbSize = sizeof(info), .fMask = SIF_PAGE | SIF_RANGE };
205
206 if (bar != SB_HORZ && bar != SB_VERT)
207 {
208 FIXME( "Unexpected bar %d\n", bar );
209 return FALSE;
210 }
211
213
214 if (host->text_srv) /* This can be called during text services creation */
215 {
218 }
219
220 info.nMin = min_pos;
221 info.nMax = max_pos;
222 return SetScrollInfo( host->window, bar, &info, redraw );
223}
224
227{
228 struct host *host = impl_from_ITextHost( iface );
231 BOOL show = TRUE, shown = style & mask;
232
233 if (bar != SB_HORZ && bar != SB_VERT)
234 {
235 FIXME( "Unexpected bar %d\n", bar );
236 return FALSE;
237 }
238
239 /* If the application has adjusted the scrollbar's visibility it is reset */
241 {
244 }
245
246 if (!show ^ !shown) ShowScrollBar( host->window, bar, show );
247 return SetScrollPos( host->window, bar, pos, redraw ) != 0;
248}
249
252{
253 struct host *host = impl_from_ITextHost( iface );
255}
256
259{
260 struct host *host = impl_from_ITextHost( iface );
261 if (update) UpdateWindow( host->window );
262}
263
266{
267 struct host *host = impl_from_ITextHost( iface );
269}
270
273{
274 struct host *host = impl_from_ITextHost( iface );
275 if (show) return ShowCaret( host->window );
276 else return HideCaret( host->window );
277}
278
281{
282 return SetCaretPos(x, y);
283}
284
287{
288 struct host *host = impl_from_ITextHost( iface );
289 return SetTimer( host->window, id, timeout, NULL ) != 0;
290}
291
294{
295 struct host *host = impl_from_ITextHost( iface );
296 KillTimer( host->window, id );
297}
298
301 const RECT *clip, HRGN update_rgn, RECT *update_rect,
302 UINT flags )
303{
304 struct host *host = impl_from_ITextHost( iface );
305 ScrollWindowEx( host->window, dx, dy, scroll, clip, update_rgn, update_rect, flags );
306}
307
310{
311 struct host *host = impl_from_ITextHost( iface );
312 if (capture) SetCapture( host->window );
313 else ReleaseCapture();
314}
315
318{
319 struct host *host = impl_from_ITextHost( iface );
320 SetFocus( host->window );
321}
322
325{
326 SetCursor( cursor );
327}
328
331{
332 struct host *host = impl_from_ITextHost( iface );
333 return ScreenToClient( host->window, pt );
334}
335
338{
339 struct host *host = impl_from_ITextHost( iface );
340 return ClientToScreen( host->window, pt );
341}
342
345{
346 struct host *host = impl_from_ITextHost( iface );
347 *old_state = HandleToLong( SetActiveWindow( host->window ) );
348 return *old_state ? S_OK : E_FAIL;
349}
350
353{
354 HWND ret = SetActiveWindow( LongToHandle( new_state ) );
355 return ret ? S_OK : E_FAIL;
356}
357
360{
361 struct host *host = impl_from_ITextHost( iface );
362
363 if (!host->use_set_rect)
364 {
366 if (host->client_edge) rect->top += 1;
367 InflateRect( rect, -1, 0 );
368 }
369 else *rect = host->set_rect;
370
371 return S_OK;
372}
373
376{
378 return S_OK;
379}
380
383{
384 return E_NOTIMPL;
385}
386
389{
390 struct host *host = impl_from_ITextHost( iface );
391 *fmt = (const PARAFORMAT *)&host->para_fmt;
392 return S_OK;
393}
394
397{
398 struct host *host = impl_from_ITextHost( iface );
399
401 return GetSysColor( index );
402}
403
406{
408 return S_OK;
409}
410
413{
414 *length = INFINITE;
415 return S_OK;
416}
417
420{
421 struct host *host = impl_from_ITextHost( iface );
422
424 return S_OK;
425}
426
429{
430 struct host *host = impl_from_ITextHost( iface );
431
432 *c = host->password_char;
433 return *c ? S_OK : S_FALSE;
434}
435
438{
439 *pos = -1;
440 return S_OK;
441}
442
445{
446 return E_NOTIMPL;
447}
448
451{
452 return S_OK;
453}
454
457{
458 return S_OK;
459}
460
463{
464 struct host *host = impl_from_ITextHost( iface );
465
466 *bits = host->props & mask;
467 return S_OK;
468}
469
471DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxNotify( ITextHost2 *iface, DWORD iNotify, void *pv )
472{
473 struct host *host = impl_from_ITextHost( iface );
474 UINT id;
475
476 if (!host->parent) return S_OK;
477
479
480 switch (iNotify)
481 {
482 case EN_DROPFILES:
483 case EN_LINK:
484 case EN_OLEOPFAILED:
485 case EN_PROTECTED:
486 case EN_REQUESTRESIZE:
487 case EN_SAVECLIPBOARD:
488 case EN_SELCHANGE:
489 case EN_STOPNOUNDO:
490 {
491 /* FIXME: Verify this assumption that pv starts with NMHDR. */
492 NMHDR *info = pv;
493 if (!info)
494 return E_FAIL;
495
496 info->hwndFrom = host->window;
497 info->idFrom = id;
498 info->code = iNotify;
500 break;
501 }
502
503 case EN_UPDATE:
504 /* Only sent when the window is visible. */
505 if (!IsWindowVisible( host->window ))
506 break;
507 /* Fall through */
508 case EN_CHANGE:
509 case EN_ERRSPACE:
510 case EN_HSCROLL:
511 case EN_KILLFOCUS:
512 case EN_MAXTEXT:
513 case EN_SETFOCUS:
514 case EN_VSCROLL:
516 break;
517
518 case EN_MSGFILTER:
519 FIXME("EN_MSGFILTER is documented as not being sent to TxNotify\n");
520 /* fall through */
521 default:
522 return E_FAIL;
523 }
524 return S_OK;
525}
526
529{
530 struct host *host = impl_from_ITextHost( iface );
531 return ImmGetContext( host->window );
532}
533
536{
537 struct host *host = impl_from_ITextHost( iface );
539}
540
543{
544 struct host *host = impl_from_ITextHost( iface );
545
546 *width = host->sel_bar ? 225 : 0; /* in HIMETRIC */
547 return S_OK;
548}
549
552{
553 return FALSE;
554}
555
558{
559 struct host *host = impl_from_ITextHost( iface );
560 *hwnd = host->window;
561 return S_OK;
562}
563
566{
567 return E_NOTIMPL;
568}
569
572{
573 return NULL;
574}
575
578{
579 return E_NOTIMPL;
580}
581
584{
585 return NULL;
586}
587
590{
591 return;
592}
593
596{
597 return E_NOTIMPL;
598}
599
602{
603 return E_NOTIMPL;
604}
605
608{
609 return E_NOTIMPL;
610}
611
614{
615 return E_NOTIMPL;
616}
617
620{
621 return E_NOTIMPL;
622}
623
624
625#ifdef __ASM_USE_THISCALL_WRAPPER
626
627#define STDCALL(func) (void *) __stdcall_ ## func
628#ifdef _MSC_VER
629#define DEFINE_STDCALL_WRAPPER(num,func,args) \
630 __declspec(naked) HRESULT __stdcall_##func(void) \
631 { \
632 __asm pop eax \
633 __asm pop ecx \
634 __asm push eax \
635 __asm mov eax, [ecx] \
636 __asm jmp dword ptr [eax + 4*num] \
637 }
638#else /* _MSC_VER */
639#define DEFINE_STDCALL_WRAPPER(num,func,args) \
640 extern HRESULT __stdcall_ ## func(void); \
641 __ASM_GLOBAL_FUNC(__stdcall_ ## func, \
642 "popl %eax\n\t" \
643 "popl %ecx\n\t" \
644 "pushl %eax\n\t" \
645 "movl (%ecx), %eax\n\t" \
646 "jmp *(4*(" #num "))(%eax)" )
647#endif /* _MSC_VER */
648
649DEFINE_STDCALL_WRAPPER(3,ITextHostImpl_TxGetDC,4)
650DEFINE_STDCALL_WRAPPER(4,ITextHostImpl_TxReleaseDC,8)
651DEFINE_STDCALL_WRAPPER(5,ITextHostImpl_TxShowScrollBar,12)
652DEFINE_STDCALL_WRAPPER(6,ITextHostImpl_TxEnableScrollBar,12)
653DEFINE_STDCALL_WRAPPER(7,ITextHostImpl_TxSetScrollRange,20)
654DEFINE_STDCALL_WRAPPER(8,ITextHostImpl_TxSetScrollPos,16)
655DEFINE_STDCALL_WRAPPER(9,ITextHostImpl_TxInvalidateRect,12)
656DEFINE_STDCALL_WRAPPER(10,ITextHostImpl_TxViewChange,8)
657DEFINE_STDCALL_WRAPPER(11,ITextHostImpl_TxCreateCaret,16)
658DEFINE_STDCALL_WRAPPER(12,ITextHostImpl_TxShowCaret,8)
659DEFINE_STDCALL_WRAPPER(13,ITextHostImpl_TxSetCaretPos,12)
660DEFINE_STDCALL_WRAPPER(14,ITextHostImpl_TxSetTimer,12)
661DEFINE_STDCALL_WRAPPER(15,ITextHostImpl_TxKillTimer,8)
662DEFINE_STDCALL_WRAPPER(16,ITextHostImpl_TxScrollWindowEx,32)
663DEFINE_STDCALL_WRAPPER(17,ITextHostImpl_TxSetCapture,8)
664DEFINE_STDCALL_WRAPPER(18,ITextHostImpl_TxSetFocus,4)
665DEFINE_STDCALL_WRAPPER(19,ITextHostImpl_TxSetCursor,12)
666DEFINE_STDCALL_WRAPPER(20,ITextHostImpl_TxScreenToClient,8)
667DEFINE_STDCALL_WRAPPER(21,ITextHostImpl_TxClientToScreen,8)
668DEFINE_STDCALL_WRAPPER(22,ITextHostImpl_TxActivate,8)
669DEFINE_STDCALL_WRAPPER(23,ITextHostImpl_TxDeactivate,8)
670DEFINE_STDCALL_WRAPPER(24,ITextHostImpl_TxGetClientRect,8)
671DEFINE_STDCALL_WRAPPER(25,ITextHostImpl_TxGetViewInset,8)
672DEFINE_STDCALL_WRAPPER(26,ITextHostImpl_TxGetCharFormat,8)
673DEFINE_STDCALL_WRAPPER(27,ITextHostImpl_TxGetParaFormat,8)
674DEFINE_STDCALL_WRAPPER(28,ITextHostImpl_TxGetSysColor,8)
675DEFINE_STDCALL_WRAPPER(29,ITextHostImpl_TxGetBackStyle,8)
676DEFINE_STDCALL_WRAPPER(30,ITextHostImpl_TxGetMaxLength,8)
677DEFINE_STDCALL_WRAPPER(31,ITextHostImpl_TxGetScrollBars,8)
678DEFINE_STDCALL_WRAPPER(32,ITextHostImpl_TxGetPasswordChar,8)
679DEFINE_STDCALL_WRAPPER(33,ITextHostImpl_TxGetAcceleratorPos,8)
680DEFINE_STDCALL_WRAPPER(34,ITextHostImpl_TxGetExtent,8)
681DEFINE_STDCALL_WRAPPER(35,ITextHostImpl_OnTxCharFormatChange,8)
682DEFINE_STDCALL_WRAPPER(36,ITextHostImpl_OnTxParaFormatChange,8)
683DEFINE_STDCALL_WRAPPER(37,ITextHostImpl_TxGetPropertyBits,12)
684DEFINE_STDCALL_WRAPPER(38,ITextHostImpl_TxNotify,12)
685DEFINE_STDCALL_WRAPPER(39,ITextHostImpl_TxImmGetContext,4)
686DEFINE_STDCALL_WRAPPER(40,ITextHostImpl_TxImmReleaseContext,8)
687DEFINE_STDCALL_WRAPPER(41,ITextHostImpl_TxGetSelectionBarWidth,8)
688/* ITextHost2 */
689DEFINE_STDCALL_WRAPPER(42,ITextHostImpl_TxIsDoubleClickPending,4)
690DEFINE_STDCALL_WRAPPER(43,ITextHostImpl_TxGetWindow,8)
691DEFINE_STDCALL_WRAPPER(44,ITextHostImpl_TxSetForegroundWindow,4)
692DEFINE_STDCALL_WRAPPER(45,ITextHostImpl_TxGetPalette,4)
693DEFINE_STDCALL_WRAPPER(46,ITextHostImpl_TxGetEastAsianFlags,8)
694DEFINE_STDCALL_WRAPPER(47,ITextHostImpl_TxSetCursor2,12)
695DEFINE_STDCALL_WRAPPER(48,ITextHostImpl_TxFreeTextServicesNotification,4)
696DEFINE_STDCALL_WRAPPER(49,ITextHostImpl_TxGetEditStyle,12)
697DEFINE_STDCALL_WRAPPER(50,ITextHostImpl_TxGetWindowStyles,12)
698DEFINE_STDCALL_WRAPPER(51,ITextHostImpl_TxShowDropCaret,16)
699DEFINE_STDCALL_WRAPPER(52,ITextHostImpl_TxDestroyCaret,4)
700DEFINE_STDCALL_WRAPPER(53,ITextHostImpl_TxGetHorzExtent,8)
701
702const ITextHost2Vtbl text_host2_stdcall_vtbl =
703{
704 NULL,
705 NULL,
706 NULL,
746/* ITextHost2 */
759};
760
761#endif /* __ASM_USE_THISCALL_WRAPPER */
762
763static const ITextHost2Vtbl textHostVtbl =
764{
807/* ITextHost2 */
820};
821
822static const char * const edit_messages[] =
823{
824 "EM_GETSEL", "EM_SETSEL", "EM_GETRECT", "EM_SETRECT",
825 "EM_SETRECTNP", "EM_SCROLL", "EM_LINESCROLL", "EM_SCROLLCARET",
826 "EM_GETMODIFY", "EM_SETMODIFY", "EM_GETLINECOUNT", "EM_LINEINDEX",
827 "EM_SETHANDLE", "EM_GETHANDLE", "EM_GETTHUMB", "EM_UNKNOWN_BF",
828 "EM_UNKNOWN_C0", "EM_LINELENGTH", "EM_REPLACESEL", "EM_UNKNOWN_C3",
829 "EM_GETLINE", "EM_LIMITTEXT", "EM_CANUNDO", "EM_UNDO",
830 "EM_FMTLINES", "EM_LINEFROMCHAR", "EM_UNKNOWN_CA", "EM_SETTABSTOPS",
831 "EM_SETPASSWORDCHAR", "EM_EMPTYUNDOBUFFER", "EM_GETFIRSTVISIBLELINE", "EM_SETREADONLY",
832 "EM_SETWORDBREAKPROC", "EM_GETWORDBREAKPROC", "EM_GETPASSWORDCHAR", "EM_SETMARGINS",
833 "EM_GETMARGINS", "EM_GETLIMITTEXT", "EM_POSFROMCHAR", "EM_CHARFROMPOS",
834 "EM_SETIMESTATUS", "EM_GETIMESTATUS"
835};
836
837static const char * const richedit_messages[] =
838{
839 "EM_CANPASTE", "EM_DISPLAYBAND", "EM_EXGETSEL", "EM_EXLIMITTEXT",
840 "EM_EXLINEFROMCHAR", "EM_EXSETSEL", "EM_FINDTEXT", "EM_FORMATRANGE",
841 "EM_GETCHARFORMAT", "EM_GETEVENTMASK", "EM_GETOLEINTERFACE", "EM_GETPARAFORMAT",
842 "EM_GETSELTEXT", "EM_HIDESELECTION", "EM_PASTESPECIAL", "EM_REQUESTRESIZE",
843 "EM_SELECTIONTYPE", "EM_SETBKGNDCOLOR", "EM_SETCHARFORMAT", "EM_SETEVENTMASK",
844 "EM_SETOLECALLBACK", "EM_SETPARAFORMAT", "EM_SETTARGETDEVICE", "EM_STREAMIN",
845 "EM_STREAMOUT", "EM_GETTEXTRANGE", "EM_FINDWORDBREAK", "EM_SETOPTIONS",
846 "EM_GETOPTIONS", "EM_FINDTEXTEX", "EM_GETWORDBREAKPROCEX", "EM_SETWORDBREAKPROCEX",
847 "EM_SETUNDOLIMIT", "EM_UNKNOWN_USER_83", "EM_REDO", "EM_CANREDO",
848 "EM_GETUNDONAME", "EM_GETREDONAME", "EM_STOPGROUPTYPING", "EM_SETTEXTMODE",
849 "EM_GETTEXTMODE", "EM_AUTOURLDETECT", "EM_GETAUTOURLDETECT", "EM_SETPALETTE",
850 "EM_GETTEXTEX", "EM_GETTEXTLENGTHEX", "EM_SHOWSCROLLBAR", "EM_SETTEXTEX",
851 "EM_UNKNOWN_USER_98", "EM_UNKNOWN_USER_99", "EM_SETPUNCTUATION", "EM_GETPUNCTUATION",
852 "EM_SETWORDWRAPMODE", "EM_GETWORDWRAPMODE", "EM_SETIMECOLOR", "EM_GETIMECOLOR",
853 "EM_SETIMEOPTIONS", "EM_GETIMEOPTIONS", "EM_CONVPOSITION", "EM_UNKNOWN_USER_109",
854 "EM_UNKNOWN_USER_110", "EM_UNKNOWN_USER_111", "EM_UNKNOWN_USER_112", "EM_UNKNOWN_USER_113",
855 "EM_UNKNOWN_USER_114", "EM_UNKNOWN_USER_115", "EM_UNKNOWN_USER_116", "EM_UNKNOWN_USER_117",
856 "EM_UNKNOWN_USER_118", "EM_UNKNOWN_USER_119", "EM_SETLANGOPTIONS", "EM_GETLANGOPTIONS",
857 "EM_GETIMECOMPMODE", "EM_FINDTEXTW", "EM_FINDTEXTEXW", "EM_RECONVERSION",
858 "EM_SETIMEMODEBIAS", "EM_GETIMEMODEBIAS"
859};
860
861static const char *get_msg_name( UINT msg )
862{
863 if (msg >= EM_GETSEL && msg <= EM_CHARFROMPOS)
864 return edit_messages[msg - EM_GETSEL];
867 return "";
868}
869
871{
872 struct host *host = host_create( hwnd, create, emulate_10 );
873 IUnknown *unk;
874 HRESULT hr;
875
876 if (!host) return FALSE;
877
878 hr = create_text_services( NULL, (ITextHost *)&host->ITextHost_iface, &unk, emulate_10 );
879 if (FAILED( hr ))
880 {
881 ITextHost2_Release( &host->ITextHost_iface );
882 return FALSE;
883 }
884 IUnknown_QueryInterface( unk, &IID_ITextServices, (void **)&host->text_srv );
885 IUnknown_Release( unk );
886
888
889 return TRUE;
890}
891
893{
895 WORD sizeA;
896 HRESULT hr;
897 WCHAR *buf;
898
899 *res = 0;
900 sizeA = *(WORD *)lparam;
901 *(WORD *)lparam = 0;
902 if (!sizeA) return S_OK;
903 buf = heap_alloc( len * sizeof(WCHAR) );
904 if (!buf) return E_OUTOFMEMORY;
905 *(WORD *)buf = len;
907 if (hr == S_OK && len)
908 {
909 len = WideCharToMultiByte( CP_ACP, 0, buf, len, (char *)lparam, sizeA, NULL, NULL );
910 if (!len && GetLastError() == ERROR_INSUFFICIENT_BUFFER) len = sizeA;
911 if (len < sizeA) ((char *)lparam)[len] = '\0';
912 *res = len;
913 }
914 heap_free( buf );
915 return hr;
916}
917
919{
921 HRESULT hr;
922 unsigned int count;
923 LRESULT len;
924
925 *res = 0;
926 if (rangeA->chrg.cpMin < 0) return S_OK;
928 range.chrg = rangeA->chrg;
929 if ((range.chrg.cpMin == 0 && range.chrg.cpMax == -1) || range.chrg.cpMax > len)
930 range.chrg.cpMax = len;
931 if (range.chrg.cpMin >= range.chrg.cpMax) return S_OK;
932 count = range.chrg.cpMax - range.chrg.cpMin + 1;
933 range.lpstrText = heap_alloc( count * sizeof(WCHAR) );
934 if (!range.lpstrText) return E_OUTOFMEMORY;
936 if (hr == S_OK && len)
937 {
938 if (!host->emulate_10) count = INT_MAX;
939 len = WideCharToMultiByte( CP_ACP, 0, range.lpstrText, -1, rangeA->lpstrText, count, NULL, NULL );
940 if (!host->emulate_10) *res = len - 1;
941 else
942 {
943 *res = count - 1;
944 rangeA->lpstrText[*res] = '\0';
945 }
946 }
947 heap_free( range.lpstrText );
948 return hr;
949}
950
952{
953 DWORD style, old_options, new_options, change, props_mask = 0;
956
957 new_options = old_options = SendMessageW( host->window, EM_GETOPTIONS, 0, 0 );
958
959 switch (op)
960 {
961 case ECOOP_SET:
962 new_options = value;
963 break;
964 case ECOOP_OR:
965 new_options |= value;
966 break;
967 case ECOOP_AND:
968 new_options &= value;
969 break;
970 case ECOOP_XOR:
971 new_options ^= value;
972 }
973 new_options &= mask;
974
975 change = (new_options ^ old_options);
976
977 if (change & ECO_AUTOWORDSELECTION)
978 {
980 props_mask |= TXTBIT_AUTOWORDSEL;
981 }
982 if (change & ECO_AUTOVSCROLL)
983 {
985 props_mask |= TXTBIT_SCROLLBARCHANGE;
986 }
987 if (change & ECO_AUTOHSCROLL)
988 {
990 props_mask |= TXTBIT_SCROLLBARCHANGE;
991 }
992 if (change & ECO_NOHIDESEL)
993 {
995 props_mask |= TXTBIT_HIDESELECTION;
996 }
997 if (change & ECO_READONLY)
998 {
1000 props_mask |= TXTBIT_READONLY;
1001 }
1002 if (change & ECO_SAVESEL)
1003 {
1005 props_mask |= TXTBIT_SAVESELECTION;
1006 }
1007 if (change & ECO_SELECTIONBAR)
1008 {
1009 host->sel_bar ^= 1;
1010 props_mask |= TXTBIT_SELBARCHANGE;
1011 if (host->use_set_rect)
1012 {
1015 props_mask |= TXTBIT_CLIENTRECTCHANGE;
1016 }
1017 }
1018 if (change & ECO_VERTICAL)
1019 {
1021 props_mask |= TXTBIT_VERTICAL;
1022 }
1023 if (change & ECO_WANTRETURN) host->want_return ^= 1;
1024
1025 if (props_mask)
1026 ITextServices_OnTxPropertyBitsChange( host->text_srv, props_mask, host->props & props_mask );
1027
1028 *res = new_options;
1029
1030 mask &= ~ECO_AUTOWORDSELECTION; /* doesn't correspond to a window style */
1032 style = (style & ~mask) | (*res & mask);
1034 return S_OK;
1035}
1036
1037/* handle dialog mode VK_RETURN. Returns TRUE if message has been processed */
1039{
1040 BOOL ctrl_is_down = GetKeyState( VK_CONTROL ) & 0x8000;
1041
1042 if (ctrl_is_down) return TRUE;
1043
1044 if (host->want_return) return FALSE;
1045
1046 if (host->parent)
1047 {
1048 DWORD id = SendMessageW( host->parent, DM_GETDEFID, 0, 0 );
1049 if (HIWORD( id ) == DC_HASDEFID)
1050 {
1051 HWND ctrl = GetDlgItem( host->parent, LOWORD( id ));
1052 if (ctrl)
1053 {
1056 }
1057 }
1058 }
1059 return TRUE;
1060}
1061
1063{
1064 MSGFILTER msgf;
1065 LRESULT res;
1066
1067 if (!host->parent) return 0;
1068 msgf.nmhdr.hwndFrom = host->window;
1070 msgf.nmhdr.code = EN_MSGFILTER;
1071 msgf.msg = msg;
1072 msgf.wParam = *wparam;
1073 msgf.lParam = *lparam;
1074 if ((res = SendMessageW( host->parent, WM_NOTIFY, msgf.nmhdr.idFrom, (LPARAM)&msgf )))
1075 return res;
1076 *wparam = msgf.wParam;
1077 *lparam = msgf.lParam;
1078
1079 return 0;
1080}
1081
1083 LPARAM lparam, BOOL unicode )
1084{
1085 struct host *host;
1086 HRESULT hr = S_OK;
1087 LRESULT res = 0;
1088
1089 TRACE( "enter hwnd %p msg %04x (%s) %lx %lx, unicode %d\n",
1090 hwnd, msg, get_msg_name(msg), wparam, lparam, unicode );
1091
1092 host = (struct host *)GetWindowLongPtrW( hwnd, 0 );
1093 if (!host)
1094 {
1095 if (msg == WM_NCCREATE)
1096 {
1098
1099 TRACE( "WM_NCCREATE: hwnd %p style 0x%08x\n", hwnd, pcs->style );
1100 return create_windowed_editor( hwnd, pcs, FALSE );
1101 }
1102 else return DefWindowProcW( hwnd, msg, wparam, lparam );
1103 }
1104
1105 if ((((host->event_mask & ENM_KEYEVENTS) && msg >= WM_KEYFIRST && msg <= WM_KEYLAST) ||
1108 {
1109 host->notify_level++;
1111 if (!--host->notify_level && host->defer_release)
1112 {
1113 TRACE( "exit (filtered deferred release) hwnd %p msg %04x (%s) %lx %lx -> 0\n",
1115 ITextHost2_Release( &host->ITextHost_iface );
1116 return 0;
1117 }
1118
1119 if (res)
1120 {
1121 TRACE( "exit (filtered %lu) hwnd %p msg %04x (%s) %lx %lx -> 0\n",
1123 return 0;
1124 }
1125 }
1126
1127 switch (msg)
1128 {
1129 case WM_CHAR:
1130 {
1131 WCHAR wc = wparam;
1132
1133 if (!unicode) MultiByteToWideChar( CP_ACP, 0, (char *)&wparam, 1, &wc, 1 );
1134 if (wparam == '\r' && host->dialog_mode && host->emulate_10 && handle_dialog_enter( host )) break;
1136 break;
1137 }
1138
1139 case WM_CREATE:
1140 {
1142 CREATESTRUCTA *createA = (CREATESTRUCTA *)lparam;
1143 void *text;
1144 WCHAR *textW = NULL;
1145 LONG codepage = unicode ? CP_UNICODE : CP_ACP;
1146 int len;
1147
1149
1150 if (lparam)
1151 {
1152 text = unicode ? (void *)createW->lpszName : (void *)createA->lpszName;
1154 }
1157 break;
1158 }
1159 case WM_DESTROY:
1160 if (!host->notify_level) ITextHost2_Release( &host->ITextHost_iface );
1161 else host->defer_release = 1;
1162 return 0;
1163
1164 case WM_ERASEBKGND:
1165 {
1166 HDC hdc = (HDC)wparam;
1167 RECT rc;
1168 HBRUSH brush;
1169
1170 if (GetUpdateRect( hwnd, &rc, TRUE ))
1171 {
1173 FillRect( hdc, &rc, brush );
1174 DeleteObject( brush );
1175 }
1176 return 1;
1177 }
1178 case EM_FINDTEXT:
1179 {
1181 FINDTEXTW new_params;
1182 int len;
1183
1184 if (!unicode)
1185 {
1186 new_params.chrg = params->chrg;
1187 new_params.lpstrText = ME_ToUnicode( CP_ACP, (char *)params->lpstrText, &len );
1188 params = &new_params;
1189 }
1191 if (!unicode) ME_EndToUnicode( CP_ACP, (WCHAR *)new_params.lpstrText );
1192 break;
1193 }
1194 case EM_FINDTEXTEX:
1195 {
1196 FINDTEXTEXA *paramsA = (FINDTEXTEXA *)lparam;
1198 FINDTEXTEXW new_params;
1199 int len;
1200
1201 if (!unicode)
1202 {
1203 new_params.chrg = params->chrg;
1204 new_params.lpstrText = ME_ToUnicode( CP_ACP, (char *)params->lpstrText, &len );
1205 params = &new_params;
1206 }
1208 if (!unicode)
1209 {
1210 ME_EndToUnicode( CP_ACP, (WCHAR *)new_params.lpstrText );
1211 paramsA->chrgText = params->chrgText;
1212 }
1213 break;
1214 }
1215 case WM_GETDLGCODE:
1216 if (lparam) host->dialog_mode = TRUE;
1217
1221 break;
1222
1223 case EM_GETLINE:
1225 else hr = get_lineA( host->text_srv, wparam, lparam, &res );
1226 break;
1227
1228 case EM_GETPASSWORDCHAR:
1230 break;
1231
1232 case EM_GETRECT:
1234 break;
1235
1236 case EM_GETSELTEXT:
1237 {
1239
1241 else
1242 {
1244 range.lpstrText = (char *)lparam;
1245 range.lpstrText[0] = '\0';
1246 hr = get_text_rangeA( host, &range, &res );
1247 }
1248 break;
1249 }
1250 case EM_GETOPTIONS:
1260 break;
1261
1262 case WM_GETTEXT:
1263 {
1265
1266 params.cb = wparam * (unicode ? sizeof(WCHAR) : sizeof(CHAR));
1267 params.flags = GT_USECRLF;
1268 params.codepage = unicode ? CP_UNICODE : CP_ACP;
1269 params.lpDefaultChar = NULL;
1270 params.lpUsedDefChar = NULL;
1272 break;
1273 }
1274 case WM_GETTEXTLENGTH:
1275 {
1277
1279 params.codepage = unicode ? CP_UNICODE : CP_ACP;
1281 break;
1282 }
1283 case EM_GETTEXTRANGE:
1285 else hr = get_text_rangeA( host, (TEXTRANGEA *)lparam, &res );
1286 break;
1287
1288 case WM_KEYDOWN:
1289 switch (LOWORD( wparam ))
1290 {
1291 case VK_ESCAPE:
1292 if (host->dialog_mode && host->parent)
1293 PostMessageW( host->parent, WM_CLOSE, 0, 0 );
1294 break;
1295 case VK_TAB:
1296 if (host->dialog_mode && host->parent)
1298 break;
1299 case VK_RETURN:
1300 if (host->dialog_mode && !host->emulate_10 && handle_dialog_enter( host )) break;
1301 /* fall through */
1302 default:
1304 }
1305 break;
1306
1307 case WM_PAINT:
1308 case WM_PRINTCLIENT:
1309 {
1310 HDC hdc;
1311 RECT rc, client, update;
1312 PAINTSTRUCT ps;
1314
1316
1317 if (msg == WM_PAINT)
1318 {
1319 hdc = BeginPaint( hwnd, &ps );
1320 update = ps.rcPaint;
1321 }
1322 else
1323 {
1324 hdc = (HDC)wparam;
1325 update = client;
1326 }
1327
1328 brush = SelectObject( hdc, brush );
1329
1330 /* Erase area outside of the formatting rectangle */
1331 if (update.top < client.top)
1332 {
1333 rc = update;
1334 rc.bottom = client.top;
1335 PatBlt( hdc, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, PATCOPY );
1336 update.top = client.top;
1337 }
1338 if (update.bottom > client.bottom)
1339 {
1340 rc = update;
1341 rc.top = client.bottom;
1342 PatBlt( hdc, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, PATCOPY );
1343 update.bottom = client.bottom;
1344 }
1345 if (update.left < client.left)
1346 {
1347 rc = update;
1348 rc.right = client.left;
1349 PatBlt( hdc, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, PATCOPY );
1350 update.left = client.left;
1351 }
1352 if (update.right > client.right)
1353 {
1354 rc = update;
1355 rc.left = client.right;
1356 PatBlt( hdc, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, PATCOPY );
1357 update.right = client.right;
1358 }
1359
1360 ITextServices_TxDraw( host->text_srv, DVASPECT_CONTENT, 0, NULL, NULL, hdc, NULL, NULL, NULL,
1361 &update, NULL, 0, TXTVIEW_ACTIVE );
1362 DeleteObject( SelectObject( hdc, brush ) );
1363 if (msg == WM_PAINT) EndPaint( hwnd, &ps );
1364 return 0;
1365 }
1366 case EM_REPLACESEL:
1367 {
1368 int len;
1369 LONG codepage = unicode ? CP_UNICODE : CP_ACP;
1370 WCHAR *text = ME_ToUnicode( codepage, (void *)lparam, &len );
1371
1374 res = len;
1375 break;
1376 }
1377 case EM_SETBKGNDCOLOR:
1382 break;
1383
1384 case WM_SETCURSOR:
1385 {
1386 POINT pos;
1387 RECT rect;
1388
1389 if (hwnd != (HWND)wparam) break;
1390 GetCursorPos( &pos );
1391 ScreenToClient( hwnd, &pos );
1393 if (PtInRect( &rect, pos ))
1394 ITextServices_OnTxSetCursor( host->text_srv, DVASPECT_CONTENT, 0, NULL, NULL, NULL, NULL, NULL, pos.x, pos.y );
1396 break;
1397 }
1398 case EM_SETEVENTMASK:
1401 break;
1402
1403 case EM_SETOPTIONS:
1405 break;
1406
1407 case EM_SETPASSWORDCHAR:
1408 if (wparam == host->password_char) break;
1411 else host->props &= ~TXTBIT_USEPASSWORD;
1413 break;
1414
1415 case EM_SETREADONLY:
1416 {
1418 DWORD mask = wparam ? ECO_READONLY : ~ECO_READONLY;
1419
1421 return 1;
1422 }
1423 case EM_SETRECT:
1424 case EM_SETRECTNP:
1425 {
1426 RECT *rc = (RECT *)lparam;
1427
1428 if (!rc) host->use_set_rect = 0;
1429 else
1430 {
1431 if (wparam >= 2) break;
1432 host->set_rect = *rc;
1433 if (host->client_edge)
1434 {
1435 InflateRect( &host->set_rect, 1, 0 );
1436 host->set_rect.top -= 1;
1437 }
1439 host->use_set_rect = 1;
1440 }
1442 break;
1443 }
1444 case WM_SETTEXT:
1445 {
1446 char *textA = (char *)lparam;
1447 WCHAR *text = (WCHAR *)lparam;
1448 int len;
1449
1450 if (!unicode && textA && strncmp( textA, "{\\rtf", 5 ) && strncmp( textA, "{\\urtf", 6 ))
1453 if (text != (WCHAR *)lparam) ME_EndToUnicode( CP_ACP, text );
1454 break;
1455 }
1456 case EM_SHOWSCROLLBAR:
1457 {
1458 DWORD mask = 0, new;
1459
1460 if (wparam == SB_HORZ) mask = WS_HSCROLL;
1461 else if (wparam == SB_VERT) mask = WS_VSCROLL;
1462 else if (wparam == SB_BOTH) mask = WS_HSCROLL | WS_VSCROLL;
1463
1464 if (mask)
1465 {
1466 new = lparam ? mask : 0;
1467 if ((host->scrollbars & mask) != new)
1468 {
1469 host->scrollbars &= ~mask;
1470 host->scrollbars |= new;
1472 }
1473 }
1474
1475 res = 0;
1476 break;
1477 }
1479 {
1480 RECT client;
1481 WINDOWPOS *winpos = (WINDOWPOS *)lparam;
1482
1483 hr = S_FALSE; /* call defwndproc */
1484 if (winpos->flags & SWP_NOCLIENTSIZE) break;
1486 if (host->use_set_rect)
1487 {
1490 }
1493 break;
1494 }
1495 default:
1497 }
1498
1499 if (hr == S_FALSE)
1501
1502 TRACE( "exit hwnd %p msg %04x (%s) %lx %lx, unicode %d -> %lu\n",
1503 hwnd, msg, get_msg_name(msg), wparam, lparam, unicode, res );
1504
1505 return res;
1506}
1507
1509{
1510 BOOL unicode = TRUE;
1511
1512 /* Under Win9x RichEdit20W returns ANSI strings, see the tests. */
1513 if (msg == WM_GETTEXT && (GetVersion() & 0x80000000))
1514 unicode = FALSE;
1515
1516 return RichEditWndProc_common( hwnd, msg, wparam, lparam, unicode );
1517}
1518
1520{
1522}
1523
1524/******************************************************************
1525 * RichEditANSIWndProc (RICHED20.10)
1526 */
1528{
1529 return RichEditWndProcA( hwnd, msg, wparam, lparam );
1530}
1531
1532/******************************************************************
1533 * RichEdit10ANSIWndProc (RICHED20.9)
1534 */
1536{
1537 if (msg == WM_NCCREATE && !GetWindowLongPtrW( hwnd, 0 ))
1538 {
1540
1541 TRACE( "WM_NCCREATE: hwnd %p style 0x%08x\n", hwnd, pcs->style );
1542 return create_windowed_editor( hwnd, pcs, TRUE );
1543 }
1545}
1546
1548{
1549 /* FIXME: Not implemented */
1550 TRACE( "hwnd %p msg %04x (%s) %08lx %08lx\n",
1552 return DefWindowProcW( hwnd, msg, wparam, lparam );
1553}
1554
1556{
1557 /* FIXME: Not implemented */
1558 TRACE( "hwnd %p msg %04x (%s) %08lx %08lx\n",
1560 return DefWindowProcW( hwnd, msg, wparam, lparam );
1561}
1562
1563/******************************************************************
1564 * REExtendedRegisterClass (RICHED20.8)
1565 *
1566 * FIXME undocumented
1567 * Need to check for errors and implement controls and callbacks
1568 */
1570{
1571 WNDCLASSW wc;
1572 UINT result;
1573
1574 FIXME( "semi stub\n" );
1575 wc.cbClsExtra = 0;
1576 wc.cbWndExtra = 4;
1577 wc.hInstance = NULL;
1578 wc.hIcon = NULL;
1579 wc.hCursor = NULL;
1580 wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
1581 wc.lpszMenuName = NULL;
1582
1583 if (!listbox_registered)
1584 {
1587 wc.lpszClassName = L"REListBox20W";
1589 }
1590
1592 {
1595 wc.lpszClassName = L"REComboBox20W";
1597 }
1598
1599 result = 0;
1600 if (listbox_registered) result += 1;
1601 if (combobox_registered) result += 2;
1602
1603 return result;
1604}
1605
1607{
1608 WNDCLASSW wcW;
1609 WNDCLASSA wcA;
1610
1613 wcW.cbClsExtra = 0;
1614 wcW.cbWndExtra = sizeof(struct host *);
1615 wcW.hInstance = NULL; /* hInstance would register DLL-local class */
1616 wcW.hIcon = NULL;
1619 wcW.lpszMenuName = NULL;
1620
1621 if (!(GetVersion() & 0x80000000))
1622 {
1624 if (!RegisterClassW( &wcW )) return FALSE;
1626 if (!RegisterClassW( &wcW )) return FALSE;
1627 }
1628 else
1629 {
1630 /* WNDCLASSA/W have the same layout */
1631 wcW.lpszClassName = (LPCWSTR)"RichEdit20W";
1632 if (!RegisterClassA( (WNDCLASSA *)&wcW )) return FALSE;
1633 wcW.lpszClassName = (LPCWSTR)"RichEdit50W";
1634 if (!RegisterClassA( (WNDCLASSA *)&wcW )) return FALSE;
1635 }
1636
1639 wcA.cbClsExtra = 0;
1640 wcA.cbWndExtra = sizeof(struct host *);
1641 wcA.hInstance = NULL; /* hInstance would register DLL-local class */
1642 wcA.hIcon = NULL;
1645 wcA.lpszMenuName = NULL;
1647 if (!RegisterClassA( &wcA )) return FALSE;
1648 wcA.lpszClassName = "RichEdit50A";
1649 if (!RegisterClassA( &wcA )) return FALSE;
1650
1651 return TRUE;
1652}
1653
1655{
1656 switch (reason)
1657 {
1658 case DLL_PROCESS_ATTACH:
1661 me_heap = HeapCreate( 0, 0x10000, 0 );
1662 if (!register_classes( instance )) return FALSE;
1663 LookupInit();
1664 break;
1665
1666 case DLL_PROCESS_DETACH:
1667 if (reserved) break;
1671 UnregisterClassA( "RichEdit50A", 0 );
1672 if (listbox_registered) UnregisterClassW( L"REListBox20W", 0 );
1673 if (combobox_registered) UnregisterClassW( L"REComboBox20W", 0 );
1674 LookupCleanup();
1677 break;
1678 }
1679 return TRUE;
1680}
@ lparam
Definition: SystemMenu.c:31
@ wparam
Definition: SystemMenu.c:30
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
Definition: utclib.c:534
Arabic default style
Definition: afstyles.h:94
void release_typelib(void)
Definition: apps.c:159
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define msg(x)
Definition: auth_time.c:54
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
#define HandleToLong(h)
Definition: basetsd.h:80
#define LongToHandle(h)
Definition: basetsd.h:82
const GUID IID_IUnknown
#define SWP_NOCLIENTSIZE
Definition: msg.h:31
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
DWORD HIMC
Definition: dimm.idl:75
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static HINSTANCE instance
Definition: main.c:40
UINT op
Definition: effect.c:236
#define DECLSPEC_HIDDEN
Definition: precomp.h:8
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1904
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_PROCESS_DETACH
Definition: compat.h:130
#define CP_ACP
Definition: compat.h:109
#define WideCharToMultiByte
Definition: compat.h:111
#define MultiByteToWideChar
Definition: compat.h:110
HIMC WINAPI ImmGetContext(HWND hWnd)
Definition: imm.c:1045
BOOL WINAPI ImmReleaseContext(HWND hWnd, HIMC hIMC)
Definition: imm.c:1086
static const WCHAR createW[]
Definition: object.c:35
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
const WCHAR * text
Definition: package.c:1794
#define CP_UNICODE
Definition: stg_prop.c:74
HANDLE me_heap
Definition: editor.c:257
HINSTANCE dll_instance
Definition: editor.c:255
void LookupCleanup(void)
Definition: reader.c:2210
void LookupInit(void)
Definition: reader.c:2191
#define pt(x, y)
Definition: drawing.c:79
r reserved
Definition: btrfs.c:3006
#define INFINITE
Definition: serial.h:102
#define ITextServices_TxSetText(This, a)
Definition: editor.h:419
#define ITextServices_TxDraw(This, a, b, c, d, e, f, g, h, i, j, k, l)
Definition: editor.h:409
HRESULT create_text_services(IUnknown *outer, ITextHost *text_host, IUnknown **unk, BOOL emulate_10) DECLSPEC_HIDDEN
Definition: txtsrv.c:577
#define ITextServices_TxSendMessage(This, a, b, c, d)
Definition: editor.h:408
#define ITextHost_TxGetSysColor(This, a)
Definition: editor.h:358
void ME_EndToUnicode(LONG codepage, LPVOID psz) DECLSPEC_HIDDEN
Definition: string.c:248
#define ITextServices_OnTxInPlaceActivate(This, a)
Definition: editor.h:414
#define ITextHost_TxGetClientRect(This, a)
Definition: editor.h:354
#define ITextServices_TxGetHScroll(This, a, b, c, d, e)
Definition: editor.h:410
#define ITextHost_TxGetPasswordChar(This, a)
Definition: editor.h:362
#define ITextHost_TxSetCursor(This, a, b)
Definition: editor.h:349
#define ITextServices_TxGetVScroll(This, a, b, c, d, e)
Definition: editor.h:411
#define ITextServices_OnTxPropertyBitsChange(This, a, b)
Definition: editor.h:424
LPWSTR ME_ToUnicode(LONG codepage, LPVOID psz, INT *len) DECLSPEC_HIDDEN
Definition: string.c:226
#define ITextServices_OnTxSetCursor(This, a, b, c, d, e, f, g, h, i)
Definition: editor.h:412
#define SELECTIONBAR_WIDTH
Definition: editstr.h:99
void bar()
Definition: ehthrow.cxx:142
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
pKey DeleteObject()
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
GLuint res
Definition: glext.h:9613
const GLubyte * c
Definition: glext.h:8905
GLuint index
Definition: glext.h:6031
GLenum GLint GLuint mask
Definition: glext.h:6028
GLenum GLint * range
Definition: glext.h:7539
GLenum mode
Definition: glext.h:6217
GLenum const GLfloat * params
Definition: glext.h:5645
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
Definition: glext.h:10929
GLbitfield flags
Definition: glext.h:7161
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLuint64EXT * result
Definition: glext.h:11304
GLenum GLsizei len
Definition: glext.h:6722
GLuint id
Definition: glext.h:5910
HANDLE WINAPI HeapCreate(DWORD flOptions, SIZE_T dwInitialSize, SIZE_T dwMaximumSize)
Definition: heapmem.c:45
BOOL WINAPI HeapDestroy(HANDLE hHeap)
Definition: heapmem.c:85
#define cs
Definition: i386-dis.c:442
const char cursor[]
Definition: icontest.c:13
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
#define USHRT_MAX
Definition: limits.h:38
#define S_OK
Definition: intsafe.h:52
#define INT_MAX
Definition: intsafe.h:150
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
GLint dy
Definition: linetemp.h:97
if(dx< 0)
Definition: linetemp.h:194
GLint dx
Definition: linetemp.h:97
HDC hdc
Definition: main.c:9
static const char textA[]
Definition: registrar.c:40
static HBITMAP
Definition: button.c:44
static BOOL register_classes(void)
Definition: edit.c:2629
static HDC
Definition: imagelist.c:88
static const WCHAR textW[]
Definition: itemdlg.c:1559
static const struct access_res create[16]
Definition: package.c:7505
#define __thiscall
Definition: cpp.c:43
static ATOM item
Definition: dde.c:856
#define ctrl
Definition: input.c:1756
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define L(x)
Definition: ntvdm.h:50
#define DEFINE_THISCALL_WRAPPER(func, args)
Definition: msvc-thiscall.c:2
#define LOWORD(l)
Definition: pedump.c:82
#define ES_PASSWORD
Definition: pedump.c:670
#define ES_READONLY
Definition: pedump.c:675
#define ES_AUTOVSCROLL
Definition: pedump.c:671
#define ES_WANTRETURN
Definition: pedump.c:676
#define ES_NOHIDESEL
Definition: pedump.c:673
#define WS_VSCROLL
Definition: pedump.c:627
#define ES_AUTOHSCROLL
Definition: pedump.c:672
long LONG
Definition: pedump.c:60
#define WS_HSCROLL
Definition: pedump.c:628
#define ES_CENTER
Definition: pedump.c:665
#define ES_RIGHT
Definition: pedump.c:666
#define ES_MULTILINE
Definition: pedump.c:667
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
void redraw(int x, int y, int cx, int cy)
Definition: qtewin.cpp:1248
#define THISCALL(func)
Definition: asm.h:153
DWORD WINAPI GetVersion()
Definition: redirtest.c:5
#define ECO_NOHIDESEL
Definition: richedit.h:459
#define EM_GETIMEMODEBIAS
Definition: richedit.h:152
#define PFA_RIGHT
Definition: richedit.h:922
#define ECO_WANTRETURN
Definition: richedit.h:461
#define PFA_CENTER
Definition: richedit.h:923
#define GTL_CLOSE
Definition: richedit.h:1057
#define EM_GETSELTEXT
Definition: richedit.h:95
#define PFA_LEFT
Definition: richedit.h:921
#define EN_PROTECTED
Definition: richedit.h:195
#define ECO_AUTOWORDSELECTION
Definition: richedit.h:456
#define EM_SETEVENTMASK
Definition: richedit.h:102
#define EM_SETOPTIONS
Definition: richedit.h:110
#define EM_CANPASTE
Definition: richedit.h:83
static const WCHAR RICHEDIT_CLASS20W[]
Definition: richedit.h:50
#define ECO_VERTICAL
Definition: richedit.h:464
#define ECO_SAVESEL
Definition: richedit.h:462
#define EM_SETBKGNDCOLOR
Definition: richedit.h:100
#define EN_SELCHANGE
Definition: richedit.h:193
#define GTL_NUMCHARS
Definition: richedit.h:1058
#define ES_NOOLEDRAGDROP
Definition: richedit.h:223
#define EM_SHOWSCROLLBAR
Definition: richedit.h:130
#define ENM_KEYEVENTS
Definition: richedit.h:475
#define EM_GETOPTIONS
Definition: richedit.h:111
#define RICHEDIT_CLASS20A
Definition: richedit.h:43
#define ECO_AUTOHSCROLL
Definition: richedit.h:458
#define EN_REQUESTRESIZE
Definition: richedit.h:192
#define EM_CHARFROMPOS
Definition: richedit.h:78
#define ES_DISABLENOSCROLL
Definition: richedit.h:224
#define EM_GETTEXTRANGE
Definition: richedit.h:108
#define WM_PRINTCLIENT
Definition: richedit.h:70
#define EN_STOPNOUNDO
Definition: richedit.h:197
#define EM_FINDTEXTW
Definition: richedit.h:147
#define ECOOP_XOR
Definition: richedit.h:453
#define PFM_ALIGNMENT
Definition: richedit.h:841
#define EN_DROPFILES
Definition: richedit.h:194
#define EM_FINDTEXT
Definition: richedit.h:89
#define ES_SAVESEL
Definition: richedit.h:226
#define ECO_READONLY
Definition: richedit.h:460
#define ECOOP_OR
Definition: richedit.h:451
#define EM_GETTEXTLENGTHEX
Definition: richedit.h:129
#define ECOOP_SET
Definition: richedit.h:450
#define EN_MSGFILTER
Definition: richedit.h:191
static const WCHAR MSFTEDIT_CLASS[]
Definition: richedit.h:40
#define EN_LINK
Definition: richedit.h:202
#define ES_SELECTIONBAR
Definition: richedit.h:230
#define GT_USECRLF
Definition: richedit.h:1037
#define ES_VERTICAL
Definition: richedit.h:229
#define ECO_AUTOVSCROLL
Definition: richedit.h:457
#define WM_NOTIFY
Definition: richedit.h:61
#define ENM_SCROLLEVENTS
Definition: richedit.h:471
#define EM_GETTEXTEX
Definition: richedit.h:128
#define EM_FINDTEXTEXW
Definition: richedit.h:148
#define EM_EXGETSEL
Definition: richedit.h:85
#define EM_FINDTEXTEX
Definition: richedit.h:112
#define ENM_MOUSEEVENTS
Definition: richedit.h:476
#define EN_SAVECLIPBOARD
Definition: richedit.h:199
#define GTL_USECRLF
Definition: richedit.h:1055
#define ECO_SELECTIONBAR
Definition: richedit.h:463
#define ECOOP_AND
Definition: richedit.h:452
#define EN_OLEOPFAILED
Definition: richedit.h:200
#define memset(x, y, z)
Definition: compat.h:39
static FILE * client
Definition: client.c:41
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
& rect
Definition: startmenu.cpp:1413
UINT flags
Definition: winuser.h:3605
HBRUSH hbrBackground
Definition: winuser.h:3181
HICON hIcon
Definition: winuser.h:3179
HINSTANCE hInstance
Definition: winuser.h:3178
HCURSOR hCursor
Definition: winuser.h:3180
int cbWndExtra
Definition: winuser.h:3177
UINT style
Definition: winuser.h:3174
LPCSTR lpszMenuName
Definition: winuser.h:3182
LPCSTR lpszClassName
Definition: winuser.h:3183
WNDPROC lpfnWndProc
Definition: winuser.h:3175
int cbClsExtra
Definition: winuser.h:3176
LPCWSTR lpszClassName
Definition: winuser.h:3196
LPCWSTR lpszMenuName
Definition: winuser.h:3195
HBRUSH hbrBackground
Definition: winuser.h:3194
HICON hIcon
Definition: winuser.h:3192
HINSTANCE hInstance
Definition: winuser.h:3191
int cbClsExtra
Definition: winuser.h:3189
UINT style
Definition: winuser.h:3187
WNDPROC lpfnWndProc
Definition: winuser.h:3188
int cbWndExtra
Definition: winuser.h:3190
HCURSOR hCursor
Definition: winuser.h:3193
LONG cpMax
Definition: richedit.h:501
LONG cpMin
Definition: richedit.h:500
CHARRANGE chrg
Definition: richedit.h:586
LPCWSTR lpstrText
Definition: richedit.h:587
CHARRANGE chrgText
Definition: richedit.h:595
CHARRANGE chrg
Definition: richedit.h:599
LPCWSTR lpstrText
Definition: richedit.h:600
LPARAM lParam
Definition: richedit.h:643
NMHDR nmhdr
Definition: richedit.h:640
UINT msg
Definition: richedit.h:641
WPARAM wParam
Definition: richedit.h:642
WORD wAlignment
Definition: richedit.h:673
DWORD dwMask
Definition: richedit.h:667
UINT cbSize
Definition: richedit.h:666
CHARRANGE chrg
Definition: richedit.h:508
LPSTR lpstrText
Definition: richedit.h:509
Definition: uimain.c:89
Definition: http.c:7252
Definition: dsound.c:943
Definition: txthost.c:37
COLORREF back_colour
Definition: txthost.c:53
HWND parent
Definition: txthost.c:41
HWND window
Definition: txthost.c:41
ITextHost2 ITextHost_iface
Definition: txthost.c:38
DWORD event_mask
Definition: txthost.c:51
RECT client_rect
Definition: txthost.c:52
unsigned int emulate_10
Definition: txthost.c:42
unsigned int notify_level
Definition: txthost.c:55
LONG ref
Definition: txthost.c:39
unsigned int defer_release
Definition: txthost.c:49
PARAFORMAT2 para_fmt
Definition: txthost.c:50
unsigned int dialog_mode
Definition: txthost.c:43
unsigned int want_return
Definition: txthost.c:44
unsigned int sel_bar
Definition: txthost.c:45
ITextServices * text_srv
Definition: txthost.c:40
unsigned int use_set_rect
Definition: txthost.c:47
DWORD scrollbars
Definition: txthost.c:51
RECT set_rect
Definition: txthost.c:52
unsigned int use_back_colour
Definition: txthost.c:48
unsigned int client_edge
Definition: txthost.c:46
DWORD props
Definition: txthost.c:51
WCHAR password_char
Definition: txthost.c:54
Definition: send.c:48
LPCSTR lpszName
Definition: winuser.h:2960
UINT_PTR idFrom
Definition: winuser.h:3169
UINT code
Definition: winuser.h:3170
HWND hwndFrom
Definition: winuser.h:3168
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: dhcpd.h:245
EXTERN_C const IID IID_ITextServices
Definition: textserv.h:36
#define TXTBIT_AUTOWORDSEL
Definition: textserv.h:192
#define TXTBIT_WORDWRAP
Definition: textserv.h:195
#define TXTBIT_CLIENTRECTCHANGE
Definition: textserv.h:205
EXTERN_C const IID IID_ITextHost
Definition: textserv.h:37
#define TXTBIT_MULTILINE
Definition: textserv.h:186
#define TXTBIT_VERTICAL
Definition: textserv.h:193
#define TXTBIT_ALLOWBEEP
Definition: textserv.h:196
enum _TXTBACKSTYLE TXTBACKSTYLE
#define TXTBIT_SCROLLBARCHANGE
Definition: textserv.h:201
#define TXTBIT_SAVESELECTION
Definition: textserv.h:191
#define TXTBIT_READONLY
Definition: textserv.h:187
@ TXTBACK_OPAQUE
Definition: textserv.h:165
#define TXTBIT_RICHTEXT
Definition: textserv.h:185
#define TXTBIT_USEPASSWORD
Definition: textserv.h:189
@ TXTVIEW_ACTIVE
Definition: textserv.h:181
#define TXTBIT_HIDESELECTION
Definition: textserv.h:190
EXTERN_C const IID IID_ITextHost2
Definition: textserv.h:38
#define TXTBIT_SELBARCHANGE
Definition: textserv.h:194
#define TXTBIT_DISABLEDRAG
Definition: textserv.h:197
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetBackStyle(ITextHost2 *iface, TXTBACKSTYLE *style)
Definition: txthost.c:405
static BOOL create_windowed_editor(HWND hwnd, CREATESTRUCTW *create, BOOL emulate_10)
Definition: txthost.c:870
DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxSetCaretPos(ITextHost2 *iface, INT x, INT y)
Definition: txthost.c:280
static const ITextHost2Vtbl textHostVtbl
Definition: txthost.c:58
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetExtent(ITextHost2 *iface, SIZEL *extent)
Definition: txthost.c:444
static LRESULT WINAPI RichEditWndProcA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: txthost.c:1519
static ULONG WINAPI ITextHostImpl_Release(ITextHost2 *iface)
Definition: txthost.c:158
DECLSPEC_HIDDEN void __thiscall ITextHostImpl_TxImmReleaseContext(ITextHost2 *iface, HIMC context)
Definition: txthost.c:535
DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxSetScrollPos(ITextHost2 *iface, INT bar, INT pos, BOOL redraw)
Definition: txthost.c:226
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetWindowStyles(ITextHost2 *iface, DWORD *style, DWORD *ex_style)
Definition: txthost.c:601
DECLSPEC_HIDDEN void __thiscall ITextHostImpl_TxInvalidateRect(ITextHost2 *iface, const RECT *rect, BOOL mode)
Definition: txthost.c:251
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetWindow(ITextHost2 *iface, HWND *hwnd)
Definition: txthost.c:557
static HRESULT get_lineA(ITextServices *text_srv, WPARAM wparam, LPARAM lparam, LRESULT *res)
Definition: txthost.c:892
DECLSPEC_HIDDEN void __thiscall ITextHostImpl_TxSetCursor(ITextHost2 *iface, HCURSOR cursor, BOOL text)
Definition: txthost.c:324
static const char *const richedit_messages[]
Definition: txthost.c:837
static LRESULT WINAPI REComboWndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: txthost.c:1547
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxActivate(ITextHost2 *iface, LONG *old_state)
Definition: txthost.c:344
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
Definition: txthost.c:1654
static ULONG WINAPI ITextHostImpl_AddRef(ITextHost2 *iface)
Definition: txthost.c:151
LRESULT WINAPI REExtendedRegisterClass(void)
Definition: txthost.c:1569
LRESULT WINAPI RichEdit10ANSIWndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: txthost.c:1535
DECLSPEC_HIDDEN HCURSOR __thiscall ITextHostImpl_TxSetCursor2(ITextHost2 *iface, HCURSOR cursor, BOOL text)
Definition: txthost.c:583
static HRESULT set_options(struct host *host, DWORD op, DWORD value, LRESULT *res)
Definition: txthost.c:951
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_OnTxCharFormatChange(ITextHost2 *iface, const CHARFORMATW *pcf)
Definition: txthost.c:450
static LRESULT RichEditWndProc_common(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, BOOL unicode)
Definition: txthost.c:1082
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxNotify(ITextHost2 *iface, DWORD iNotify, void *pv)
Definition: txthost.c:471
struct host * host_create(HWND hwnd, CREATESTRUCTW *cs, BOOL emulate_10)
Definition: txthost.c:96
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetEastAsianFlags(ITextHost2 *iface, LONG *flags)
Definition: txthost.c:577
static struct host * impl_from_ITextHost(ITextHost2 *iface)
Definition: txthost.c:131
static BOOL listbox_registered
Definition: txthost.c:60
static LRESULT WINAPI RichEditWndProcW(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: txthost.c:1508
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetSelectionBarWidth(ITextHost2 *iface, LONG *width)
Definition: txthost.c:542
DECLSPEC_HIDDEN void __thiscall ITextHostImpl_TxViewChange(ITextHost2 *iface, BOOL update)
Definition: txthost.c:258
DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxClientToScreen(ITextHost2 *iface, POINT *pt)
Definition: txthost.c:337
DECLSPEC_HIDDEN HIMC __thiscall ITextHostImpl_TxImmGetContext(ITextHost2 *iface)
Definition: txthost.c:528
static LRESULT send_msg_filter(struct host *host, UINT msg, WPARAM *wparam, LPARAM *lparam)
Definition: txthost.c:1062
DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxCreateCaret(ITextHost2 *iface, HBITMAP bitmap, INT width, INT height)
Definition: txthost.c:265
DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxSetTimer(ITextHost2 *iface, UINT id, UINT timeout)
Definition: txthost.c:286
DECLSPEC_HIDDEN INT __thiscall ITextHostImpl_TxReleaseDC(ITextHost2 *iface, HDC hdc)
Definition: txthost.c:180
static BOOL handle_dialog_enter(struct host *host)
Definition: txthost.c:1038
static HRESULT WINAPI ITextHostImpl_QueryInterface(ITextHost2 *iface, REFIID iid, void **obj)
Definition: txthost.c:136
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetMaxLength(ITextHost2 *iface, DWORD *length)
Definition: txthost.c:412
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetAcceleratorPos(ITextHost2 *iface, LONG *pos)
Definition: txthost.c:437
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetParaFormat(ITextHost2 *iface, const PARAFORMAT **fmt)
Definition: txthost.c:388
static LRESULT WINAPI REListWndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: txthost.c:1555
DECLSPEC_HIDDEN void __thiscall ITextHostImpl_TxSetFocus(ITextHost2 *iface)
Definition: txthost.c:317
LRESULT WINAPI RichEditANSIWndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: txthost.c:1527
DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxShowScrollBar(ITextHost2 *iface, INT bar, BOOL show)
Definition: txthost.c:187
static BOOL combobox_registered
Definition: txthost.c:61
DECLSPEC_HIDDEN COLORREF __thiscall ITextHostImpl_TxGetSysColor(ITextHost2 *iface, int index)
Definition: txthost.c:396
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetHorzExtent(ITextHost2 *iface, LONG *horz_extent)
Definition: txthost.c:619
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetEditStyle(ITextHost2 *iface, DWORD item, DWORD *data)
Definition: txthost.c:595
DECLSPEC_HIDDEN HPALETTE __thiscall ITextHostImpl_TxGetPalette(ITextHost2 *iface)
Definition: txthost.c:571
static HRESULT get_text_rangeA(struct host *host, TEXTRANGEA *rangeA, LRESULT *res)
Definition: txthost.c:918
DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxShowCaret(ITextHost2 *iface, BOOL show)
Definition: txthost.c:272
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetClientRect(ITextHost2 *iface, RECT *rect)
Definition: txthost.c:359
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxDestroyCaret(ITextHost2 *iface)
Definition: txthost.c:613
DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxIsDoubleClickPending(ITextHost2 *iface)
Definition: txthost.c:551
DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxScreenToClient(ITextHost2 *iface, POINT *pt)
Definition: txthost.c:330
DECLSPEC_HIDDEN HDC __thiscall ITextHostImpl_TxGetDC(ITextHost2 *iface)
Definition: txthost.c:173
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetPasswordChar(ITextHost2 *iface, WCHAR *c)
Definition: txthost.c:428
static const char * get_msg_name(UINT msg)
Definition: txthost.c:861
static const char *const edit_messages[]
Definition: txthost.c:822
DECLSPEC_HIDDEN void __thiscall ITextHostImpl_TxScrollWindowEx(ITextHost2 *iface, INT dx, INT dy, const RECT *scroll, const RECT *clip, HRGN update_rgn, RECT *update_rect, UINT flags)
Definition: txthost.c:300
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxSetForegroundWindow(ITextHost2 *iface)
Definition: txthost.c:565
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetViewInset(ITextHost2 *iface, RECT *rect)
Definition: txthost.c:375
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxShowDropCaret(ITextHost2 *iface, BOOL show, HDC hdc, const RECT *rect)
Definition: txthost.c:607
DECLSPEC_HIDDEN void __thiscall ITextHostImpl_TxFreeTextServicesNotification(ITextHost2 *iface)
Definition: txthost.c:589
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetCharFormat(ITextHost2 *iface, const CHARFORMATW **ppCF)
Definition: txthost.c:382
DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxEnableScrollBar(ITextHost2 *iface, INT bar, INT arrows)
Definition: txthost.c:194
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetScrollBars(ITextHost2 *iface, DWORD *scrollbars)
Definition: txthost.c:419
DECLSPEC_HIDDEN void __thiscall ITextHostImpl_TxSetCapture(ITextHost2 *iface, BOOL capture)
Definition: txthost.c:309
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_OnTxParaFormatChange(ITextHost2 *iface, const PARAFORMAT *ppf)
Definition: txthost.c:456
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxDeactivate(ITextHost2 *iface, LONG new_state)
Definition: txthost.c:352
DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxSetScrollRange(ITextHost2 *iface, INT bar, LONG min_pos, INT max_pos, BOOL redraw)
Definition: txthost.c:201
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetPropertyBits(ITextHost2 *iface, DWORD mask, DWORD *bits)
Definition: txthost.c:462
DECLSPEC_HIDDEN void __thiscall ITextHostImpl_TxKillTimer(ITextHost2 *iface, UINT id)
Definition: txthost.c:293
static void host_init_props(struct host *host)
Definition: txthost.c:63
int32_t INT
Definition: typedefs.h:58
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
#define HIWORD(l)
Definition: typedefs.h:247
Definition: pdh_main.c:96
int ret
#define STDCALL
Definition: wdf.h:45
int codepage
Definition: win_iconv.c:156
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
_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
DWORD COLORREF
Definition: windef.h:300
HICON HCURSOR
Definition: windef.h:299
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define E_NOINTERFACE
Definition: winerror.h:2364
HGDIOBJ WINAPI GetStockObject(_In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1546
#define PATCOPY
Definition: wingdi.h:335
#define NULL_BRUSH
Definition: wingdi.h:901
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
#define WM_PAINT
Definition: winuser.h:1631
HWND WINAPI SetCapture(_In_ HWND hWnd)
#define EM_SETREADONLY
Definition: winuser.h:2026
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define WM_ERASEBKGND
Definition: winuser.h:1636
#define CS_VREDRAW
Definition: winuser.h:666
DWORD WINAPI GetSysColor(_In_ int)
#define MAKEWPARAM(l, h)
Definition: winuser.h:4020
#define WM_GETTEXTLENGTH
Definition: winuser.h:1630
#define EM_GETRECT
Definition: winuser.h:2007
#define WM_CLOSE
Definition: winuser.h:1632
#define GetWindowLongPtrW
Definition: winuser.h:4840
BOOL WINAPI ShowCaret(_In_opt_ HWND)
#define VK_TAB
Definition: winuser.h:2210
#define WM_MOUSEFIRST
Definition: winuser.h:1785
#define WM_HSCROLL
Definition: winuser.h:1754
#define EN_KILLFOCUS
Definition: winuser.h:2036
#define COLOR_WINDOW
Definition: winuser.h:929
#define WM_MOUSELAST
Definition: winuser.h:1812
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2890
#define EM_GETPASSWORDCHAR
Definition: winuser.h:2006
BOOL WINAPI UnregisterClassA(_In_ LPCSTR, HINSTANCE)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_VSCROLL
Definition: winuser.h:1755
#define SIF_RANGE
Definition: winuser.h:1246
#define WM_CREATE
Definition: winuser.h:1619
#define DLGC_WANTCHARS
Definition: winuser.h:2629
#define DLGC_WANTTAB
Definition: winuser.h:2622
#define EM_GETSEL
Definition: winuser.h:2008
#define EN_SETFOCUS
Definition: winuser.h:2038
#define EM_SETPASSWORDCHAR
Definition: winuser.h:2025
#define EN_UPDATE
Definition: winuser.h:2039
#define SB_VERT
Definition: winuser.h:553
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
#define WM_COMMAND
Definition: winuser.h:1751
#define CS_HREDRAW
Definition: winuser.h:661
#define EM_REPLACESEL
Definition: winuser.h:2017
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
#define IDC_ARROW
Definition: winuser.h:695
#define WM_KEYFIRST
Definition: winuser.h:1725
#define VK_CONTROL
Definition: winuser.h:2214
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:3032
#define EM_SETRECT
Definition: winuser.h:2027
#define DC_HASDEFID
Definition: winuser.h:2620
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define SIF_PAGE
Definition: winuser.h:1244
#define WM_GETTEXT
Definition: winuser.h:1629
#define CS_DBLCLKS
Definition: winuser.h:659
#define EN_MAXTEXT
Definition: winuser.h:2037
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2442
#define EN_HSCROLL
Definition: winuser.h:2035
int WINAPI SetScrollPos(_In_ HWND, _In_ int, _In_ int, _In_ BOOL)
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define WM_NEXTDLGCTL
Definition: winuser.h:1654
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define WM_NCCREATE
Definition: winuser.h:1694
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
#define WM_SETTEXT
Definition: winuser.h:1628
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
#define VK_RETURN
Definition: winuser.h:2212
#define EM_GETLINE
Definition: winuser.h:2002
#define EM_SETRECTNP
Definition: winuser.h:2028
HWND WINAPI SetFocus(_In_opt_ HWND)
HWND WINAPI SetActiveWindow(_In_ HWND)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
#define DLGC_WANTARROWS
Definition: winuser.h:2621
#define SIF_DISABLENOSCROLL
Definition: winuser.h:1247
BOOL WINAPI IntersectRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
BOOL WINAPI UpdateWindow(_In_ HWND)
#define IDC_IBEAM
Definition: winuser.h:696
#define SB_BOTH
Definition: winuser.h:555
HDC WINAPI GetDC(_In_opt_ HWND)
#define WM_CHAR
Definition: winuser.h:1728
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)
#define CS_GLOBALCLASS
Definition: winuser.h:660
#define EN_VSCROLL
Definition: winuser.h:2040
#define GWLP_ID
Definition: winuser.h:871
#define WM_SETCURSOR
Definition: winuser.h:1647
#define VK_SHIFT
Definition: winuser.h:2213
#define DLGC_WANTMESSAGE
Definition: winuser.h:2624
int WINAPI SetScrollInfo(_In_ HWND, _In_ int, _In_ LPCSCROLLINFO, _In_ BOOL)
#define WM_DESTROY
Definition: winuser.h:1620
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
BOOL WINAPI ShowScrollBar(_In_ HWND, _In_ int, _In_ BOOL)
#define WM_KEYDOWN
Definition: winuser.h:1726
BOOL WINAPI SetCaretPos(_In_ int, _In_ int)
BOOL WINAPI CreateCaret(_In_ HWND, _In_opt_ HBITMAP, _In_ int, _In_ int)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define DM_GETDEFID
Definition: winuser.h:2109
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define SetWindowLongPtrW
Definition: winuser.h:5366
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
#define EN_ERRSPACE
Definition: winuser.h:2034
#define GWL_STYLE
Definition: winuser.h:863
#define CS_PARENTDC
Definition: winuser.h:664
BOOL WINAPI GetUpdateRect(_In_ HWND, _Out_opt_ LPRECT, _In_ BOOL)
#define WM_KEYLAST
Definition: winuser.h:1739
#define VK_ESCAPE
Definition: winuser.h:2225
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1673
#define DLGC_HASSETSEL
Definition: winuser.h:2625
BOOL WINAPI IsWindowVisible(_In_ HWND)
int WINAPI ScrollWindowEx(_In_ HWND, _In_ int, _In_ int, _In_opt_ LPCRECT, _In_opt_ LPCRECT, _In_opt_ HRGN, _Out_opt_ LPRECT, _In_ UINT)
BOOL WINAPI EnableScrollBar(_In_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI HideCaret(_In_opt_ HWND)
#define WM_GETDLGCODE
Definition: winuser.h:1700
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define SB_HORZ
Definition: winuser.h:552
SHORT WINAPI GetKeyState(_In_ int)
#define GWL_EXSTYLE
Definition: winuser.h:862
#define EN_CHANGE
Definition: winuser.h:2033
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
char CHAR
Definition: xmlstorage.h:175
#define const
Definition: zconf.h:233