Commit graph

4794 commits

Author SHA1 Message Date
Piotr Caban
e270a10423 comctl32: Add helper for getting template from HPROPSHEETPAGE. 2022-10-19 18:49:02 +02:00
Piotr Caban
a3b1a9cf67 comctl32: Add helper for creating page HWND from HPROPSHEETPAGE. 2022-10-19 18:49:02 +02:00
Piotr Caban
6c161f3359 comctl32: Add helper for getting icon from HPROPSHEETPAGE. 2022-10-18 23:53:39 +02:00
Piotr Caban
f6fcb16765 comctl32: Add helper for getting title from HPROPSHEETPAGE. 2022-10-18 23:53:39 +02:00
Piotr Caban
91baf79a6c comctl32: Add helper for loading dialog template from HPROPSHEETPAGE. 2022-10-18 23:53:39 +02:00
Piotr Caban
cf6de3e099 comctl32: Add helper for getting flags from HPROPSHEETPAGE. 2022-10-18 23:53:39 +02:00
Piotr Caban
e05f6451bc comctl32: Add helper for calling PROPERTYSHEETPAGE callback. 2022-10-18 23:53:38 +02:00
Zhiyi Zhang
a8396d8b1e comctl32/listview: Don't repaint when handling WM_STYLECHANGED.
Some applications subclass listview and change style multiple times when painting. Invalidating
control when handling WM_STYLECHANGED causes infinite WM_PAINT messages in this case and end up
stalling the message queue.
2022-10-18 17:56:32 +02:00
Zhiyi Zhang
44cfa3ec1a comctl32/treeview: Don't repaint when handling WM_STYLECHANGED.
Some applications subclass treeview and change style multiple times when painting. Invalidating
control when handling WM_STYLECHANGED causes infinite WM_PAINT messages in this case and end up
stalling the message queue.
2022-10-18 17:56:27 +02:00
Zhiyi Zhang
c8ec431fd4 comctl32/tests: Test if WM_STYLECHANGED repaints controls. 2022-10-18 17:56:27 +02:00
Zhiyi Zhang
d7c27e19f9 comctl32/tests: Ignore WM_NCPAINT when testing WM_THEMECHANGED for updown control.
Fix a possible test failure.
2022-10-18 17:56:23 +02:00
Piotr Caban
d75deeec38 comctl32: Don't cast HPROPSHEETPAGE to PROPSHEETPAGEW*. 2022-10-14 21:52:55 +02:00
Piotr Caban
fd6c1d597c comctl32: Use HPROPSHEETPAGE directly in PROPSHEET_GetPageRect. 2022-10-14 21:52:55 +02:00
Piotr Caban
aefd67ff60 comctl32: Use HPROPSHEETPAGE directly in PROPSHEET_CreatePage. 2022-10-14 21:52:55 +02:00
Piotr Caban
c7b5108c02 comctl32: Use HPROPSHEETPAGE directly in PROPSHEET_CollectPageInfo. 2022-10-14 21:52:55 +02:00
Piotr Caban
fdd4431304 comctl32: Introduce _PSP structure to store HPROPSHEETPAGE data. 2022-10-14 21:52:55 +02:00
Piotr Caban
b536d57825 comctl32: Don't pass PROPSHEETPAGE to SetWindowSubclass in PROPSHEET_CreatePage. 2022-10-10 11:00:50 +02:00
Piotr Caban
89729df986 comctl32/tests: Test passing PropertySheetPage as HPROPSHEETPAGE. 2022-10-10 11:00:50 +02:00
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