Commit graph

4875 commits

Author SHA1 Message Date
Alex Henrie
4e95553a2d comctl32/listview: Ignore the lParam to WM_PRINTCLIENT and add tests.
Based on simliar patch for comctl32/treeview: 231199bc46

WM_PRINTCLIENT paints the items of a listview, including the item
backgrounds, but never the listview background.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54878
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55005
Co-authored-by: Bernhard Übelacker <bernhardu@mailbox.org>
2023-12-20 22:20:49 +01:00
Alexandre Julliard
b724a79e36 comctl32: Fix string comparison for listbox inexact matches.
Same as 343398d23e.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55446
2023-12-20 22:20:38 +01:00
Akihiro Sagawa
fad15dae93 comctl32/tests: Store old DPI awareness context. 2023-12-12 23:15:03 +01:00
Brendan McGrath
6a4fb894fe comctl32/tests: Modify test_width to try different fonts. 2023-12-08 22:31:38 +01:00
Brendan McGrath
8934a53e61 comctl32/tests: Check size initially and after changing padding only. 2023-12-08 22:31:38 +01:00
Brendan McGrath
027bbb30a1 comctl32/tests: Fix tabcontrol tests to work with different fonts.
The WM_SETFONT was previously passing the hFont as the LPARAM (when it
should be the WPARAM).
2023-12-08 22:31:38 +01:00
Brendan McGrath
39ae8778ca comctl32: Use selected font to determine default min tab width.
This fixes the layout of the tabcontrol when a font other than the
system font is used.
2023-12-08 22:31:38 +01:00
Brendan McGrath
1970556b6d comctl32: Fix TAB_SetItemSize.
Windows sets the default width to LOGPIXELSX regardless of the style.

It will also always return the previous cx value provided.
2023-12-08 22:31:38 +01:00
Brendan McGrath
7296bcd84a comctl32/tests: Add test for setitemsize return value. 2023-12-08 22:31:38 +01:00
Aida Jonikienė
602f68f23c comctl32: Only print TREEVIEW_HandleTimer() ERR once.
Older versions of Roblox trigger this quite a bit and it's annoying
to me so let's only print it once.
2023-12-01 17:21:39 +01:00
Alex Henrie
0e99baed43 comctl32/tests: Use CRT allocation functions. 2023-11-23 16:16:59 +01:00
Alexandre Julliard
7ccb5df0fc makefiles: Always use the global SOURCES variable for .rc files. 2023-11-01 22:43:56 +01:00
Alexandre Julliard
2205218b24 makefiles: Always use the global SOURCES variable for .svg files. 2023-10-14 13:47:59 +02:00
Alexandre Julliard
1255764ad5 makefiles: Remove unnecessary imports of usp10.dll.
The functions are in gdi32 nowadays.
2023-10-12 10:45:23 +02:00
Alex Henrie
6159a50127 comctl32: Use the debugstr_fourcc function instead of reimplementing it. 2023-10-06 20:49:52 +02:00
Dmitry Timoshkov
a5563e259c comctl32: Use iswalnum() to filter alpha numeric characters from unicode messages.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2023-09-07 12:05:29 +02:00
Zhiyi Zhang
753ddd3a02 comctl32/edit: Don't use WM_TIMER to update caret position.
An application subclasses edit control and crashes on unexpected WM_TIMER messages. A timer was
added a long time ago and it was for auto scrolling the view when the cursor is outside of the
client area. However, with a EDIT_EM_ScrollCaret() call in EDIT_WM_MouseMove(), the view can be
scrolled to the correct position automatically. So the timer is not necessary at all. This is tested
manually with a long text in the edit control with notepad on XP, Win7 and Win10. Before this patch,
the caret will move backwards every 100ms when the clicking the left mouse button on the bottom of
the text and then dragging the cursor upwards and outside of the client area. After this, the
behavior is the same as native.
2023-09-06 22:00:59 +02:00
Jacob Czekalla
1accde204f comctl32/status: Invalidate entire status bar on WM_SIZE. 2023-09-04 11:38:21 +02:00
Alistair Leslie-Hughes
4c2c896af9 comctl32: Remove DECLSPEC_HIDDEN usage. 2023-08-30 21:05:53 +02:00
Esme Povirk
676e325832 comctl32/tests: Test MSAA events for tab controls. 2023-08-02 20:03:51 +09:00
Esme Povirk
35930f2d87 comctl32: Add support for MSAA events on tab controls. 2023-08-02 20:03:51 +09:00
Zhao Yi
314c94e100 comctl32/listview: Reset bNoItemMetrics to make sure that listview items can be arranged correctly.
Signed-off-by: Zhao Yi <zhaoyi@uniontech.com>
2023-08-01 21:50:34 +09:00
Alexandre Julliard
297a7349ec comctl32/tests: Use nameless unions/structs. 2023-07-19 12:17:04 +02:00
Zhiyi Zhang
6596f85ee1 comctl32/tests: Add Korean IME specific test sequences.
Windows with Korean locale has a different IME message sequence.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53890
2023-07-19 11:54:03 +02:00
Zhao Yi
ff951dc843 comctl32/syslink: Check item type before increasing link ID in SYSLINK_LinkAtPt().
Signed-off-by: Zhaoyi <zhaoyi@uniontech.com>
2023-07-17 15:19:38 +02:00
Zhao Yi
53fd667eeb comctl32/tests: Add a test case to get syslinkid.
Signed-off-by: Zhaoyi <zhaoyi@uniontech.com>
2023-07-17 15:19:17 +02:00
Alexandre Julliard
22c56f9752 comctl32: Use nameless unions/structs. 2023-07-10 21:15:55 +02:00
Alex Henrie
47e044b81d comctl32: Remove duplicate declarations of MONTHCAL functions.
MONTHCAL_MonthLength and MONTHCAL_CalculateDayOfWeek are already
declared in dlls/comctl32/comctl32.h.
2023-06-19 16:28:54 +02:00
Rémi Bernon
fa56a363b1 comctl32/edit: Delegate composition string rendering to the IME UI.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53860
2023-05-15 06:09:54 -05:00
Rémi Bernon
e2cd4dcf8b comctl32/edit: Notify IME on caret position, format_rect and font changes.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53860
2023-05-15 06:09:54 -05:00
Alex Henrie
231199bc46 comctl32/treeview: Ignore the lParam to WM_PRINTCLIENT and add tests.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54640
2023-03-17 11:48:09 +01:00
Rémi Bernon
078c6e5ab2 comctl32: Skip restoring window proc if it has been modified.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43073
2023-02-01 17:12:31 +01:00
Rémi Bernon
8387d2feff comctl32: Always use unicode messages for subclass procedures.
Final Fantasy XIV Online depends on this for its text input.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43073
2023-02-01 17:12:29 +01:00
Rémi Bernon
591f585a55 comctl32: Save unicode window nature on SetWindowSubclass call.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43073
2023-02-01 17:12:29 +01:00
Rémi Bernon
711f05c432 comctl32/tests: Test unicode nature of window subclasses.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43073
2023-02-01 17:12:29 +01:00
Nikolay Sivov
32bfaeb3f9 comctl32/header: Do not touch 'hwnd' field in HDM_LAYOUT.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-01-26 22:05:13 +01:00
Zhiyi Zhang
1f1f99025d comctl32/listview: Repaint when changing view styles.
Changing listview view styles should repaint according to the tests in test_WM_STYLECHANGED().

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54215
2023-01-24 18:13:32 +01:00
Zhiyi Zhang
cc84be8d89 comctl32/tests: Add WM_STYLECHANGED tests for changing listview view styles.
Changing view styles should repaint listviews according to the newly added tests.
2023-01-24 18:13:30 +01:00
Rémi Bernon
0bb029eb59 comctl32: Avoid mismatching heap in ProgressWindowProc.
When free-ing an Alloc-ed pointer.
2023-01-13 19:37:01 +01:00
Eric Pouech
ee5cdea922 comctl32/tests: Fix failing WM_PASTE tests for edit control on Win10+.
There are cases in Windows10+ where the WM_PASTE message doesn't paste
the content of the clipboard.

This appeared in testing:
- almost always just after (for a couple of milliseconds) setting new
  content into the clipboard and closing it.
- in some unrelated rare occasions (like once for 400 runs).

It looks like another (installed) process had opened the clipboard and
forbids the paste command.
As WM_PASTE doesn't return success/error status, workaround it by
wrapping the WM_PASTE command into a helper, and retry when the
clipboard's content hasn't been pasted.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53276
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53277
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2023-01-09 16:44:08 +01:00
Eric Pouech
e9a32c6a8d comctl32/tests: Retry when opening the clipboard.
As the clipboard is a shared resource, we cannot expect that
no other app hasn't openeded it.
So wrap clipboard access with a retry feature in case of failure.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2023-01-09 16:44:08 +01:00
Nikolay Sivov
136a576d8c comctl32/tests: Ignore some IME messages in monthcal tests. 2023-01-06 13:39:45 +01:00
Vladislav Timonin
b3ab1f8fb3 comctl32/listview: Exclude header area in WM_NCPAINT.
An improvement of 5f0dcf7918,
which, depending on theme, had an issue with
drawing the top border clipped inside the header.
2023-01-06 13:39:45 +01:00
Eric Pouech
0d8b477b1f comctl32/test: Adapt the edit tests for height to Win10+.
Starting with Win10, height of multiline edit controls no longer seems
to be hardwired to a multiple of the font height (when larger than
font height).

- Adapt the tests accordingly (detecting how to compute the expected
  height of a control).
- Extend the ranges of the tested heights.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52152
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2023-01-06 10:43:20 +01:00
Eric Pouech
e439373f59 comctl32/tests: Fix failing test on Windows in Arabic UTF-8.
Already fixed in user32/tests/edit.c by
614b7d7430

Apply same fix for equivalent test on comctl32/tests/edit.c

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52932
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2023-01-06 10:42:48 +01:00
Nikolay Sivov
df65aee926 comctl32: Switch back to internal allocation function.
We are still using exported string functions internally,
and that caused mismatches after recent incomplete switching to crt functions.

There is also no evidence that crt functions are used at all there,
so for now switch back to fix mismatching calls.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-12-09 17:52:25 +01:00
Alexandre Julliard
c63f485379 include: Use proper dllimports for comctl32 functions. 2022-12-07 13:51:37 +01:00
Alex Henrie
9aaf04687a comctl32: Annotate (Re)Alloc with __WINE_(DEALLOC|MALLOC). 2022-12-05 20:04:54 +01:00
Nikolay Sivov
0002cb89ec comctl32/listview: Use CRT allocation functions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-11-30 10:55:24 +01:00
Nikolay Sivov
aa98d43c45 comctl32/button: Use CRT allocation functions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-11-30 10:55:23 +01:00