51#if defined(__i386__) && !defined(__MINGW32__)
52static ITextServicesVtbl itextServicesStdcallVtbl;
53#define TXTSERV_VTABLE(This) (&itextServicesStdcallVtbl)
55#define TXTSERV_VTABLE(This) (This)->lpVtbl
58#define ITextServices_TxSendMessage(This,a,b,c,d) TXTSERV_VTABLE(This)->TxSendMessage(This,a,b,c,d)
59#define ITextServices_TxDraw(This,a,b,c,d,e,f,g,h,i,j,k,l) TXTSERV_VTABLE(This)->TxDraw(This,a,b,c,d,e,f,g,h,i,j,k,l)
60#define ITextServices_TxGetHScroll(This,a,b,c,d,e) TXTSERV_VTABLE(This)->TxGetHScroll(This,a,b,c,d,e)
61#define ITextServices_TxGetVScroll(This,a,b,c,d,e) TXTSERV_VTABLE(This)->TxGetVScroll(This,a,b,c,d,e)
62#define ITextServices_OnTxSetCursor(This,a,b,c,d,e,f,g,h,i) TXTSERV_VTABLE(This)->OnTxSetCursor(This,a,b,c,d,e,f,g,h,i)
63#define ITextServices_TxQueryHitPoint(This,a,b,c,d,e,f,g,h,i,j) TXTSERV_VTABLE(This)->TxQueryHitPoint(This,a,b,c,d,e,f,g,h,i,j)
64#define ITextServices_OnTxInplaceActivate(This,a) TXTSERV_VTABLE(This)->OnTxInplaceActivate(This,a)
65#define ITextServices_OnTxInplaceDeactivate(This) TXTSERV_VTABLE(This)->OnTxInplaceDeactivate(This)
66#define ITextServices_OnTxUIActivate(This) TXTSERV_VTABLE(This)->OnTxUIActivate(This)
67#define ITextServices_OnTxUIDeactivate(This) TXTSERV_VTABLE(This)->OnTxUIDeactivate(This)
68#define ITextServices_TxGetText(This,a) TXTSERV_VTABLE(This)->TxGetText(This,a)
69#define ITextServices_TxSetText(This,a) TXTSERV_VTABLE(This)->TxSetText(This,a)
70#define ITextServices_TxGetCurTargetX(This,a) TXTSERV_VTABLE(This)->TxGetCurTargetX(This,a)
71#define ITextServices_TxGetBaseLinePos(This,a) TXTSERV_VTABLE(This)->TxGetBaseLinePos(This,a)
72#define ITextServices_TxGetNaturalSize(This,a,b,c,d,e,f,g,h) TXTSERV_VTABLE(This)->TxGetNaturalSize(This,a,b,c,d,e,f,g,h)
73#define ITextServices_TxGetDropTarget(This,a) TXTSERV_VTABLE(This)->TxGetDropTarget(This,a)
74#define ITextServices_OnTxPropertyBitsChange(This,a,b) TXTSERV_VTABLE(This)->OnTxPropertyBitsChange(This,a,b)
75#define ITextServices_TxGetCachedSize(This,a,b) TXTSERV_VTABLE(This)->TxGetCachedSize(This,a,b)
79#define TRACECALL if(winetest_debug > 1) trace
104 ITextHost_AddRef((ITextHost *)*
ppvObject);
149 TRACECALL(
"Call to TxShowScrollBar(%p, fnBar=%d, fShow=%d)\n",
157 TRACECALL(
"Call to TxEnableScrollBar(%p, fuSBFlags=%d, fuArrowflags=%d)\n",
158 This, fuSBFlags, fuArrowflags);
166 TRACECALL(
"Call to TxSetScrollRange(%p, fnBar=%d, nMinPos=%d, nMaxPos=%d, fRedraw=%d)\n",
167 This, fnBar, nMinPos, nMaxPos, fRedraw);
174 TRACECALL(
"Call to TxSetScrollPos(%p, fnBar=%d, nPos=%d, fRedraw=%d)\n",
175 This, fnBar, nPos, fRedraw);
182 TRACECALL(
"Call to TxInvalidateRect(%p, prc=%p, fMode=%d)\n",
189 TRACECALL(
"Call to TxViewChange(%p, fUpdate=%d)\n",
196 TRACECALL(
"Call to TxCreateCaret(%p, nbmp=%p, xWidth=%d, yHeight=%d)\n",
204 TRACECALL(
"Call to TxShowCaret(%p, fShow=%d)\n",
219 TRACECALL(
"Call to TxSetTimer(%p, idTimer=%u, uTimeout=%u)\n",
220 This, idTimer, uTimeout);
227 TRACECALL(
"Call to TxKillTimer(%p, idTimer=%u)\n",
This, idTimer);
235 TRACECALL(
"Call to TxScrollWindowEx(%p, %d, %d, %p, %p, %p, %p, %d)\n",
236 This,
dx,
dy, lprcScroll, lprcClip, hRgnUpdate, lprcUpdate, fuScroll);
242 TRACECALL(
"Call to TxSetCapture(%p, fCapture=%d)\n",
This, fCapture);
254 TRACECALL(
"Call to TxSetCursor(%p, hcur=%p, fText=%d)\n",
261 TRACECALL(
"Call to TxScreenToClient(%p, lppt=%p)\n",
This, lppt);
268 TRACECALL(
"Call to TxClientToScreen(%p, lppt=%p)\n",
This, lppt);
275 TRACECALL(
"Call to TxActivate(%p, plOldState=%p)\n",
This, plOldState);
282 TRACECALL(
"Call to TxDeactivate(%p, lNewState=%d)\n",
This, lNewState);
303 TRACECALL(
"Call to TxGetCharFormat(%p, ppCF=%p)\n",
This, ppCF);
311 TRACECALL(
"Call to TxGetParaFormat(%p, ppPF=%p)\n",
This, ppPF);
318 TRACECALL(
"Call to TxGetSysColor(%p, nIndex=%d)\n",
This, nIndex);
325 TRACECALL(
"Call to TxGetBackStyle(%p, pStyle=%p)\n",
This, pStyle);
332 TRACECALL(
"Call to TxGetMaxLength(%p, pLength=%p)\n",
This, pLength);
339 TRACECALL(
"Call to TxGetScrollBars(%p, pdwScrollBar=%p)\n",
361 TRACECALL(
"Call to TxGetExtent(%p, lpExtent=%p)\n",
This, lpExtent);
368 TRACECALL(
"Call to OnTxCharFormatChange(%p, pcf=%p)\n",
This, pcf);
375 TRACECALL(
"Call to OnTxParaFormatChange(%p, ppf=%p)\n",
This, ppf);
384 TRACECALL(
"Call to TxGetPropertyBits(%p, dwMask=0x%08x, pdwBits=%p)\n",
385 This, dwMask, pdwBits);
393 TRACECALL(
"Call to TxNotify(%p, iNotify=%d, pv=%p)\n",
This, iNotify, pv);
407 TRACECALL(
"Call to TxImmReleaseContext(%p, himc=%p)\n",
This, himc);
416 TRACECALL(
"Call to TxGetSelectionBarWidth(%p, lSelBarWidth=%p)\n",
495#if defined(__i386__) && !defined(__MINGW32__)
502 (
sizeof(ITextHostVtbl)/
sizeof(
void*) - 3)
504 +(
sizeof(ITextServicesVtbl)/
sizeof(
void*) - 3)
523 while (pVtable != pVtableEnd) {
525 thunk->pop_eax = 0x58;
526 thunk->push_ecx = 0x51;
527 thunk->push_eax = 0x50;
528 thunk->jmp_func = 0xe9;
530 thunk->func = (
char*)*pVtable - (
char*)(&
thunk->func + 1);
542 pVtable = (
void**)&itextServicesStdcallVtbl + 3;
543 pVtableEnd = (
void**)(&itextServicesStdcallVtbl + 1);
544 while (pVtable != pVtableEnd) {
588 if (dummyTextHost ==
NULL) {
589 win_skip(
"Insufficient memory to create ITextHost interface\n");
607 win_skip(
"CreateTextServices failed.\n");
612 ok((
result ==
S_OK) && (*txtserv !=
NULL),
"Querying interface failed (result = %x, txtserv = %p)\n",
result, *txtserv);
613 IUnknown_Release(
init);
616 win_skip(
"Could not retrieve ITextServices interface\n");
626 ITextServices *txtserv;
635 ok(
hres ==
S_OK,
"ITextServices_TxGetText failed (result = %x)\n",
hres);
638 ITextServices_Release(txtserv);
639 ITextHost_Release(
host);
644 ITextServices *txtserv;
648 WCHAR settext[] = {
'T',
'e',
's',
't',0};
654 ok(
hres ==
S_OK,
"ITextServices_TxSetText failed (result = %x)\n",
hres);
657 ok(
hres ==
S_OK,
"ITextServices_TxGetText failed (result = %x)\n",
hres);
660 "String returned of wrong length (expected 4, got %d)\n",
SysStringLen(rettext));
662 "String returned differs\n");
669 ok(
hres ==
S_OK,
"ITextServices_TxSetText failed (result = %x)\n",
hres);
672 ok(
hres ==
S_OK,
"ITextServices_TxGetText failed (result = %x)\n",
hres);
674 "String returned of wrong length (expected 0, got %d)\n",
SysStringLen(rettext));
677 ITextServices_Release(txtserv);
678 ITextHost_Release(
host);
681#define CHECK_TXGETNATURALSIZE(res,width,height,hdc,rect,string) \
682 _check_txgetnaturalsize(res, width, height, hdc, rect, string, __LINE__)
686 LONG expected_width, expected_height;
691 ok_(__FILE__,
line)(
res ==
S_OK,
"ITextServices_TxGetNaturalSize failed: 0x%08x.\n",
res);
693 "got wrong width: %d, expected: %d {+1}.\n",
width, expected_width);
694 ok_(__FILE__,
line)(
height == expected_height,
"got wrong height: %d, expected: %d.\n",
700 ITextServices *txtserv;
704 static const WCHAR test_text[] = {
'T',
'e',
's',
't',
'S',
'o',
'm',
'e',
'T',
'e',
'x',
't',0};
717 0, 0, 100, 100, 0, 0, 0,
NULL);
723 cf.cbSize =
sizeof(
cf);
743 ITextServices_Release(txtserv);
744 ITextHost_Release(
host);
749 ITextServices *txtserv;
752 DWORD dwAspect = DVASPECT_CONTENT;
754 DVTARGETDEVICE *ptd =
NULL;
755 void *pvAspect =
NULL;
770 ITextServices_Release(txtserv);
771 ITextHost_Release(
host);
774DEFINE_GUID(expected_iid_itextservices, 0x8d33f740, 0xcf58, 0x11ce, 0xa8, 0x9d, 0x00, 0xaa, 0x00, 0x6c, 0xad, 0xc5);
775DEFINE_GUID(expected_iid_itexthost, 0x13e670f4,0x1a5a,0x11cf,0xab,0xeb,0x00,0xaa,0x00,0xb6,0x5e,0xa1);
776DEFINE_GUID(expected_iid_itexthost2, 0x13e670f5,0x1a5a,0x11cf,0xab,0xeb,0x00,0xaa,0x00,0xb6,0x5e,0xa1);
804 return IUnknown_QueryInterface(
This->inner_unk,
riid,
ppv);
832 ITextServices *textsrv;
839 ok(
hr ==
S_OK,
"CreateTextServices failed: %08x\n",
hr);
841 ok(
hr ==
S_OK,
"QueryInterface for IID_ITextServices failed: %08x\n",
hr);
842 refcount = ITextServices_AddRef(textsrv);
843 ok(refcount == unk_obj.
ref,
"CreateTextServices just pretends to support COM aggregation\n");
844 refcount = ITextServices_Release(textsrv);
845 ok(refcount == unk_obj.
ref,
"CreateTextServices just pretends to support COM aggregation\n");
846 refcount = ITextServices_Release(textsrv);
847 ok(refcount == 19,
"Refcount should be back at 19 but is %u\n", refcount);
854 IUnknown_AddRef(iface);
855 return IUnknown_Release(iface);
860 ITextServices *txtserv;
872 ok(refcount == 1,
"got wrong ref count: %d\n", refcount);
875 hres = ITextServices_QueryInterface(txtserv, &IID_IRichEditOle, (
void **)&txtsrv_reole);
878 ok(refcount == 2,
"got wrong ref count: %d\n", refcount);
880 ok(refcount == 2,
"got wrong ref count: %d\n", refcount);
882 hres = IRichEditOle_QueryInterface(txtsrv_reole, &IID_ITextDocument, (
void **)&txtdoc);
885 ok(refcount == 3,
"got wrong ref count: %d\n", refcount);
887 ok(refcount == 3,
"got wrong ref count: %d\n", refcount);
889 ITextDocument_Release(txtdoc);
891 ok(refcount == 2,
"got wrong ref count: %d\n", refcount);
893 hres = IRichEditOle_QueryInterface(txtsrv_reole, &IID_ITextDocument2Old, (
void **)&txtdoc2old);
896 ok(refcount == 3,
"got wrong ref count: %d\n", refcount);
898 ok(refcount == 3,
"got wrong ref count: %d\n", refcount);
900 ITextDocument2Old_Release(txtdoc2old);
902 ok(refcount == 2,
"got wrong ref count: %d\n", refcount);
903 IRichEditOle_Release(txtsrv_reole);
905 ok(refcount == 1,
"got wrong ref count: %d\n", refcount);
908 hres = ITextServices_QueryInterface(txtserv, &IID_ITextDocument, (
void **)&txtsrv_txtdoc);
911 ok(refcount == 2,
"got wrong ref count: %d\n", refcount);
913 ok(refcount == 2,
"got wrong ref count: %d\n", refcount);
915 hres = ITextDocument_QueryInterface(txtsrv_txtdoc, &IID_IRichEditOle, (
void **)&reole);
918 ok(refcount == 3,
"got wrong ref count: %d\n", refcount);
920 ok(refcount == 3,
"got wrong ref count: %d\n", refcount);
922 IRichEditOle_Release(reole);
924 ok(refcount == 2,
"got wrong ref count: %d\n", refcount);
925 ITextDocument_Release(txtsrv_txtdoc);
927 ok(refcount == 1,
"got wrong ref count: %d\n", refcount);
930 hres = ITextServices_QueryInterface(txtserv, &IID_ITextDocument2Old, (
void **)&txtsrv_txtdoc2old);
933 ok(refcount == 2,
"got wrong ref count: %d\n", refcount);
935 ok(refcount == 2,
"got wrong ref count: %d\n", refcount);
937 hres = ITextDocument2Old_QueryInterface(txtsrv_txtdoc2old, &IID_IRichEditOle, (
void **)&reole);
938 ok(
hres ==
S_OK,
"ITextDocument2Old_QueryInterface: 0x%08x\n",
hres);
940 ok(refcount == 3,
"got wrong ref count: %d\n", refcount);
942 ok(refcount == 3,
"got wrong ref count: %d\n", refcount);
944 IRichEditOle_Release(reole);
946 ok(refcount == 2,
"got wrong ref count: %d\n", refcount);
947 ITextDocument2Old_Release(txtsrv_txtdoc2old);
949 ok(refcount == 1,
"got wrong ref count: %d\n", refcount);
951 ITextServices_Release(txtserv);
952 ITextHost_Release(
host);
957 ITextServices *txtserv;
963 DWORD expected_effects;
976 ok(host_cf->
dwEffects == expected_effects,
"got wrong dwEffects: %x, expected %x.\n", cf2.
dwEffects, expected_effects);
981 ITextServices_Release(txtserv);
982 ITextHost_Release(
host);
987 ITextServices *txtserv;
995 ok(
ret ==
S_OK,
"ITextSerHices_GetVScroll failed: 0x%08x.\n",
ret);
998 ok(
ret ==
S_OK,
"ITextServices_GetVScroll failed: 0x%08x.\n",
ret);
1000 ITextServices_Release(txtserv);
1001 ITextHost_Release(
host);
1006 ITextServices *txtserv;
1026 ITextServices_Release(txtserv);
1027 ITextHost_Release(
host);
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define InterlockedIncrement
#define InterlockedDecrement
#define GetProcAddress(x, y)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
static ITextServicesImpl * impl_from_IUnknown(IUnknown *iface)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
VOID WINAPI CoTaskMemFree(LPVOID ptr)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static IID * pIID_ITextServices
#define ITextServices_TxSetText(This, a)
#define ITextServices_TxDraw(This, a, b, c, d, e, f, g, h, i, j, k, l)
static HRESULT __thiscall ITextHostImpl_TxGetMaxLength(ITextHost *iface, DWORD *pLength)
static HRESULT __thiscall ITextHostImpl_TxGetViewInset(ITextHost *iface, LPRECT prc)
static HRESULT __thiscall ITextHostImpl_OnTxCharFormatChange(ITextHost *iface, const CHARFORMATW *pcf)
#define CHECK_TXGETNATURALSIZE(res, width, height, hdc, rect, string)
static COLORREF __thiscall ITextHostImpl_TxGetSysColor(ITextHost *iface, int nIndex)
static void test_TxGetNaturalSize(void)
static INT __thiscall ITextHostImpl_TxReleaseDC(ITextHost *iface, HDC hdc)
static BOOL __thiscall ITextHostImpl_TxScreenToClient(ITextHost *iface, LPPOINT lppt)
static HRESULT __thiscall ITextHostImpl_TxGetExtent(ITextHost *iface, LPSIZEL lpExtent)
static IID * pIID_ITextHost
static HRESULT __thiscall ITextHostImpl_TxGetPropertyBits(ITextHost *iface, DWORD dwMask, DWORD *pdwBits)
static HRESULT __thiscall ITextHostImpl_TxGetPasswordChar(ITextHost *iface, WCHAR *pch)
static HMODULE hmoduleRichEdit
static HRESULT __thiscall ITextHostImpl_TxDeactivate(ITextHost *iface, LONG lNewState)
static HRESULT __thiscall ITextHostImpl_TxActivate(ITextHost *iface, LONG *plOldState)
static BOOL __thiscall ITextHostImpl_TxShowScrollBar(ITextHost *iface, INT fnBar, BOOL fShow)
static void __thiscall ITextHostImpl_TxSetCapture(ITextHost *iface, BOOL fCapture)
static BOOL init_texthost(ITextServices **txtserv, ITextHost **ret)
static BOOL __thiscall ITextHostImpl_TxClientToScreen(ITextHost *iface, LPPOINT lppt)
static HIMC __thiscall ITextHostImpl_TxImmGetContext(ITextHost *iface)
static BOOL __thiscall ITextHostImpl_TxCreateCaret(ITextHost *iface, HBITMAP hbmp, INT xWidth, INT yHeight)
static BOOL __thiscall ITextHostImpl_TxSetScrollPos(ITextHost *iface, INT fnBar, INT nPos, BOOL fRedraw)
static HRESULT __thiscall ITextHostImpl_TxGetBackStyle(ITextHost *iface, TXTBACKSTYLE *pStyle)
#define ITextServices_TxSendMessage(This, a, b, c, d)
static ULONG WINAPI unk_Release(IUnknown *iface)
static ULONG WINAPI ITextHostImpl_Release(ITextHost *iface)
static void test_TxSetText(void)
static HRESULT WINAPI unk_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
static HRESULT __thiscall ITextHostImpl_TxGetAcceleratorPos(ITextHost *iface, LONG *pch)
static void setup_thiscall_wrappers(void)
static HDC __thiscall ITextHostImpl_TxGetDC(ITextHost *iface)
static BOOL __thiscall ITextHostImpl_TxSetTimer(ITextHost *iface, UINT idTimer, UINT uTimeout)
static HRESULT __thiscall ITextHostImpl_TxGetParaFormat(ITextHost *iface, const PARAFORMAT **ppPF)
static void test_QueryInterface(void)
static void __thiscall ITextHostImpl_TxImmReleaseContext(ITextHost *iface, HIMC himc)
static void __thiscall ITextHostImpl_TxKillTimer(ITextHost *iface, UINT idTimer)
static void test_TxGetText(void)
static void test_TxDraw(void)
static HRESULT __thiscall ITextHostImpl_TxGetSelectionBarWidth(ITextHost *iface, LONG *lSelBarWidth)
#define ITextServices_TxGetHScroll(This, a, b, c, d, e)
static void hf_to_cf(HFONT hf, CHARFORMAT2W *cf)
static ITextHostTestImpl * impl_from_ITextHost(ITextHost *iface)
static ULONG WINAPI unk_AddRef(IUnknown *iface)
static BOOL __thiscall ITextHostImpl_TxEnableScrollBar(ITextHost *iface, INT fuSBFlags, INT fuArrowflags)
static BOOL __thiscall ITextHostImpl_TxSetCaretPos(ITextHost *iface, INT x, INT y)
static void test_TxGetScroll(void)
static HRESULT __thiscall ITextHostImpl_TxGetCharFormat(ITextHost *iface, const CHARFORMATW **ppCF)
static HRESULT __thiscall ITextHostImpl_TxGetClientRect(ITextHost *iface, LPRECT prc)
static const IUnknownVtbl unk_vtbl
static HRESULT __thiscall ITextHostImpl_OnTxParaFormatChange(ITextHost *iface, const PARAFORMAT *ppf)
static BOOL __thiscall ITextHostImpl_TxSetScrollRange(ITextHost *iface, INT fnBar, LONG nMinPos, INT nMaxPos, BOOL fRedraw)
static HRESULT WINAPI ITextHostImpl_QueryInterface(ITextHost *iface, REFIID riid, LPVOID *ppvObject)
static void * wrapperCodeMem
static ULONG WINAPI ITextHostImpl_AddRef(ITextHost *iface)
static void __thiscall ITextHostImpl_TxSetCursor(ITextHost *iface, HCURSOR hcur, BOOL fText)
static void __thiscall ITextHostImpl_TxInvalidateRect(ITextHost *iface, LPCRECT prc, BOOL fMode)
#define ITextServices_TxGetVScroll(This, a, b, c, d, e)
static BOOL __thiscall ITextHostImpl_TxShowCaret(ITextHost *iface, BOOL fShow)
static void __thiscall ITextHostImpl_TxScrollWindowEx(ITextHost *iface, INT dx, INT dy, LPCRECT lprcScroll, LPCRECT lprcClip, HRGN hRgnUpdate, LPRECT lprcUpdate, UINT fuScroll)
static void test_default_format(void)
static void __thiscall ITextHostImpl_TxViewChange(ITextHost *iface, BOOL fUpdate)
static void _check_txgetnaturalsize(HRESULT res, LONG width, LONG height, HDC hdc, RECT rect, LPCWSTR string, int line)
static PCreateTextServices pCreateTextServices
static void __thiscall ITextHostImpl_TxSetFocus(ITextHost *iface)
static HRESULT __thiscall ITextHostImpl_TxNotify(ITextHost *iface, DWORD iNotify, void *pv)
static IID * pIID_ITextHost2
static ITextHostVtbl itextHostVtbl
static void test_IIDs(void)
#define ITextServices_TxGetText(This, a)
static void test_COM(void)
#define ITextServices_TxGetNaturalSize(This, a, b, c, d, e, f, g, h)
static HRESULT __thiscall ITextHostImpl_TxGetScrollBars(ITextHost *iface, DWORD *pdwScrollBar)
static ULONG get_refcount(IUnknown *iface)
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
#define PAGE_EXECUTE_READWRITE
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
UINT WINAPI SysStringByteLen(BSTR str)
UINT WINAPI SysStringLen(BSTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#define IsEqualIID(riid1, riid2)
#define CFE_AUTOBACKCOLOR
struct _charformat2w CHARFORMAT2W
static __inline const char * wine_dbgstr_guid(const GUID *id)
ITextHost ITextHost_iface
WCHAR lfFaceName[LF_FACESIZE]
enum _TXTBACKSTYLE TXTBACKSTYLE
HRESULT(WINAPI * PCreateTextServices)(IUnknown *, ITextHost *, IUnknown **)
#define CONTAINING_RECORD(address, type, field)
LPVOID NTAPI VirtualAlloc(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flAllocationType, IN DWORD flProtect)
BOOL NTAPI VirtualFree(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD dwFreeType)
static RECT expected_rect
DWORD WINAPI GetLastError(void)
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
int WINAPI SetMapMode(_In_ HDC, _In_ int)
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI DestroyWindow(_In_ HWND)