Commit Graph

4703 Commits

Author SHA1 Message Date
Alexandre Julliard f0cd33c69e include: Add support for defining Win32 types as 'long' where possible.
Add -DWINE_NO_LONG_TYPES to modules that still have compilation
warnings with long types.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 20:38:22 +01:00
Nikolay Sivov 0bc91a72e8 comctl32/tests: Add some tests for TBBUTTON.iBitmap for separators.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52465
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 17:58:37 +01:00
Eric Pouech 5e56ada9c4 comctl32: Use correct integral type.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 11:12:55 +01:00
Fabian Maurer 8fae32885a comctl32/tests: Avoid "misleading indentation" warnings.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-26 21:53:13 +01:00
Zhiyi Zhang d1c0990344 comctl32/propsheet: Handle page dialog tab texture in DefDlgProc().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 10:18:42 +01:00
Zhiyi Zhang 9083b1e8b1 comctl32/static: Enable parent dialog tab texture.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 10:18:39 +01:00
Zhiyi Zhang c5ba5e2ecb comctl32/button: Enable parent dialog tab texture.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 10:18:35 +01:00
Nikolay Sivov c16b65cdd9 comctl32/listview: Add partial implementation of LVM_GETNEXTITEMINDEX.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-21 18:40:30 +01:00
Zhiyi Zhang 1e8ce36e30 comctl32/tests: Remove WM_CTLCOLORSTATIC tests for property sheets.
The removed tests are covered by test_EnableThemeDialogTexture() in uxtheme/tests/system.c.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-21 09:24:49 +01:00
Zhiyi Zhang 2390371f0f comctl32/tests: Remove WM_CTLCOLORSTATIC tests for static controls.
These tests are covered by test_EnableThemeDialogTexture() in uxtheme/tests/system.c. These tests
are also misleading because a WM_ERASEBKGND message is needed to actually activate dialog theming.
Without the message, they give the impression that EnableThemeDialogTexture() does nothing and
DefDlgProcA/W() are not hooked.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-21 09:24:44 +01:00
Zhiyi Zhang ee3ec759d5 comctl32/status: Do not draw background for status text.
DrawStatusTextW() always draws the text background, so it's unfit to use it directly to draw status
text because status control draws its own background.

Fix status control text having wrong background when themed.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-20 10:53:40 +01:00
Zhiyi Zhang 1cdea98b18 comctl32/status: Calculate border for part background only when theming is off.
This is a no-op.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-20 10:53:35 +01:00
Zhiyi Zhang 6b1c2247d0 comctl32/status: Remove redundant background drawing code.
The part background is already painted in STATUSBAR_Refresh().

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-20 10:53:31 +01:00
Zhiyi Zhang 0209e51118 comctl32/treeview: Support themed check boxes for TVS_CHECKBOXES style.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-20 10:53:28 +01:00
Zhiyi Zhang b4b87987bb comctl32/listview: Support themed check boxes for LVS_EX_CHECKBOXES style.
Fix check boxes in the list items of 7-zip options dialog not being themed even when theming is on.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-20 10:53:23 +01:00
Alex Henrie 414123d5da comctl32/tests: Drop tooltips test workarounds for Windows <= 2000.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-05 17:16:18 +01:00
Nikolay Sivov dd96366b47 comctl32/tests: Add a basic test for ImageList_WriteEx().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-04 18:39:45 +01:00
Roman Pišl dd7d344f29 comctl32: Fix return type of ImageList_WriteEx.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52323
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-03 12:43:00 +01:00
Zhiyi Zhang 5f0dcf7918 comctl32/listview: Do not paint over header when handling WM_NCPAINT.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52285
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-30 23:09:43 +01:00
Alex Henrie b173a96237 comctl32/tests: Use GetLocaleInfoA when the buffer size is in bytes (Coverity).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-28 19:11:03 +01:00
Alex Henrie 8fd1bd9646 comctl32/tests: Mark smaller propsheet buffer as broken.
Fixes another testbot failure.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-27 15:00:54 +01:00
Alex Henrie 56a6a03918 comctl32/tests: Permit larger propsheet buffers.
Fixes a testbot failure on Windows 10 Hebrew.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-13 11:32:08 +01:00
Zhiyi Zhang feb0b73a3c comctl32/button: Support image list margin for buttons with BS_CENTER or BS_VCENTER.
WinSCP uses image list margin to adjust image position on a button when theming is on.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52076
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 10:42:18 +01:00
Zhiyi Zhang 66cb0ab34a comctl32/button: Avoid drawing over content in themed group boxes.
Fix a regression from 7c9cacd, in which a ExcludeClipRect() call was removed by mistake.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52080
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 10:42:15 +01:00
Zhiyi Zhang 743045b279 comctl32/button: Remove useless calculation when drawing themed group boxes.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 10:42:11 +01:00
Zhiyi Zhang f68ac2e4c1 comctl32/propsheet: Fix a typo in a comment.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-08 10:45:36 +01:00
Zhiyi Zhang e8390a6c39 comctl32/propsheet: Return a pattern brush when handling WM_CTLCOLORSTATIC for theming.
Fix a regression from 2f1bbd8 that makes the static control for DPI sample text in winecfg not
refreshing its background when moving the DPI slider.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 12:22:54 +01:00
Zhiyi Zhang 9c9274990e uxtheme: Do not hook DefDlgProc() for theming.
Currently there is no need to hook DefDlgProc(). Tests show that dialog theming shouldn't be
implemented in DefDlgProc().

Also fix a double free bug because WM_DESTROY in UXTHEME_DefDlgProc() calls CloseThemeData() even
when the theme handle is not opened when handling WM_CREATE in UXTHEME_DefDlgProc(). The bug can
be demonstrated by running comctl32/tests/propsheet.c tests with Light theme.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 12:22:49 +01:00
Zhiyi Zhang 7c5a62b4c5 comctl32/propsheet: Handle WM_ERASEBKGND in the property sheet page window procedure.
Handle WM_ERASEBKGND in the property sheet page window procedure and use a pattern brush created
from theme parts to fill background instead of calling DrawThemeBackground() directly.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 12:22:37 +01:00
Zhiyi Zhang b1ccad4b5c comctl32/propsheet: Handle WM_CTLCOLORSTATIC in the property sheet page window procedure.
Move themed WM_CTLCOLORSTATIC handling from UXTHEME_DefDlgProc() to the property sheet page window
procedure.

Fix a regression from 2f1bbd8 that makes the static controls in file open dialog to have black
background when using some themes.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51987
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 12:22:30 +01:00
Zhiyi Zhang ee1b19aa16 comctl32/tests: Test WM_CTLCOLORSTATIC for themed property sheets.
These tests show that it's the themed property sheet page window procedure that sets device contexts
transparent and return a pattern brush created from the tab body part in a theme. Combined with
test_WM_CTLCOLORSTATIC() in dlls/comctl32/tests/static.c, we can conclude that UXTHEME_DefDlgProc()
shouldn't handle WM_CTLCOLORSTATIC.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 12:22:21 +01:00
Zhiyi Zhang fa1294faa6 comctl32/tests: Add more WM_CTLCOLORSTATIC tests for static controls in a dialog.
Mostly to test that even when theme texture is enabled for a dialog, the default dialog procedure
still returns the stock COLOR_BTNFACE brush in response to WM_CTLCOLORSTATIC.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 12:22:03 +01:00
Zhiyi Zhang 3c789e2f10 comctl32/tests: Add an optional message to avoid test failures.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-25 21:19:46 +01:00
Thomas Faber 102d691050 comctl32/tests: Fix DC handle leak.
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-24 11:04:37 +01:00
Dmitry Timoshkov c692c59c2e comctl32: Add semi-stub for ImageList_WriteEx.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-19 19:58:11 +01:00
Zhiyi Zhang 438078d045 comctl32/button: Use client rectangle as content rectangle for themed group boxes.
Themed group boxes always use client rectangle as content rectangle regardless of group box content
margin specified by theme files.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52028
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-19 18:31:38 +01:00
Thomas Faber 68b48acbc4 comctl32/tests: Test SB_GETPARTS with large wParam.
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-12 22:42:52 +01:00
Mark Jansen bb24e75625 comctl32: Safely handle large wParam in SB_GETPARTS.
Signed-off-by: Mark Jansen <mark.jansen@reactos.org>
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-12 22:42:52 +01:00
Gabriel Ivăncescu c82d6ee4a7 comctl32: Redraw children when the combo box is dropped down.
Some applications subclass the combo box and handle WM_ERASEBKGND themselves,
without using WS_CLIPCHILDREN. This causes them to erase over the editbox
child, so it requires a refresh as well.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22260
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-12 22:42:51 +01:00
Zhiyi Zhang ce9d006a45 comctl32/button: Support BS_PUSHLIKE for themed command links.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-11 09:52:45 +01:00
Zhiyi Zhang 3a2d2adc4e comctl32/button: Support BS_PUSHLIKE for themed group boxes.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-11 09:52:43 +01:00
Zhiyi Zhang 9e9448e72b comctl32/button: Correctly align parts in group boxes with BS_PUSHLIKE when theming is off.
Parts in group boxes with BS_PUSHLIKE can be at the bottom, center and top when theming is off.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-11 09:52:41 +01:00
Zhiyi Zhang fcd63df421 comctl32/button: Support BS_PUSHLIKE for themed check boxes and radio buttons.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-11 09:52:39 +01:00
Zhiyi Zhang ed06aa2f7e comctl32/button: Use correct state for default buttons.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-11 09:52:37 +01:00
Zhiyi Zhang a7f6d78406 comctl32/button: Use correct state for BS_3STATE and BS_AUTO3STATE buttons.
BS_3STATE and BS_AUTO3STATE are check boxes. Fix BS_3STATE and BS_AUTO3STATE buttons drawing
indeterminate state as unchecked.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-11 09:52:34 +01:00
Zhiyi Zhang 595f5c59ec comctl32/button: Correctly place parts for themed split buttons.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-05 10:24:48 +01:00
Zhiyi Zhang 7c9cacd47f comctl32/button: Correctly place parts for themed group boxes.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-05 10:24:45 +01:00
Zhiyi Zhang 4f912012a9 comctl32/button: Correctly place parts for themed check boxes.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-05 10:24:41 +01:00
Zhiyi Zhang e1fb7f8b86 comctl32/button: Correctly place parts for themed push buttons.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51916
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-05 10:24:37 +01:00
Zhiyi Zhang 2f2cfaf076 comctl32/button: Correctly place parts for buttons with WS_EX_RIGHT.
WS_EX_RIGHT has the same effect as BS_RIGHT.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-05 10:24:32 +01:00