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>
This commit is contained in:
parent
9182b24b81
commit
35ab5f4499
|
@ -389,13 +389,18 @@ LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
|
||||||
HBRUSH hbrush;
|
HBRUSH hbrush;
|
||||||
RECT client, rc;
|
RECT client, rc;
|
||||||
HWND parent = GetParent(hWnd);
|
HWND parent = GetParent(hWnd);
|
||||||
|
UINT message = (btn_type == BS_PUSHBUTTON ||
|
||||||
|
btn_type == BS_DEFPUSHBUTTON ||
|
||||||
|
btn_type == BS_USERBUTTON ||
|
||||||
|
btn_type == BS_OWNERDRAW) ?
|
||||||
|
WM_CTLCOLORBTN : WM_CTLCOLORSTATIC;
|
||||||
|
|
||||||
if (!parent) parent = hWnd;
|
if (!parent) parent = hWnd;
|
||||||
hbrush = (HBRUSH)SendMessageW(parent, WM_CTLCOLORSTATIC,
|
hbrush = (HBRUSH)SendMessageW(parent, message,
|
||||||
(WPARAM)hdc, (LPARAM)hWnd);
|
(WPARAM)hdc, (LPARAM)hWnd);
|
||||||
if (!hbrush) /* did the app forget to call DefWindowProc ? */
|
if (!hbrush) /* did the app forget to call DefWindowProc ? */
|
||||||
hbrush = (HBRUSH)DefWindowProcW(parent, WM_CTLCOLORSTATIC,
|
hbrush = (HBRUSH)DefWindowProcW(parent, message,
|
||||||
(WPARAM)hdc, (LPARAM)hWnd);
|
(WPARAM)hdc, (LPARAM)hWnd);
|
||||||
|
|
||||||
GetClientRect(hWnd, &client);
|
GetClientRect(hWnd, &client);
|
||||||
rc = client;
|
rc = client;
|
||||||
|
|
Loading…
Reference in New Issue