Dmitry Timoshkov wrote:
"Dmitry Timoshkov" dmitry@codeweavers.com wrote:
- #ifdef _WIN64
- ok(cls.cbWndExtra == 8, "expected 6, got %d\n", cls.cbWndExtra);
- #else
- ok(cls.cbWndExtra == 6, "expected 6, got %d\n", cls.cbWndExtra);
- #endif
+} +}
You should check the return value of GetClassInfoEx() and put todo_wine only around the failing ok() call (otherwise it will fail under 64-bit).
And of course fix the message in the ok() for 64-bit case.
Thanks again for your comments!
Hereby again a new version. Based on help from IRC, I added the broken call for Windows XP 64-bit. Based on the values from [1] I also added a test for the Dialog class (and moved the tests to class.c). Although this particular value is just defined in winuser.h maybe tests for other extra values could be useful in the future.
Please let me know what you think.
[1] http://haar.student.utwente.nl/~julius/extra_value_table (updated)
From ad33ba4e77207be1e36f1717003fc7c0623d9be5 Mon Sep 17 00:00:00 2001
From: Julius Schwartzenberg julius.schwartzenberg@gmail.com Date: Sun, 11 Oct 2009 15:27:44 +0200 Subject: Fix for bug #2181. Changes the extra value of the standard edit class from 4 to 6.
--- dlls/user32/edit.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index 8ad945b..e42ed41 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -5410,13 +5410,19 @@ static LRESULT WINAPI EditWndProcW(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM l * edit class descriptor */ static const WCHAR editW[] = {'E','d','i','t',0}; +#ifdef _WIN64 +#define EDIT_EXTRA_VALUE 0 +#else +#define EDIT_EXTRA_VALUE 2 /* This has to be 6 in total for 32-bit, otherwise Civilization II crashes, bug #2181 */ +#endif const struct builtin_class_descr EDIT_builtin_class = { editW, /* name */ CS_DBLCLKS | CS_PARENTDC, /* style */ EditWndProcA, /* procA */ EditWndProcW, /* procW */ - sizeof(EDITSTATE *), /* extra */ + sizeof(EDITSTATE *) + EDIT_EXTRA_VALUE, /* extra */ IDC_IBEAM, /* cursor */ 0 /* brush */ }; +#undef EDIT_EXTRA_VALUE