Commit Graph

52 Commits

Author SHA1 Message Date
Alexandre Julliard 5ad25c293b user32: Use wide character string literals.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:09:59 +02:00
Dmitry Timoshkov 96d0af52eb user32: Move the auto radio button group logic from BM_SETCHECK to WM_LBUTTONUP handler.
This patch also changes the logic to get the control style with WM_GETDLGCODE
instead of GetWindowLong to make the message test pass.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-26 12:51:43 +01:00
Nikolay Sivov 85d159a408 user32/button: Use per-window dpi settings.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-17 17:39:56 +02:00
Zhiyi Zhang 60fad890db user32: Fix checkbox wrong box alignment with BS_VCENTER.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-27 09:24:42 +02:00
Nikolay Sivov 080cb3aa81 user32: Remove some misleading TODOs.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-21 17:33:36 +01:00
Nikolay Sivov b7a08c9281 user32/button: Do not select old font back after painting.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-01 19:25:56 +01:00
Nikolay Sivov 1ae05c04a2 user32: Remove confusing comments.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-08 13:10:50 +01:00
Dmitry Timoshkov d639d3bba0 user32: Fix groupbox rectangle calculation in the button's WM_SETTEXT handler.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-07 17:24:36 +01:00
Dmitry Timoshkov e45b80088b user32: BUTTON_CalcLabelRect should use the button font.
Otherwise WM_SETTEXT handler gets wrong rectangle to erase an old text.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-07 17:24:33 +01:00
Andrey Gusev 535f1de80d user32: Add support for WS_EX_RIGHT style.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-20 07:32:12 -07:00
Huw Davies 9efcbd113d user32: Scale the button size with screen resolution.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-22 23:05:22 +09:00
Huw Davies b0ec8a6675 user32: The offset between the button and the text is half the digit width.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-22 23:05:22 +09:00
Michael Stefaniuc 07ada9a85b user32: Use SetRect() instead of open coding it.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-19 19:59:30 +09:00
Alexander Lakhin bc3f40e21a user32: Send WM_CTLCOLOR* message only for visible buttons.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-20 21:52:51 +09:00
Alexander Lakhin 35ab5f4499 user32: Send the correct WM_CTLCOLOR* message in button WM_SETTEXT handler.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-20 21:52:41 +09:00
Christopher Thielen 85faafc0e3 user32: Ensure that button responds only to changes in WM_CAPTURECHANGED handler.
Signed-off-by: Christopher Thielen <cthielen@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-02 22:21:32 +09:00
Alex Henrie 4a3065c5d7 user32: Turn magic values into static constants.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-06 21:59:08 +09:00
Alex Henrie a3e4c69419 user32: Release capture before sending WM_COMMAND.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-21 21:07:56 +09:00
Dmitry Timoshkov 0fe60f83d2 user32: Always call BeginPaint/EndPaint when handling a WM_PAINT message for the button.
Python 3.5 installer creates windows with class "Button" that have 0x000e
button style, that causes infinite painting loops and inability to draw
the installer UI.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-20 00:30:39 +09:00
Alex Henrie 64e63f4550 user32: Remove always-false condition.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
2015-10-06 22:16:37 +09:00
Alex Henrie c68843f898 user32: Send BM_SETCHECK before WM_CAPTURECHANGED and add tests. 2015-06-23 17:08:23 +09:00
Piotr Caban 371cff4883 user32: Don't redeclare button state macros. 2011-06-27 15:04:55 -05:00
André Hentschel e054fc2310 user32: Don't paint new button styles instead of crashing. 2010-11-04 11:55:48 +01:00
Alexandre Julliard 0f90053575 user32: Add a common helper to set controls clip region, and make it behave correctly when mirrored. 2010-09-02 11:35:14 +02:00
André Hentschel aef6e3d232 user32: Use a macro instead of direct values. 2010-08-16 17:28:55 +02:00
Dmitry Timoshkov cc870dc484 user32: Paint button focus in the ODA_SELECT case too. 2010-05-18 18:44:18 +02:00
Dmitry Timoshkov 184c86e774 user32: Add BM_SETSTATE/BM_SETCHECK message tests for a button, make them pass under Wine. 2010-05-17 15:41:27 +02:00
Dmitry Timoshkov c049f83308 user32: Do not ask DrawFrameControl() to modify the passed in rectangle.
This patch should fix the regression(s) caused by my recent button painting
patches. The problem was that DrawFrameControl() was modifying the rectangle,
and one of my patches stopped calling DrawFrameControl() in case of ODA_FOCUS
action, so drawing an entire button and only focus started to differ, which
was hidden by the custom clipping (that was removed by my last patch).
2010-04-16 12:40:52 +02:00
Dmitry Timoshkov fedc194e68 user32: Button painting code always sets up the clipping, there is no need to duplicate it. 2010-04-13 11:43:30 +02:00
Michael Stefaniuc 6f3b494463 user32: Remove some explicit LPARAM/WPARAM casts. 2009-12-28 12:27:13 +01:00
Alexandre Julliard d081a7352c user32: Simplify window procedure allocation for the builtin classes. 2009-12-18 12:39:13 +01:00
Alexandre Julliard 87f83f8618 user32: Pre-allocate the window procedure for the button class. 2009-12-17 13:09:49 +01:00
Alexandre Julliard 02e74fa8a6 user32: Implement UserRegisterWowHandlers function and add a handler for the button winproc. 2009-12-15 16:09:13 +01:00
Alexandre Julliard 68775d9134 user32: Split the handling of the 16-bit messages out of the button winproc. 2009-12-13 12:12:47 +01:00
Dmitry Timoshkov 523d8ceefc user32: Make sure that focus_rect is always initialized. 2009-10-12 12:33:31 +02:00
Dmitry Timoshkov 8d54f58277 user32: Draw the whole button only if requested. 2009-07-23 13:20:21 +02:00
Dmitry Timoshkov 87418f0aaa user32: Add a test for BM_SETSTYLE, make it pass under Wine. 2009-07-02 13:11:48 +02:00
Dmitry Timoshkov 45c8e64057 user32: Invalidate button on WM_KILLFOCUS, like Windows does. 2009-06-18 15:17:28 +02:00
Nikolay Sivov 2948ec6a70 user32: Button should get captured when highlighted with VK_SPACE. 2009-03-10 14:51:57 +01:00
Francois Gouget 31df4d42b7 user32: Remove WINAPI/CALLBACK on static functions where not needed. 2008-11-25 11:50:00 +01:00
Michael Stefaniuc 4fc84eaf5a user32: HGDIOBJ is interchangeable with other handle types; no casts are needed. 2008-10-27 11:29:54 +01:00
Austin English 6e59cd2c34 Spelling fixes. 2008-04-22 12:20:12 +02:00
Alexandre Julliard bbd9e229e3 user32: Added support for WS_EX_RIGHT in the button control. 2008-04-17 19:26:34 +02:00
Andrew Talbot ba596d30ce user32: Remove unneeded casts. 2008-01-22 11:27:45 +01:00
Dmitry Timoshkov 9e3ab87a9c user32: Make sure to setup clipping before any painting is done. 2007-12-19 12:19:58 +01:00
Dmitry Timoshkov aec7e91d53 user32: Always clip the button painting to the client rectangle. 2007-12-17 13:01:56 +01:00
Andrew Talbot d98b83bed5 user32: Constify some variables. 2007-11-09 12:26:23 +01:00
Alexandre Julliard bfe88a00f8 user32: Store the builtin class names in Unicode. 2007-11-01 12:55:00 +01:00
Francois Gouget ebadbd4bd5 Assorted spelling fixes. 2007-08-09 14:13:07 +02:00
Andrew Talbot 48d740855e user32: Replace inline static with static inline. 2007-03-17 20:04:08 +01:00