Commit graph

4884 commits

Author SHA1 Message Date
Zhiyi Zhang 23c5d4c065 comctl32/ipaddress: Delete font when destroying the control.
For bug for bug compatibility, delete the font set by WM_SETFONT when destroying the control even if
the font is not owned by the control according to tests.
2024-05-28 20:42:02 +02:00
Zhiyi Zhang c9452db769 comctl32/tooltips: Don't duplicate font when handling WM_SETFONT.
This reverts 06effbf0.
2024-05-28 20:42:00 +02:00
Zhiyi Zhang 480598680c comctl32/syslink: Don't delete font when destroying the control.
The font set by WM_SETFONT is not owned by syslink so it shouldn't be deleted when handling
WM_DESTROY for the control.

Fix Toad for Oracle text gets reset to the system font after installing Team Coding. The application
creates a font and set it to a syslink. Then after the syslink destroys itself, the font becomes
invalid so other controls using the font end up falling back to the system font.
2024-05-28 20:41:58 +02:00
Zhiyi Zhang daa6f9b1b2 comctl32/tests: Add WM_SETFONT tests. 2024-05-28 20:41:58 +02:00
Dmitry Timoshkov 5f7b9a5b83 comctl32/tests: Create a fully updated ListView window.
so that the tests don't get remaining messages from the window
creation process, and verify message sequences for the actually
being tested functionality.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-05-27 22:59:21 +02:00
Dmitry Timoshkov ee3b9be8e2 comctl32: Implement IImageList2::Initialize().
... by moving ImageList_Create() implementation.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-03-14 18:41:42 +01:00
Dmitry Timoshkov fedcd4bb0e comctl32/tests: Add more tests for IImageList2 interface.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-03-14 18:41:42 +01:00
Paul Gofman a7d3d574c0 comctl32: Force debug info in critical sections. 2024-03-01 23:14:22 +01:00
Noah Berner 2dcc8ec08d comctl32/tests: Fix test that fails on Feb 29th. 2024-02-29 19:25:10 +01:00
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