24#define ok_wstri(x, y) \
25 ok(lstrcmpiW(x, y) == 0, "Wrong string. Expected '%S', got '%S'\n", y, x)
46 trace(
"CEnumString::CEnumString(%p)\n",
this);
51 trace(
"CEnumString::~CEnumString(%p)\n",
this);
70 trace(
"IID_IEnumString\n");
75 if (iid == IID_IACList || iid == IID_IACList2)
77 trace(
"IID_IACList2\n");
79 *
ppv =
static_cast<IACList2 *
>(
this);
108 if (celt != 1 || !rgelt || !pceltFetched)
122 trace(
"CEnumString::Skip(%lu)\n", celt);
127 trace(
"CEnumString::Reset\n");
134 trace(
"CEnumString::Clone()\n");
140 trace(
"CEnumString::Expand(%S)\n", pszExpand);
147 trace(
"CEnumString::GetOption(%p)\n", pdwFlag);
152 trace(
"CEnumString::SetOption(0x%lX)\n", dwFlag);
186 static const RANGE s_ranges[] =
188 { 0x0009, 0x0009 }, { 0x0020, 0x002f }, { 0x003a, 0x0040 }, { 0x005b, 0x0060 },
189 { 0x007b, 0x007e }, { 0x00ab, 0x00ab }, { 0x00ad, 0x00ad }, { 0x00bb, 0x00bb },
190 { 0x02c7, 0x02c7 }, { 0x02c9, 0x02c9 }, { 0x055d, 0x055d }, { 0x060c, 0x060c },
191 { 0x2002, 0x200b }, { 0x2013, 0x2014 }, { 0x2016, 0x2016 }, { 0x2018, 0x2018 },
192 { 0x201c, 0x201d }, { 0x2022, 0x2022 }, { 0x2025, 0x2027 }, { 0x2039, 0x203a },
193 { 0x2045, 0x2046 }, { 0x207d, 0x207e }, { 0x208d, 0x208e }, { 0x226a, 0x226b },
194 { 0x2574, 0x2574 }, { 0x3001, 0x3003 }, { 0x3005, 0x3005 }, { 0x3008, 0x3011 },
195 { 0x3014, 0x301b }, { 0x301d, 0x301e }, { 0x3041, 0x3041 }, { 0x3043, 0x3043 },
196 { 0x3045, 0x3045 }, { 0x3047, 0x3047 }, { 0x3049, 0x3049 }, { 0x3063, 0x3063 },
197 { 0x3083, 0x3083 }, { 0x3085, 0x3085 }, { 0x3087, 0x3087 }, { 0x308e, 0x308e },
198 { 0x309b, 0x309e }, { 0x30a1, 0x30a1 }, { 0x30a3, 0x30a3 }, { 0x30a5, 0x30a5 },
199 { 0x30a7, 0x30a7 }, { 0x30a9, 0x30a9 }, { 0x30c3, 0x30c3 }, { 0x30e3, 0x30e3 },
200 { 0x30e5, 0x30e5 }, { 0x30e7, 0x30e7 }, { 0x30ee, 0x30ee }, { 0x30f5, 0x30f6 },
201 { 0x30fc, 0x30fe }, { 0xfd3e, 0xfd3f }, { 0xfe30, 0xfe31 }, { 0xfe33, 0xfe44 },
202 { 0xfe4f, 0xfe51 }, { 0xfe59, 0xfe5e }, { 0xff08, 0xff09 }, { 0xff0c, 0xff0c },
203 { 0xff0e, 0xff0e }, { 0xff1c, 0xff1c }, { 0xff1e, 0xff1e }, { 0xff3b, 0xff3b },
204 { 0xff3d, 0xff3d }, { 0xff40, 0xff40 }, { 0xff5b, 0xff5e }, { 0xff61, 0xff64 },
205 { 0xff67, 0xff70 }, { 0xff9e, 0xff9f }, { 0xffe9, 0xffe9 }, { 0xffeb, 0xffeb },
212 s_bFirstTime =
FALSE;
232 WORD wType1, wType2, wType3;
240 trace(
"%u\t0x%04x\t0x%04x\t0x%04x\t0x%04x\n",
b, wType1, wType2, wType3, ch);
249 ok(
b1 ==
b2,
"ch:0x%04x, b1:%d, b2:%d\n", ch,
b1,
b2);
270 ok(fn1 ==
NULL,
"fn1 was %p\n", fn1);
274 pEnum->SetList(nCount,
pList);
279 IID_IAutoComplete2, (
VOID **)&pAC);
283 hr = pAC->SetOptions(ACO_AUTOSUGGEST);
291#ifdef MANUAL_DEBUGGING
292 trace(
"enter MANUAL_DEBUGGING...\n");
293 trace(
"NOTE: You can quit EDIT control by Alt+F4.\n");
301 trace(
"leave MANUAL_DEBUGGING...\n");
313 for (
UINT i = 0; pszInput[
i]; ++
i)
316 chLast = pszInput[
i];
323 for (
INT i = 0;
i < 100; ++
i)
335 ok(hwndDropDown !=
NULL,
"hwndDropDown was NULL\n");
342 s_bFirstTime =
FALSE;
345 ok(fn1 != fn2,
"fn1 == fn2\n");
346 ok(fn2 !=
NULL,
"fn2 was NULL\n");
350 skip(
"fn2 == NULL\n");
364 RECT rcEdit, rcDropDown;
368 trace(
"rcDropDown: (%ld, %ld, %ld, %ld)\n", rcDropDown.
left, rcDropDown.
top, rcDropDown.
right, rcDropDown.
bottom);
377#define DROPDOWN_STYLE (WS_POPUP | WS_VISIBLE | WS_CLIPSIBLINGS | \
378 WS_CLIPCHILDREN | WS_BORDER)
380#define DROPDOWN_EX_STYLE (WS_EX_TOOLWINDOW | WS_EX_TOPMOST | \
381 WS_EX_NOPARENTNOTIFY)
387#define DROPDOWN_CLASS_STYLE_1 (CS_DROPSHADOW | CS_SAVEBITS)
388#define DROPDOWN_CLASS_STYLE_2 0
391 "style was 0x%08lx\n",
style);
396 trace(
"rcClient: (%ld, %ld, %ld, %ld)\n",
399 HWND hwndScrollBar, hwndSizeBox, hwndList, hwndNone;
404 ok(hwndScrollBar !=
NULL,
"hwndScrollBar was NULL\n");
410#define SCROLLBAR_STYLE_1 (WS_CHILD | WS_VISIBLE | SBS_BOTTOMALIGN | SBS_VERT)
411#define SCROLLBAR_STYLE_2 (WS_CHILD | SBS_BOTTOMALIGN | SBS_VERT)
421 ok(hwndSizeBox !=
NULL,
"hwndSizeBox was NULL\n");
427#define SIZEBOX_STYLE_1 \
428 (WS_CHILD | WS_VISIBLE | SBS_SIZEBOX | SBS_SIZEBOXBOTTOMRIGHTALIGN)
429#define SIZEBOX_STYLE_2 \
430 (WS_CHILD | WS_VISIBLE | SBS_SIZEBOX)
438 ok(hwndList !=
NULL,
"hwndList was NULL\n");
444#define LIST_STYLE_1 \
445 (WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_CLIPSIBLINGS | \
446 LVS_NOCOLUMNHEADER | LVS_OWNERDATA | LVS_OWNERDRAWFIXED | \
447 LVS_SINGLESEL | LVS_REPORT)
448#define LIST_STYLE_2 \
449 (WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | LVS_NOCOLUMNHEADER | \
450 LVS_OWNERDATA | LVS_OWNERDRAWFIXED | LVS_SINGLESEL | LVS_REPORT)
457#define LIST_EXTENDED_LV_STYLE_1 \
458 (LVS_EX_DOUBLEBUFFER | LVS_EX_ONECLICKACTIVATE | \
459 LVS_EX_FULLROWSELECT | LVS_EX_TRACKSELECT)
460#define LIST_EXTENDED_LV_STYLE_2 \
461 (LVS_EX_ONECLICKACTIVATE | LVS_EX_FULLROWSELECT | \
466 "exstyle was 0x%08lx\n", exstyle);
470 ok(hwndNone ==
NULL,
"hwndNone was %p\n", hwndNone);
473 RECT rcScrollBar, rcSizeBox, rcList;
480 trace(
"rcScrollBar: (%ld, %ld, %ld, %ld)\n", rcScrollBar.
left, rcScrollBar.
top,
482 trace(
"rcSizeBox: (%ld, %ld, %ld, %ld)\n", rcSizeBox.
left, rcSizeBox.
top,
484 trace(
"rcList: (%ld, %ld, %ld, %ld)\n", rcList.
left, rcList.
top,
495 if (nListCount < 1000)
586 for (
UINT i = 0;
i < nCount; ++
i)
617 pEnum->SetList(nCount,
pList);
622 IID_IAutoComplete2, (
VOID **)&pAC);
626 hr = pAC->SetOptions(ACO_AUTOSUGGEST);
662 hwndScrollBar = hwndSizeBox = hwndList =
NULL;
678 ok(bVisible ==
entry.m_bVisible,
"Line %d: bVisible was %d\n",
entry.m_line, bVisible);
685 ok(bVisible == bDidMatch,
"Line %d: bVisible != bDidMatch\n",
entry.m_line);
690 ok(strText ==
L"",
"Line %d: szText was %S\n",
entry.m_line, (
LPCWSTR)strText);
691 ok(ich0 ==
entry.m_ich0,
"Line %d: ich0 was %d\n",
entry.m_line, ich0);
692 ok(ich1 ==
entry.m_ich1,
"Line %d: ich1 was %d\n",
entry.m_line, ich1);
693 ok(iItem ==
entry.m_iItem,
"Line %d: iItem was %d\n",
entry.m_line, iItem);
712 skip(
"CoInitialize failed\n");
721 trace(
"rcWork: (%ld, %ld, %ld, %ld)\n",
723 trace(
"SM_CXVSCROLL: %d, SM_CYHSCROLL: %d\n",
731 trace(
"Testcase #1 (downer, short) ------------------------------\n");
740 trace(
"Testcase #2 (downer, long) ------------------------------\n");
743 for (
UINT i = 0;
i < nCount; ++
i)
751 trace(
"Testcase #3 (upper, short) ------------------------------\n");
756 SHStrDupW(
L"test/CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC", &
pList[1]);
761 trace(
"Testcase #4 (upper, short) ------------------------------\n");
766 SHStrDupW(
L"testtest\\CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC", &
pList[1]);
770#ifdef MANUAL_DEBUGGING
775 trace(
"Testcase #5 (upper, long) ------------------------------\n");
778 for (
UINT i = 0;
i < nCount; ++
i)
786 trace(
"Testcase #6 (upper, long) ------------------------------\n");
789 for (
UINT i = 0;
i < nCount; ++
i)
797 trace(
"Testcase #7 ------------------------------\n");
800 for (
UINT i = 0;
i < nCount; ++
i)
807 { __LINE__,
WM_CHAR,
L't', 0,
L"t",
TRUE, 1, 1, -1,
TRUE },
811 { __LINE__,
WM_CHAR,
L'\\', 0,
L"tesT\\",
TRUE, 5, 5, -1,
TRUE,
TRUE,
L"tesT\\" },
822 { __LINE__,
WM_KEYDOWN,
VK_BACK, 0,
L"tesT",
TRUE, 4, 4, -1,
TRUE },
827 { __LINE__,
WM_CHAR,
L't', 0,
L"t",
TRUE, 1, 1, -1,
TRUE },
834 trace(
"Testcase #8 ------------------------------\n");
837 for (
UINT i = 0;
i < nCount; ++
i)
844 { __LINE__,
WM_CHAR,
L'a', 0,
L"a",
FALSE, 1, 1, -1,
TRUE },
848 { __LINE__,
WM_KEYDOWN,
VK_DELETE, 0,
L"b",
FALSE, 0, 0, -1,
TRUE },
849 { __LINE__,
WM_CHAR,
L't', 0,
L"tb",
FALSE, 1, 1, -1,
TRUE },
854 { __LINE__,
WM_CHAR,
L'\\', 0,
L"test\\",
TRUE, 5, 5, -1,
TRUE,
TRUE,
L"test\\" },
864 { __LINE__,
WM_KEYDOWN,
VK_BACK, 0,
L"tet\\",
FALSE, 2, 2, -1,
TRUE,
TRUE,
L"tet\\" },
865 { __LINE__,
WM_KEYDOWN,
VK_DELETE, 0,
L"te\\",
FALSE, 2, 2, -1,
TRUE,
TRUE,
L"te\\" },
866 { __LINE__,
WM_KEYDOWN,
VK_DELETE, 0,
L"te",
TRUE, 2, 2, -1,
TRUE },
871 trace(
"Testcase #9 ------------------------------\n");
874 for (
UINT i = 0;
i < nCount; ++
i)
881 { __LINE__,
WM_CHAR,
L'a', 0,
L"a",
TRUE, 1, 1, -1,
TRUE },
883 { __LINE__,
WM_CHAR,
L'\\', 0,
L"a0\\",
TRUE, 3, 3, -1,
TRUE,
TRUE,
L"a0\\" },
886 { __LINE__,
WM_CHAR,
L'\\', 0,
L"a0\\b1\\",
TRUE, 6, 6, -1,
TRUE,
TRUE,
L"a0\\b1\\" },
887 { __LINE__,
WM_CHAR,
L'c', 0,
L"a0\\b1\\c",
TRUE, 7, 7, -1 },
889 { __LINE__,
WM_KEYDOWN,
VK_BACK, 0,
L"a0\\b1",
TRUE, 5, 5, -1,
TRUE,
TRUE,
L"a0\\" },
892 { __LINE__,
WM_KEYDOWN,
VK_BACK, 0,
L"a0",
TRUE, 2, 2, -1,
TRUE },
#define ok_hr(status, expected)
static int __cdecl RangeCompare(const void *x, const void *y)
#define DROPDOWN_EX_STYLE
#define SCROLLBAR_STYLE_2
#define LIST_EXTENDED_LV_STYLE_2
static VOID DoTestCaseA(INT x, INT y, INT cx, INT cy, LPCWSTR pszInput, LPWSTR *pList, UINT nCount, BOOL bDowner, BOOL bLong)
#define DROPDOWN_CLASS_STYLE_2
static VOID DoWordBreakProc(EDITWORDBREAKPROC fn)
#define LIST_EXTENDED_LV_STYLE_1
#define SCROLLBAR_STYLE_1
#define DROPDOWN_CLASS_STYLE_1
static VOID DoTestCaseB(INT x, INT y, INT cx, INT cy, LPWSTR *pList, UINT nCount, const TEST_B_ENTRY *pEntries, UINT cEntries)
static CStringW s_strExpand
static BOOL DoesMatch(LPWSTR *pList, UINT nCount, LPCWSTR psz)
static HWND MyCreateEditCtrl(INT x, INT y, INT cx, INT cy)
static __inline BOOL IsWordBreak(WCHAR ch)
#define ok_long(expression, result)
#define ok_int(expression, result)
STDMETHODIMP_(ULONG) Release() override
STDMETHODIMP QueryInterface(REFIID iid, VOID **ppv) override
STDMETHODIMP Expand(PCWSTR pszExpand) override
STDMETHODIMP_(ULONG) AddRef() override
STDMETHODIMP Skip(ULONG celt) override
VOID SetList(UINT nCount, LPWSTR *pList)
STDMETHODIMP GetOptions(DWORD *pdwFlag) override
STDMETHODIMP SetOptions(DWORD dwFlag) override
STDMETHODIMP Reset() override
STDMETHODIMP Next(ULONG celt, LPWSTR *rgelt, ULONG *pceltFetched) override
STDMETHODIMP Clone(IEnumString **ppenum) override
INT WINAPI StrCmpNIW(LPCWSTR lpszStr, LPCWSTR lpszComp, INT iLen)
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
BOOL WINAPI GetStringTypeW(DWORD type, LPCWSTR src, INT count, LPWORD chartype)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI SHStrDupW(LPCWSTR src, LPWSTR *dest)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
VOID WINAPI CoTaskMemFree(LPVOID ptr)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
static CRYPT_DATA_BLOB b2[]
static CRYPT_DATA_BLOB b1[]
static DWORD DWORD void LPSTR DWORD cch
HMONITOR WINAPI MonitorFromWindow(HWND, DWORD)
const GUID IID_IEnumString
_Out_opt_ int _Out_opt_ int * cy
#define ListView_GetNextItem(hwnd, i, flags)
#define ListView_GetItemCount(hwnd)
#define ListView_GetExtendedListViewStyle(hwndLV)
STRSAFEAPI StringCbPrintfW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszFormat,...)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
static GLenum _GLUfuncptr fn
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
_In_ UINT _In_ UINT cEntries
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define GetWindowLongPtrW
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define EM_GETWORDBREAKPROC
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
HWND WINAPI GetTopWindow(_In_opt_ HWND)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
HWND WINAPI GetDesktopWindow(void)
BOOL WINAPI ShowWindowAsync(_In_ HWND, _In_ int)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI PeekMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR 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)
#define GetNextWindow(h, c)
int WINAPI GetClassNameW(_In_ HWND hWnd, _Out_writes_to_(nMaxCount, return) LPWSTR lpClassName, _In_ int nMaxCount)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
BOOL WINAPI GetMonitorInfoW(_In_ HMONITOR, _Inout_ LPMONITORINFO)
HWND WINAPI FindWindowW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR)
#define EDITWORDBREAKPROC
BOOL WINAPI IsWindowVisible(_In_ HWND)
BOOL WINAPI DestroyWindow(_In_ HWND)
int WINAPI GetSystemMetrics(_In_ int)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)