From: Fabian Maurer dark.shadow4@web.de
Since we set the text, this would trigger the exact same logic again. --- dlls/comdlg32/colordlg.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/comdlg32/colordlg.c b/dlls/comdlg32/colordlg.c index 84540a1348f..4a5da107bd8 100644 --- a/dlls/comdlg32/colordlg.c +++ b/dlls/comdlg32/colordlg.c @@ -393,7 +393,7 @@ static BOOL CC_MouseCheckResultWindow( HWND hDlg, LPARAM lParam ) /*********************************************************************** * CC_CheckDigitsInEdit [internal] */ -static int CC_CheckDigitsInEdit( HWND hwnd, int maxval ) +static int CC_CheckDigitsInEdit( CCPRIV *infoPtr, HWND hwnd, int maxval ) { int i, k, m, result, value; char buffer[30]; @@ -423,8 +423,10 @@ static int CC_CheckDigitsInEdit( HWND hwnd, int maxval ) if (result) { LRESULT editpos = SendMessageA(hwnd, EM_GETSEL, 0, 0); + infoPtr->updating = TRUE; SetWindowTextA(hwnd, buffer ); SendMessageA(hwnd, EM_SETSEL, 0, editpos); + infoPtr->updating = FALSE; } return value; } @@ -966,10 +968,10 @@ static LRESULT CC_WMCommand(CCPRIV *lpp, WPARAM wParam, LPARAM lParam, WORD noti case COLOR_BLUE: if (notifyCode == EN_UPDATE && !lpp->updating) { - i = CC_CheckDigitsInEdit(hwndCtl, 255); + i = CC_CheckDigitsInEdit(lpp, hwndCtl, 255); r = GetRValue(lpp->lpcc->rgbResult); g = GetGValue(lpp->lpcc->rgbResult); - b= GetBValue(lpp->lpcc->rgbResult); + b = GetBValue(lpp->lpcc->rgbResult); xx = 0; switch (LOWORD(wParam)) { @@ -996,7 +998,7 @@ static LRESULT CC_WMCommand(CCPRIV *lpp, WPARAM wParam, LPARAM lParam, WORD noti case COLOR_LUM: if (notifyCode == EN_UPDATE && !lpp->updating) { - i = CC_CheckDigitsInEdit(hwndCtl , LOWORD(wParam) == COLOR_HUE ? 239 : 240); + i = CC_CheckDigitsInEdit(lpp, hwndCtl, LOWORD(wParam) == COLOR_HUE ? 239 : 240); xx = 0; switch (LOWORD(wParam)) {