Commit graph

4776 commits

Author SHA1 Message Date
Piotr Caban
2a28785515 comctl32/tests: Add more PROPSHEETPAGE tests inside callback. 2022-10-10 11:00:50 +02:00
Piotr Caban
16ac644b11 comctl32/tests: Test passing extra data in PROPSHEETPAGE structure. 2022-10-10 11:00:50 +02:00
Piotr Caban
88bc45a7ec comctl32/tests: Test PROPERTYSHEETPAGE passed in WM_INITDIALOG. 2022-10-10 11:00:48 +02:00
Lorenzo Ferrillo
c1db36686c comctl32: Support passing bitmap and icon resource ID as a string when creating static control.
Follow Up of Merge request !693 by Jacek Caban. The pull request changed
properly the static control of user32, but didn't address the comctl32
static control.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53581
2022-09-05 23:06:23 +02:00
Zhiyi Zhang
46740a23fd comctl32/datetime: Do not paint parent background when painting arrows.
This is tested manually on XP, Win7 and Win10.
2022-09-01 17:43:02 +02:00
Zhiyi Zhang
b9c882a127 uxtheme: Do not draw parent background even if scrollbar arrows and thumb are transparent.
This is confirmed by the tests in test_scrollbar() and manual tests on XP. Even though scrollbar
arrows and thumb are in fact transparent, DrawThemeParentBackground() is not called to paint the
parent background, leaving the transparent area untouched. On Windows, even if the scrollbar arrows
are reported to be transparent, the bitmaps for arrow parts in the stock themes are in fact opaque.

Fix Ice Cream Calculator slow scrolling after 4cb229a because the WM_PRINTCLIENT handling in the
application is slow.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53337
2022-09-01 17:43:00 +02:00
Zhiyi Zhang
cf4c4d2f25 uxtheme: Use the brush from WM_CTLCOLORSCROLLBAR to paint SB_CTL scrollbar tracks if present. 2022-09-01 17:43:00 +02:00
Zhiyi Zhang
69a0acb536 comctl32/tests: Add themed scrollbar background tests. 2022-09-01 17:43:00 +02:00
Alexandre Julliard
e28c2caac0 comctl32/tests: Use client coordinates for right click test.
Fix the corresponding message sequences.
2022-08-19 22:45:18 +02:00
Zhiyi Zhang
e2a725621a comctl32/edit: Don't repaint immediately when losing focus.
Ignore some messages for the parent window because the "Kill focus" message sequence starts
succeeding with this commit but sometimes those messages appear on Wine and cause random test
failures. Those messages are not interested in the tests so ignore them.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-08-18 21:42:20 +02:00
Zhiyi Zhang
a336b43a93 comctl32/edit: Don't repaint immediately when getting focus.
Fix MSXML 3.0 installer username edit control missing part of its edge. The application has a static
control overlapping an edit control. Repainting the edit control immediately will cause the edit
control to be painted under the static control.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-08-18 21:42:20 +02:00
Zhiyi Zhang
2a27ffe423 comctl32/tests: Test that changing focus for edit controls doesn't repaint immediately.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-08-18 21:42:20 +02:00
Zhiyi Zhang
a1aff0ec8c comctl32/edit: Handle IME composition result string only when EIMES_GETCOMPSTRATONCE is set.
If EIMES_GETCOMPSTRATONCE is not set, WM_IME_COMPOSITION with LPARAM set to GCS_RESULTSTR should be
passed to the default window procedure according to MSDN.

Fix some windows based on edit control not being able to input Chinese.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-08-16 22:27:53 +02:00
Zhiyi Zhang
b3b1cec077 comctl32/edit: Let DefWindowProcW() handle WM_IME_CHAR.
So that WM_IME_CHAR will be converted to WM_CHAR in DefWindowProcW().

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-08-16 22:27:53 +02:00
Zhiyi Zhang
3b97566f0b comctl32/edit: Implement EM_GETIMESTATUS.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-08-16 22:27:53 +02:00
Zhiyi Zhang
873f255736 comctl32/edit: Implement EM_SETIMESTATUS.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-08-16 22:27:53 +02:00
Zhiyi Zhang
80bec58649 comctl32/tests: Add IME tests for edit control.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-08-16 22:27:53 +02:00
Zhiyi Zhang
3aefc3a422 comctl32: Set reference data to zero on failure for GetWindowSubclass(). 2022-08-16 22:27:52 +02:00
Zhiyi Zhang
9b9fef2e11 comctl32: Check reference data pointer before using it.
Fix the crash when opening notepad++ v8.4.4 preference dialog before e52e42b.
2022-08-16 22:27:52 +02:00
Zhiyi Zhang
f744310200 comctl32/tests: Add GetWindowSubclass() tests. 2022-08-16 22:27:52 +02:00
Angelo Haller
ef79843c94 comctl32/tests: Add more ownerdata listview tests.
Signed-off-by: Angelo Haller <angelo@szanni.org>
2022-08-08 22:03:12 +02:00
Angelo Haller
4d4513bbad comctl32/listview: Don't send LVN_ODSTATECHANGED for empty ranges.
Signed-off-by: Angelo Haller <angelo@szanni.org>
2022-08-08 22:03:11 +02:00
Angelo Haller
c732901542 comctl32/listview: Send LVN_ODSTATECHANGED notification for LVS_OWNERDATA listview on selection changes.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52534
Signed-off-by: Angelo Haller <angelo@szanni.org>
2022-08-08 22:03:09 +02:00
Angelo Haller
6c814f81aa comctl32/listview: Send LVN_ODSTATECHANGED only for LVS_OWNERDATA listviews.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53123
Signed-off-by: Angelo Haller <angelo@szanni.org>
2022-08-08 22:03:08 +02:00
Angelo Haller
425fd8f80e comctl32/listview: Move sending LVN_ODSTATECHANGED notifications to a function.
Signed-off-by: Angelo Haller <angelo@szanni.org>
2022-08-08 22:03:06 +02:00
Angelo Haller
8b392553b3 comctl32/listview: Send one deselect all items notification for LVS_OWNERDATA listviews.
Send one deselect all items notification on selection change for LVS_OWNERDATA listviews instead
of notifying about each individual item change.

Signed-off-by: Angelo Haller <angelo@szanni.org>
2022-08-08 22:03:04 +02:00
Zhiyi Zhang
830348d78c comctl32/button: Pass the destination rectangle to GetThemePartSize() when painting check boxes.
The destination rectangle may be smaller than that of theme parts, in which case, the draw size
returned is adjusted to fit the destination rectangle. Without passing a destination rectangle
to GetThemePartSize(), the function assumes that there is no limit for destination.

This fixes winecfg check boxes missing the upper edge in 192 DPI. You may notice that the check box
bitmap is slightly shrank and so the shape is a bit off. However, this is what happens on Windows as
well when check box height is set to 8 DLUs.

GetThemePartSize() without destination rectangles are also used in other controls, but manual tests
showed that those controls don't shrink their theme background as check boxes do so they are left
unchanged.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-07-15 11:32:50 +02:00
Dmitry Timoshkov
905dbb8f8b comctl32/listview: Add partial support for LVM_SETBKIMAGE.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-28 16:30:27 +02:00
Zhiyi Zhang
9b5df952a3 comctl32/toolbar: Don't use pattern brushes to draw checked background.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53049
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-06-21 18:53:17 +02:00
Zhiyi Zhang
7f491491f8 comctl32/tests: Test that themed toolbar buttons don't use pattern brushes to draw checked background.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-21 18:53:00 +02:00
Zhiyi Zhang
bfb49ad04c comctl32/toolbar: Add support for TBCDRF_NOBACKGROUND.
Tested manually on XP, Win 7 and Win 10.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53049
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-06-21 18:40:25 +02:00
Jinoh Kang
0b07bb8566 comctl32: Always paint SS_BITMAP static control background with WM_CTLCOLORSTATIC brush.
This is consistent with the behaviour of other static control styles.

Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
2022-06-17 18:06:53 +02:00
Jinoh Kang
58571710ba comctl32: Fix integer overflow in DPA_Search.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
2022-06-10 11:58:52 +02:00
Francois Gouget
3a3f406028 comctl32/tests: Use winetest_push_context() in tooltip:test_customdraw().
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-16 20:46:49 +02:00
Angelo Haller
1132f5f74b comctl32/tests: Add change sequence for ownerdata listviews.
Add a new test sequence for ownerdata listviews that logs solely
item change notifications for single and multiple items changing.
Use it in the ownerdata multiselect tests.

Signed-off-by: Angelo Haller <angelo@szanni.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-05 20:56:34 +02:00
Angelo Haller
ca9e3586de comctl32/tests: Add multi select tests for ownerdata listviews.
Add tests for selecting multiple items in ownerdata listviews by
using SHIFT/CTRL and arrow keys.

Signed-off-by: Angelo Haller <angelo@szanni.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-05 20:56:24 +02:00
Angelo Haller
2d78448464 comctl32/tests: Add hold_key and release_key functions.
Add functions to simulate the holding of keys like SHIFT, CTRL,...

Move existing SHIFT key press emulation to these functions.

Signed-off-by: Angelo Haller <angelo@szanni.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-05 20:56:13 +02:00
Drew Ronneberg
07417f8bf1 comctl32: Remove obsolete -D_COMCTL32_ from Makefile.in.
Signed-off-by: Drew Ronneberg <drew_ronneberg@yahoo.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-28 12:17:32 +02:00
Francois Gouget
b6b0bc7c9f comctl32/tests: Use winetest_push_context() in test_combo_dropdown_size().
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-27 17:23:36 +02:00
Zebediah Figura
5e4dedff8e win32u: Remove the "proc" parameter to NtUserSetSystemTimer().
Testing on 32-bit Windows 10 suggests that the function only has three
parameters. The test fixed in this patch (which still succeeds on e.g. Windows
2003) suggests that the final parameter to SetSystemTimer() is not a callback,
either.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-21 14:41:22 +02:00
Rafał Harabień
cfe5184b26 comctl32/tests: Remove now unused TODO_COUNT in static control tests.
Signed-off-by: Rafał Harabień <rafalh92@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:40 +02:00
Rafał Harabień
c1c6b4bcf2 comctl32/tests: Fix invalidation in static control tests.
Rectangle used for invalidation was outside of windows rect of static
controls with SS_ETCHEDHORZ/SS_ETCHEDVERT style because they resize
after creation. Improve test by changing the invalidated rect and
add more details in comment about SS_ETCHEDHORZ/SS_ETCHEDVERT styles.

Signed-off-by: Rafał Harabień <rafalh92@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:40 +02:00
Rafał Harabień
176bd922df comctl32: Send WM_CTLCOLORSTATIC for all static control types.
Signed-off-by: Rafał Harabień <rafalh92@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:39 +02:00
Rafał Harabień
4e8277e633 comctl32: Fix handling of SS_ETCHEDHORZ/SS_ETCHEDVERT static control styles.
Instead of drawing the frame in WM_PAINT use WS_EX_STATICEDGE style that
adds the frame outside of the client rect and change control size after
creation to make it look like a line.

Signed-off-by: Rafał Harabień <rafalh92@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:39 +02:00
Rafał Harabień
010eb02dc2 comctl32/tests: Add more static control tests.
Signed-off-by: Rafał Harabień <rafalh92@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:39 +02:00
Zhiyi Zhang
24785b4096 comctl32/tests: Use correct width and height in create_bitmap() helper.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-22 18:39:37 +01:00
Jinoh Kang
62df608d3e comctl32: Pre-multiply static control bitmap image by alpha for GdiAlphaBlend.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-16 22:34:30 +01:00
Zhiyi Zhang
7de22a7438 comctl32/tests: Fix a possible test failure.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52639
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-10 18:27:43 +01:00
Zhiyi Zhang
7f54c4c014 comctl32/tests: Fix a test failure when theming is active.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-01 10:35:07 +01:00
Eric Pouech
f2b4634c18 comctl32/tests: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-28 21:30:19 +01:00