BS_VCENTER shares bit field with BS_TOP and BS_BOTTOM. Thus the condition can't base on only logic AND.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/user32/button.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/button.c b/dlls/user32/button.c index adfb6a91ff..7684e7f2fa 100644 --- a/dlls/user32/button.c +++ b/dlls/user32/button.c @@ -902,14 +902,14 @@ static void CB_Paint( HWND hwnd, HDC hDC, UINT action ) /* rbox must have the correct height */ delta = rbox.bottom - rbox.top - checkBoxHeight; - if (style & BS_TOP) { + if ((style & BS_VCENTER) == BS_TOP) { if (delta > 0) { rbox.bottom = rbox.top + checkBoxHeight; } else { rbox.top -= -delta/2 + 1; rbox.bottom = rbox.top + checkBoxHeight; } - } else if (style & BS_BOTTOM) { + } else if ((style & BS_VCENTER) == BS_BOTTOM) { if (delta > 0) { rbox.top = rbox.bottom - checkBoxHeight; } else {